Installing and configuring mule concur connector

20
Installing and Configuring Mule Concur Connector Thanh Nguyen

Transcript of Installing and configuring mule concur connector

Page 1: Installing and configuring mule concur connector

Installing and Configuring Mule Concur Connector

Thanh Nguyen

Page 3: Installing and configuring mule concur connector

Configuring

1. Start Anypoint Studio and create a new Mule project: Navigate to File > New > Mule Project

2. Type a project name and click Next. Accept default values on the next screen of the wizard and click Finish.

3. In the Package Manager that appears at left by default in Studio, double-click on your application’s project name to open it, and click the application’s XML file in src/main/app/yourMuleAppProjectName.xml.

Page 4: Installing and configuring mule concur connector

Configuring

4. Select the Global Elements tab.5. Click on the Create button, search for Concur and add a

Concur connector configuration.6. Set the Concur Connector parameters in the global

element for easy reference by your application later:– Username and password (the same ones you used to login

to the developer sandbox)– Api URL - typically https://www.concursolutions.com for the

Developer Sandbox– Consumer Key - the value of "Key" when registering the

Partner application

Page 5: Installing and configuring mule concur connector

Configuring

Page 6: Installing and configuring mule concur connector

Upgrading from an Older Version

1. Click the popup and check for available updates. 2. Click the Connector version checkbox and click Next

and follow the instructions provided by the user interface.

3. Restart Studio when prompted. 4. After restarting, when creating a flow and using the

Object Store Connector, if you have several versions of the connector installed, you may be asked which version you would like to use. Choose the version you would like to use

Page 7: Installing and configuring mule concur connector

Using the Connector

• With the Concur connector you can create and extract data with most of the Concur APIs

• The operations offered are based on what is available in the Concur Developer Sandbox

Page 8: Installing and configuring mule concur connector

Example Use Case

• Getting a "list of lists" and retrieving "quickexpenses“

• You may jump ahead and paste the code for the flows into the XML Editor in Studio after the Concur connector has been downloaded and a global element referencing your Concur instance credentials has been created

Page 9: Installing and configuring mule concur connector

Example Use Case

Page 10: Installing and configuring mule concur connector

Retrieve a List of Lists

1. Add a new Flow element by dragging it from the palette and give a name to the flow, such as getlists.

2. Drag an HTTP Listener into your flow from the palette.3. Double-click the HTTP Listener and click the green plus

sign next to the Connector Configuration dropdown and set the Host to localhost, and the Port to 8081.

4. Click OK to close the properties window, then enter getlists as the value in the "Path" field in this HTTP listener’s "Basic Settings" section.

Page 11: Installing and configuring mule concur connector

Retrieve a List of Lists

5. Add a Concur connector to the new flow and select the Get list of lists operation, after selecting the Connector Configuration you desire.

6. Finally, add an Object to JSON transformer to the flow.

7. For reference you may check the particular "getlists" flow within the example XML code further down

Page 12: Installing and configuring mule concur connector

Execute the flow and check the outcome

1. Right-click on the project in the Package Explorer, and click Run As > Mule Application.

2. Check that the application has started by monitoring the Studio console.

3. Open browser and go to http://localhost:8081/getlists

4. You should receive a JSON response

Page 13: Installing and configuring mule concur connector

Namespace and Schema

5. Hit the stop button to halt the server running the application

Page 14: Installing and configuring mule concur connector

Create a Quick Expense

1. Add a new Flow element by dragging it from the palette and name it "getquickexpenses".

2. Add an HTTP Listener to your flow by dragging it from the palette.

3. Use the configuration from the first demo, or if you did not create that flow, click the green plus sign next to Connector Configuration for the HTTP endpoint and enter localhost as the Host and 8081 for the Port

Page 15: Installing and configuring mule concur connector

Create a Quick Expense

4. Click OK to close the properties window, then enter getquickexpenses as the value in the "Path" field in this HTTP listener’s "Basic Settings" section.

Page 16: Installing and configuring mule concur connector

Namespace and Schema

5. Add the Concur connector to the new flow, referencing a global element from the Connector Confiuration and set an Operation to perform and any other properties you require.

6. Finally, add an Object to JSON transformer link in the previous example.

Page 17: Installing and configuring mule concur connector

Execute the flow and check the outcome

1. Right-click on the project in the Package Explorer > Run As > Mule Application

2. Check the console to see when the application starts.

3. Open the browser and go to http://localhost:8081/getquickexpenses

Page 18: Installing and configuring mule concur connector

Execute the flow and check the outcome

4. You should receive a JSON response like this:

5. Hit the stop button to halt the server running the application.

Page 19: Installing and configuring mule concur connector

Example Use Case Code

Page 20: Installing and configuring mule concur connector

Question and answer