- 26 Mar 2024
- 3 Minutes to read
- Print
- PDF
Configure REST Web Service
- Updated on 26 Mar 2024
- 3 Minutes to read
- Print
- PDF
The Workflow Configuration page contains the option of REST Web Service involving two important methods- GET and POST.
For the Employee Onboarding use case, let's understand how we can configure a workflow with REST Web Service.
Configure REST Web Service
To configure a REST Web Service for a workflow, perform the following steps:
1. Navigate to Orchestration > User > Orchestration.
2. From the left MENU, select Workflow Configurations > New Workflow.
Workflow Configuration- Workflow Designer page is displayed.
3. In Workflow Configuration pop-up, enter all the required fields as shown below. For more information on fields in this pop-up, refer to New Workflow page.
Figure: Workflow Configuration pop-up
4. In the Workflow Designer page, drag and drop the desired Rest Web Service (GET or POST) from the left Activities bar along with the desired Script. Draw the desired connection between the blocks. The conditions for these can be defined in Properties tab, which is explained in the next segment.
Figure: Workflow Configuration page
5. Expand the Properties tab at the right to configure the properties for the selected script and web service method.
Refer to the below figure for Properties of a script:
Figure: Workflow Configuration - Properties tab for Script
Refer to the below figure for Properties of a web service:
Figure: Workflow Configuration - Properties tab for Web Service
6. Click SUBMIT. The Workflow Configuration is saved and configured successfully.
Field Description
This table contains the list of fields and their descriptions available under Properties tab for a Script:
Field | Description |
---|---|
Style | |
Texts- Title * | Enter the desired title as per the required use case. |
Styles Title border color * Background * Title color * | Select the desired color for title border, background, and title. By default, the color will be black. |
Script Description Provide a crisp description about the script. | |
Action Script Details Select all the desired details in the grid. Parameter Details The inputs in this segment will be captured from Service Catalog which is selected during the Workflow Configuration. In that case, select Catalog Attributes as the Data Source. Select the desired Data Source and Data fieldfrom the drop-down.Info: In this case, Fixed Input is selected as Data Source as the data fields are defined here directly. |
Field Description
This table contains the list of fields and their descriptions available under Properties tab for a Web Service:
Field | Description |
---|---|
Style | |
Title * | Enter the desired title as per the required use case. |
Title border color * | Select the desired title border color. By default, the color will be black. |
Background * | Select the desired background color. By default, the color will be black. |
Title color * | Select the desired title color. By default, the color will be black. |
Action | |
Name * | Enter the desired name as per the required use case. |
Target Type * | Select the desired Target Type from the drop-down. |
Target Host Type * | Select the desired Target Host Type from the drop-down. |
Proxy Server Host * | Select the desired Proxy Server Host from the search option. |
Schedule Type * | Select the schedule type as One Time or Recurring as per requirement. |
Retry Interval (In Mins) | Mention the retry interval in mins. |
Retry Count | Mention the retry count. |
Request | |
POST | Specify the API URL. |
Based on the API, the following tabs can be configured. Note: Depending on the API configuration, we can pass inputs to API through Params or Body. Params, Authorization, Headers, and Body configurations are done based on the updated API and are not mandatory fields. | |
Params | |
Authorization | |
Headers | |
Body | |
Input Select the desired Data Source and Data Field from the drop-down, to pass the input parameters. Note: Pertaining to the above use case, the output from Create User in AD script is passed as input to Notify User (POST Web Service). | |
Output Define the Output Variable and Source. Note: Pertaining to the above use case, post-execution of Notify User, the output assignment is configured here. | |
Criteria Based on the Output variable, configure the Success and Failure criteria. | |
Response The API call response (whether success or failure) can be tested here. Click SEND from the Request tab and verify the status in Response tab. To understand this functionality, refer to the below gif: |
To check the configured Workflow, navigate to Workflow Configurations > Workflow List.