Circuit's Task Engine state is used to connect with other applications and access APIs from a closed space. To retrieve data from a private network, the required API must be accessed from the local machine's network for the required conditions.
Prerequisite
For more details about the Task Engine module in Bridge, the keys, and its description, click here.
Example Use Case: During the employee onboarding process, after all the necessary employee provisioning is done, it is important to update the status in the HR team's recruitment software. To accomplish this, the Task Engine state can be utilized, and the provided API can be consumed to update the onboarding status.
Let us see how to configure Task Engine in Builder View and Code View.
Builder View
For associating a Task Engine state to a circuit:
In Builder View, drag and drop the Task Engine state from the left pane into your circuit or click the required Task Engine state in your circuit.
Under the Configuration tab, update the common state field attributes.
The Bridge ID field should capture the details of the bridge to be used for this task. Select the appropriate bridge from the drop-down list.
Under the Add Configuration section, fill in the following fields:
Credential ID - Select the credential from the dropdown list. The Credential IDs of all the credentials created for the Task Engine module type will be displayed in the list.
Request Method - Field select the method (GET/POST).
Request URL - Enter the API URL.
In Error Handling, you can optionally select and configure error handling options. Refer to Error Handling in Circuit states for further information.
In the Input /Output section, you can optionally fill in the following fields:
Parameters: Click Add Parameter and specify the parameter name and parameter value. These parameters will be sent to the third-party application while triggering the webhook.
Headers: Click Add Header and specify the header name and header value. The configured headers will be appended to the API request while triggering the webhook.
Code view
In Code View, the JSON to configure the Task Engine state to update status using an API is given below:
"Update Onboarding Status": {
"type": "task_engine",
"next": "Onboarded Successfully",
"payload": {
"credential_id": "api_cred_1",
"method": "POST",
"url": "https://recruitapp.com/update_status",
"parameters": {
"employee_name": "John Mathew",
"employee_email": "john_mathew@sweriomail.com",
"onboarding_status": "onboarded"
},
"headers": {
"AuthorizationKey": "$.APIKey"
}
},
"bridge_id": "bridge-1369_1"
}
Related Articles
Task Engine
In Qntrl, while public APIs can be configured and executed directly through Webhooks, the client's internal APIs that are exposed only to the local network can be executed using the Task Engine module in Bridge. The Task Engine configured in Bridge ...
Bridge agent settings
Once the Bridge agent is set up, you can log in to the bridge agent to view and modify the allowed configuration as needed. To do this: In Qntrl, navigate to (settings) >> Advanced >> Bridge, then select your bridge. Hover your cursor over the bridge ...
Install Bridge
Follow the below step-by-step procedures to configure and use Bridge in Qntrl. Step 1: Download the Bridge agent Only one Bridge agent can be installed per machine. To download a bridge agent in Qntrl: Navigate to (settings), under Advanced click ...
DB Engine
This state enables a connection with the database hosted on a private or local network and executes the defined SQL query in the database. Prerequisite An active Bridge agent. Refer here to install and configure Bridge. Create the necessary ...
PowerShell Task Engine
These states are used to perform any actions in the Windows machines of a private network using PowerShell commands. There are six states available in the PowerShell Task Engine for performing different operations. PowerShell Engine Install ...