Upgrading a single-triggered task to be multi-triggered
Upgrade your duplicated single-triggered tasks to one single task with multiple
triggers.
You may have duplicated a task for each of the triggers you need to use for this task. You
do not need to do this anymore. You can now directly define these triggers for a schedule
and apply that schedule to this task.
Information noteNote: When you edit the schedule of a single-triggered task in the
UI, this task is converted to multi-triggered. Once done, you need to use
GET /executables/tasks/{taskId}/schedule endpoint to get task
schedule details.
Once generated, a service account token expires after 30 minutes. If it expires,
generate a new token using the POST method at the
endpoint
https://api.<env>.cloud.talend.com/security/oauth/token.
For more information about generating a token, see Generating a service account token.
You must know the ID of the task you need to associate the schedule.
In Talend Management Console, this ID is displayed on the dedicated page of this task. For example:
Or you can obtain task IDs via the following API request:
Ensure that the user or the service account to be used have the
TMC_OPERATOR role and the EXECUTOR permission
for the workspace to which the task to be updated belongs.
Procedure
Get existing triggers of the task instances that you need to upgrade to be one
single multi-triggered task. To do this, issue the following API request for each of
the task instances.
Simulate upcoming events to be triggered by that schedule and assign this schedule
to your task. For further information about the whole procedure, see Using a schedule to organize your task runs.
This task could be a new instance duplicated from the above-mentioned task
instances or simply one of those task instances. This new schedule and its
triggers replace any existing triggers of the target task.
Remove all duplicate tasks since they are not useful anymore.
Results
Once done, your task contains all the time triggers that once needed to be added each
for a duplicated instance of the task.
You can issue a GET request to
https://api.<env>.cloud.talend.com/orchestration/executables/tasks/<taskId>/run-config
to check the response. In the Trigger object, the type
field now displays
MULTIPLE.