Task
What is the Task?
In the API Integration module, the integration process with each system or application is called a task.
Apinizer has not adopted defining a task/connection type for each of the endpoints that can be called with the API, as it adopts to make integrations with API calls as much as possible.
That's why there are14 different tasks on Apinizer:
- Sending an e-Mail
- API Call
- Database Connector
- Running Linux Scripts
- Script (JavaScript or Groovy)
- Opsgenie Alert Creation
- Notification Creation
- SNMP
- Elasticsearch Connector
- Kafka Connector
- RabbitMQ Connector
- ActiveMQ Connector
- Syslog Connector
- Webhook Connector
The picture below shows the task selection:
Common Fields in Tasks
When creating a task there are some input and output fields that are the same for each type. This information is the selected fields in the image below.
The fields used for configuring common information in tasks are shown in the table below.
Field | Description |
---|---|
Execute This Task For | The type of how the result produced from the previous task will be run in the current task is selected. A process is produced by using the run result in the relevant field in the task.
|
This option is active if the task operation type is selected as loop. The result of the value given with JSON Path/XPath is run as a loop. Apinizer Sythax Bu alandaki kritik nokta değerin Apinizer'ın söz dizimine uygun yazılmasıdır. Bu kuralda dikkat edilmesi gereken 2 unsur vardır. Sythax 1: Veriyi sorgulama Syntax rules;
Let's look at the formula of the syntax; {{previous-task-output-name#<this-part-is-written-in-JSONPath-or-Xpath-format>}} Let's examine an example syntax;
{{centralRates#/Date/Currency}} Sythax 2: Using loop data in task Elements taken from the data with syntax can be used in the task (sending mail, processing database, writing scripts, etc.). To be able to use it, it must be referenced with the variable key named LOOP_VARIABLE. Let's look at the formula of the syntax; {{LOOP_VARIABLE#<this-part-is-written-in-JSONPath-or-Xpath-format>}} Let's examine an example syntax; {{LOOP_VARIABLE#/Currency/Name/text()}} The detailed example usage is explained on the API Integrator Scenarios pages. | |
If the operation fails, then continue | This option is active if the task operation type is selected as Loop. If an error occurs while executing the actions in the loop, the process is governed by which the task must continue running or be stopped immediately. |
Output Keys | The list of output key created in previous tasks appears. Thus, it can use the output key here in the job definition inputs. |
Output Key | The variable name to which the value that will be created when the task is run will be assigned is entered. Tasks after this task will use the output key entered in this field if they want to process the output of this task.
|
Name | Write the name of the task. This information is assigned as the value of the {{taskflow.name}} variable. Therefore, when this variable is written to the other input field and run, the value of the variable will appear in the relevant output. |
Description | A description of the task is written. |