Orchestration Task
Definition
Memority Synchronization service enables to configure and run various tasks: Import, Export, Reconciliation and Provisioning. An Orchestration Task chains the execution of some of those tasks, by defining dependencies between tasks, and conditions to trigger or skip their execution.
Use
Orchestrated tasks are executed sequentially (never in parallel):

Tasks Execution Conditions
"Orchestrating" tasks essentially means "conditionally execute the next task".
There are two aspects regarding the execution of a task:
on what condition(s) is the task executed
when is the task executed
On What Condition(s) is the Next Task Executed
This section focuses on the possible conditions enabling the execution of the next orchestrated task.
The first task of the chain is always executed, unless there is a time restriction (see below).
The possible configurable conditions on which the next task is executed can be:
execute the next task even if a "fatal" error occurred during the parent task execution. A "fatal" error prevents the whole parent task execution (for example, a CSV file to import was not found). By default, if the parent task execution fails with such a fatal error, the orchestration process stops. It should be noted that if the parent task status is either "SUCCESS" or "PARTIAL", then the next task always runs, even if 99% of the processed objects failed in the parent task, because the parent's status is still "PARTIAL" (1% succeeded)
the global time limit is not exceeded. To not disrupt the daily tasks manually performed by human operators, it is possible to configure a "hard" time limit after which no orchestrated task can be launched. This enables to define a period dedicated to automated processings (i.e. the orchestrated tasks execution), separated from the period dedicated to manual processings (i.e. human operators). The time limit can be defined as an absolute time (such as 03:00), or as a duration (e.g. the whole orchestration process should not run for more than 4 hours after the orchestration start time). The hard limit is checked before launching a task. If the hard limit is set to 03:00, then a task can start at 02:59, because we cannot presume of a task duration, so it is allowed to start
When is the Next Task Executed
The next task can be executed either:
right after its parent termination (immediate chaining)
after a fixed time, e.g. after 03:30, which could also mean right after the parent task termination, if the parent finishes after 03:30. This gives some margin so that other third-party operations can occur between task executions, e.g. some third-party customer job has enough time to upload on the platform the CSV file to import.
Access Control
Access control is applied when:
configuring an orchestration task, i.e. when creating/updating an Orchestration Task Definition.
executing/canceling an orchestration task
reading the report produced by an orchestration task
deleting an orchestration task
All these use cases are controlled using Permissions that follow the standard schemes:
Those permissions are arranged in the following rights that can be granted to users:
Configuration
You can access the Orchestration Tasks configuration :
by clicking on "Synchronization" → "Orchestration Tasks"
by clicking on "System" → "Configurations"->”Synchronization Service” and perform an import/export.
Properties
An Orchestration Task is configured through an Orchestration Task Definition, whose properties are listed below.
Orchestration Task Definition
Here are the "general" properties of an Orchestration Task Definition :
Property Name | Type | Mandatory | Description | Values (default value in bold) |
---|---|---|---|---|
id |
| YES | The Task identifier. | - |
name |
| YES | The Task name. | - |
description |
| NO | The Task description. | - |
active |
| NO | Whether the Task is active or not. If not it cannot be launched. | true,false |
orchestratedTasks |
| YES | The list of orchestrated tasks. They are executed sequentially. This is a complex type, whose structure is provided in the next table. | - |
executionTimeLimit |
| NO | An optional "hard" time limit after which no orchestrated task can be launched. This field defines the time limit as an absolute time (such as 03:00:00) with the ISO-8601 format. This hard limit is checked before launching a task. If the hard limit is set to 03:00:00, then a task can start at 02:59 (since we cannot presume of a task duration, it is allowed to start). This limit can also be defined as a duration (e.g. the whole orchestration process should not run for more than 4 hours after the orchestration start time), see the property | - |
timeZone |
| NO | The time zone used for the above | UTC |
executionDurationLimit |
| NO | Mutually exclusive with the above | - |
executionPlan |
| NO | Only set when the Task is scheduled. This is the cron expression defining the Task execution frequency (see XML example below). | - |
OrchestratedTask
The following table describes the properties of a single orchestrated task (see property orchestratedTasks
in the above table):
Property Name | Type | Mandatory | Description | Values (default value in bold) |
---|---|---|---|---|
taskId |
| YES | The identifier of the configuration of the orchestrated task, e.g. an identifier of | - |
taskType |
| YES | The type of the orchestrated task. Possible values are: | - |
taskStartsAfter |
| NO | If defined, the task must start after this time. This gives some margin so that other third-party operations can occur between task executions, e.g. some third-party customer job has enough time to upload on the platform a CSV file to import. The time zone to use with this local time is configured in the If not defined, the task will start immediately, right after the completion of its parent task. | - |
timeZone |
| NO | The time zone used for the above | UTC |
taskExecutionCondition |
| NO | If not defined, the orchestrated task will always run, even if the execution of its parent task failed. This is a complex type, whose structure is provided in the next table. | - |
TaskExecutionCondition
The following table describes the properties of an orchestrated task execution condition (see property taskExecutionCondition
in the above table):
Property Name | Type | Mandatory | Description | Values (default value in bold) |
---|---|---|---|---|
executeOnParentTaskFailure |
| NO | If true , this condition matches even if the parent task execution failed due to a "fatal" error. | true,false |
Example
Here is a sample XML representation of an Orchestrated Task:
REST API
Memority Syncronization service exposes the following orchestration REST API.