Managing signal and wait tasks

Signal and wait tasks can work together to coordinate multiple deployments in enterprise-wide release events.

Signal tasks and wait tasks are task types. Signal tasks notify, or signal, waiting wait tasks. Wait tasks cannot finish until they receive signals from associated signal tasks. Generally, each signal task is associated with at least one wait task, and wait tasks are associated with one or more signal tasks. Typically, you create dependencies for signal and wait tasks with other tasks, and in this way you can coordinate large deployments, or multi-deployment events. For example, if you make a manual task dependent on a wait task, the manual task cannot start until the wait task receives a signal. And if the signal task is in another deployment, you can orchestrate multiple deployments simultaneously.

When you create a signal task, you specify the task's checkpoint. You can select an existing checkpoint, or create one. In the same way, when you create a wait task, you select its checkpoint. A checkpoint is an object that maintains the state of associated signal and wait tasks. Except for selecting them when you create signal and wait tasks, you do not have to manage checkpoints. To be effective, each signal task has a corresponding wait task. To put it another way, each checkpoint must have at least one signal task and at least one wait task associated with it.

The order in which you create signal and wait tasks does not matter. You can create a signal task and then a corresponding wait task, or you can create the wait task first. If a deployment has a signal task without a corresponding wait task, or vice versa, the task is skipped.

Signal tasks, like automatic tasks, automatically start as soon as they are eligible. Started signal tasks immediately signal the associated checkpoint, and their status changes to Finish. A wait task has a status of In Progress as soon as it is eligible to receive signals. After a wait task receives signals from all associated checkpoints, its status changes to Finish. Otherwise, a wait task maintains a status of In Progress while it waits for signals. Tasks that depend on wait tasks can start when the wait task's status changes to Finish. The process flow for signal and wait tasks is shown in this figure.

Signal and wait task process flow

The scope of signal and wait tasks depends on whether the parent release contains an enterprise-wide event associated with it. If the release does not have an enterprise-wide event, wait tasks can wait for signal tasks within the current deployment. If the release does have an enterprise-wide event, signal tasks represent global checkpoints and waiting tasks can wait for signals from any deployment that participates in the event. For information about managing enterprise-wide release events, see Managing enterprise release events.

Note: You can also do most of these steps on the Execution and Deployment Plan page when you run a deployment. You can add tasks and segments to a deployment while the deployment is running. Changes that are made during a deployment are preserved in the deployment plan that directs the deployment.
  1. From the IBM® UrbanCode™ Release dashboard, click Releases & Deployments, and then click Deployment Plans.
  2. On the Deployment Plans page, click the name of the deployment plan.
  3. On the plan page, click the Add Task icon for the segment where you want to add the task, and then select Signal Task.
    The Add Signal Task dialog box is displayed.
  4. Use one of the following options to configure the signal task:
    • Select Use Existing Checkpoint, and then, in the Existing Checkpoint list, select a checkpoint. When you use this option, the Existing Checkpoint list contains all previously defined checkpoints.
    • Select Create New Checkpoint, and then, in the New Checkpoint Name field, enter a name for the new checkpoint.
  5. Click Save.
    The signal task is inserted into the segment. If you created a new checkpoint, it is saved to the global list of checkpoints, and it is immediately available for other signal and wait tasks to use.
  6. To create a wait task, click the Add Task icon for the segment where you want to add the task, and then select Wait Task, and then repeat steps 5 and 6.
  7. Optional: To add a task tag to the task, complete these steps.
    1. In the Edit Task window, click the Task Tags icon, add task tags.
    2. In the Task Tags dialog box, select the tag.
      You can select multiple tags.
    3. Optional: To create a tag, click Edit Tags, and then click Add New.
      In the Name field, type a name for the tag, select a color, and then click Save.
    4. Click Save.
      The tag is added to the task.
    5. Optional: Click the Delete icon for a tag to remove it from the task.
    Tags can be viewed from deployment plan page. You have the option to view or hide task tags using the View Tags / Hide Tags toggle switch at the top of this page.
  8. Optional: By default, tasks are available for all environments and all deployments that are associated with the release. To change this pattern, complete these steps:
    1. On the Edit Task page, click Environments.
    2. In the Pattern area, select one of these options to change the task frequency:
      • Always Run, to make the task available for every deployment.
      • Run Once Per Environment, to restrict the task to one deployment per environment.
    3. Select environments for the task.
      The task is active for the selected environments. By default, the task is active for every environment that is associated with the release. Tasks that are not active for an environment have the Not Applicable status, , when you deploy to an ineligible environment. You can override the status when you run a deployment by reopening the task.
  9. Optional: To add attachments to a task, complete the following steps:
    1. On the Add Task page, click Attachments, and then click Add Attachment.
    2. In the Add Attachment window, click Browse, and then select a file.
    3. Optional: In the Description field, describe the attached file.
    4. Click Save.
      The file is attached to the task and listed in the Attachments tab. To remove an attachment, click Delete.
    To see an attached file, click the file name. Depending on the file type, you are prompted to choose an application with which to open or view the file.

    By default, task attachments are stored in the ucr_installation/attachements directory. You can change the default location by modifying the attachments.folder.path property in the ucr_installation/conf/ file. For example, attachments.folder.path=/my_folder/my_attachments.

The task is added to the deployment plan at the bottom of the task list for the selected segment. The task is assigned a task number based on the segment and the task's position in the segment. Reposition a task by clicking and holding the mouse over the task and dragging it to another location. Tasks can be reordered within a segment or moved to other segments. After you move a task, the task numbers are updated to reflect the current task order.
Moving a task

To edit a task, click the action icon for the task, and then select View/Edit, . After a task starts, the Comments tab becomes available on the Edit Task window where you can view or add comments about the task. You can add dependencies between tasks. A task that depends on another task cannot start until the prerequisite task is resolved. To manage task dependencies, see Managing dependent tasks.