Calling REST Web Service from Workflow |
Scroll |
1.In this example, we will use the REST Call function to post new details from Thereforeā¢ on to the web service. Begin the process by creating a Call REST Service workflow task within a workflow.
2.Set the request type (to either GET, POST, PUT, DELETE or PATCH depending on the instruction), in this example, we will use the POST type.
3.Complete the details requires in the Authorization tab in order to authorize the application against the external system. In this example, we are using the OAuth (Authorization Code). 4.Then define any additional headers that are required from the call within the Header tab. Click the Add... button to define additional headers. In this example, we only require an 'Accept' header where we are asking the web service that we would like a json to be returned instead of an xml. 5.In the Body section, a structure needs to be defined for which the new document will be based. In this example. fields within the document can be populated by index data values. 6.In the Status Codes section, define the codes that indicate a successful outcome. If the call provides a successful outcome, then the workflow instance can be routed to the next task. 7.Then define the Response Handling information in order to arrange how current information is updated based on the response of the REST Call. In this example, the newly created document's "Bill Id" will be included in the index data of Thereforeā¢ (under InvoiceId and Invoice No).
8.Once all the required information has been included, click OK. At this point, the actual workflow instance can be initiated.
|
---|