Connect-REST Using POST Method
Example of consuming a REST service using an activity with exception handling
Step 1
Open the Connect-REST wizard through the following navigation
Configure > Integration > Connectors > Create REST Integration
Step 2
Run the wizard
The Resource name defined here will be name of the connector
In the following screen click on "+Add a REST Response" and click RUN in the pop-up screen button and submit. (Make sure to copy the request body before clicking on the run button)
Step 3
Decide on the approach to invoke the connector and do the transaction For this below approach is used.
Upon click of the "Create Employee" button REST connector will be invoked sending the Name, Age and salary as request parameters. Once the response is received, case id is mapped to clipboard property ( in this example the response value returned is 2308
The below activity is called upon click of the "Create Employee" button.
Request and response will be in the ABC-IntApp1-Int-Employee-CreateEmployeeAPI class object which is the class of the temp page defined.
Error handling will be done by setting a message to page checking the response code.
No comments:
Post a Comment