Use a REST connector to activate or terminate a stage, activity, or process in a dynamic process.
Suppose, as a customer service manager of a credit card company, you need to check the credit scores of potential customers. Credit scores depend on several factors such as credit inquiries, account mix, credit age, credit utilization, and payment history. Based on these factors, complex mathematical algorithms are applied to get a credit score, and this is handled by the REST service. Based on the credit score provided by the REST service, you activate/terminate an activity with the interest rate offer for a potential customer.
Here are the main steps for using a REST connector to activate or terminate a stage, activity, or process in a dynamic process.
- Create the process application and its components.
- Create a dynamic process with activities to support the REST connector. For example, the dynamic process can contain an activity that is activated depending on the REST connector's response.
- Create a REST connector and use it in the dynamic process. Optionally, import a REST connector into your application and use it in the dynamic process.
Ensure that the connector is available in the Integrations page of your application.
- Create a form to capture user inputs for the various human task activities in the dynamic process.
- Configure data and its flow in the process.
Business objects are generally shared among the form, REST service, and dynamic process elements. For example, you can create a business type that is used in the form and as input data types in the REST service.
- Configure the REST condition.
- Select the activity, stage, or process and edit properties. Choose an activation or termination condition, set it up as a data driven condition, and create the condition.
- In the Create Data Condition dialog box, enter a suitable name for the condition in the Name field.
- Select REST as its condition type.
- Select your (REST) integration in the Integration field, and the related resource and operation in the Resource and Operation fields.
- In the Map Input Values fields, map a process variable as input to the connector's response body or parameter.
- Define the REST connector's response as a condition. For example, if the REST service returns a customer's credit score as greater than 750 then activate the activity.
- Try out the application in runtime to test the REST condition.