Sunday, April 2, 2023

Configuring A REST Connector

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




(Here by default GET is selected uncheck and select POST and define a name for the resource)
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)





We can do "Undo Generation" even after closing this window, if we find some error in the connector creation. For that navigate to Configure > Integration > Tools > Wizard Cleanup.


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

Rule Delegation

 Summary of Rule Delegation The purpose of Rule Delegation is to make the rule available in the production environment for customization for...