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 ...
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 ...
SSH Engine
SSH Engine state is configured to connect to a client's machine or network and remotely execute commands or scripts on the client's Linux/UNIX operating system. Prerequisite Bridge must be installed and should be active. Learn how to install and ...
SSH Engine
SSH Engine module in Bridge is used to perform actions in the client network/client's machine by executing a command/script in Linux/UNIX OS. Prerequisite While creating credentials for SSH Engine, choose the Credential type as SSH. Click here to ...
PowerShell Engine
PowerShell Engine In Bridge, the PowerShell Engine module is used to perform actions in any Windows machines in the client's network using PowerShell script. Prerequisite While creating Credentials, select the type Powershell and provide the User ...