Skip to main content

Sequence Tasks

Sequence Tasks are the building blocks of a Sequence Job. Each Task represents a discrete unit of work, such as running a script or an existing JAMS Job or controlling execution flow.

Tasks run top-to-bottom by default; use Parallel, Set Event, and Wait for Event tasks to create branching or concurrent execution.

The sections below describe the available Tasks based on the groups in the Tasks List within the Sequence Builder. All Tasks have a Display Title property that lets you enter text to identify the Task in the design area. Additional properties are available based on the selected Task.

Types of Tasks

Task TypeUseKey Tasks
JAMS TasksYou need to submit existing JAMS Jobs and control if the Sequence Job continues or branches when a Job fails.Submit Job, Failure Action
Control Flow TasksYou need to run steps in a specific order or in parallel.Sequence, Parallel
Coordinator TasksYou need to synchronize steps across parallel branches.Set Event, Wait for Event, Clear Event
Windows TasksYou need to run PowerShell or Command shell scripts.PowerShell, Command

JAMS Tasks

Overview

Use JAMS Tasks to submit/manage existing JAMS Jobs within a Sequence and control if the Sequence Job continues or branches when a Job fails. The Submit Job is the most common task type because it allows a Sequence to orchestrate multiple Jobs, control when they run, pass parameters between them, and determine how the Sequence responds to each Job's outcome.

Adding a Submit Job Task

The Submit Job Task is used to submit a Job that may or may not be in another Sequence. You can use this Task to reference another existing Job in JAMS, providing maximum flexibility when using Sequence Jobs.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the Submit Job task onto the canvas area of the Source tab.
  3. On the Submit Job task, click to set the Job properties.
  4. Under Display Title, enter a name for this Job.
  5. Under Submit Job, click Browse and navigate to the Job that you want to run.
  6. Click Select.
  7. Optional - Set any additional properties as needed to schedule the Job or override properties. You can also modify the Parameters for the Job. See the table below for more information.
  8. Click Save.
    The Submit Job Task appears in the design area labeled with the Display Title you entered. The referenced Job will run as part of the Sequence when the Sequence Job executes.

Submit Job Properties

PropertyDescription
Display TitleEnter the text to identify the Task in the design area.

Note: As a best practice, ensure that the Display Titles for Submit Job Tasks are unique. Otherwise, the Parameters for Tasks with the same Display Titles will be grouped together in the Submit Job window.
Submit JobSelect the Job that will be run for the Submit Job Task.
Schedule
Only Submit OnSelect the only dates that the Job will run. Unlike Schedule For Date, this option skips the Job entirely if the date does not match; it does not reschedule it. For example, if this value is set to Monday and the Job is submitted on Tuesday, the Job will not run. Examples include workdays, weekdays, daily, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, 1st Friday of the month, 1st day of the month, and last day of the month.
Schedule For DateSelect the dates that the Job will run. For example, if the Sequence runs every Monday and the value for this property is set to Tuesday, the Job will run on Tuesday. Examples include workdays, weekdays, daily, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, 1st Friday of the month, 1st day of the month, and last day of the month.
Scheduled TimeEnter the time of day that the Job should start, such as 5:00 PM.
Scheduling PriorityEnter the priority for the Job that is used when two Jobs are scheduled at the same time. The Job with the higher number has the higher priority and will run first. Values can be between 0 and 1000.
Submit On HoldWhen this option is selected, the Job is put on a manual hold and will not run when the Job is submitted. The Job will need to be released in the Monitor or from an API call. By default, this option is not selected.
Exceptions
Except For DateSelect the dates that the Job will not run. Examples include workdays, weekdays, daily, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, 1st Friday of the month, 1st day of the month, and last day of the month.
Options
Override Job NameEnter the name to display for the Job in the Monitor view rather than the name in the Job Definition. This is useful if the same Job is submitted using different parameters and the Job needs to have a unique name in the Monitor.
Prompt for Parameter ValuesWhen this option is selected, the Parameters are displayed in the Submit screen when the Sequence Job is manually submitted. By default, this option is disabled.
Use ParametersWhen this option is selected, JAMS finds Parameters on the Sequence Job that match the names of Parameters on the Job being submitted and uses the values from the Sequence Parameters.
WaitWhen this option is selected, the Sequence waits for this Job to complete before continuing to the next Job/Task. By default, this option is enabled. Review the following when using the Wait property:
  • If subsequent Jobs are dependent on prior Jobs completing first, the Wait property should be selected.
  • Sequences will continue to show “Executing” in the Monitor until all child Jobs complete. If you want to know when a Sequence is running longer than normal, set a runaway event with a notification on the Sequence.
  • To have a Sequence continue to subsequent steps if a step fails, wrap any Jobs in a failure action rather than clearing the Wait property.
  • Rather than clearing the Wait property, you can also remove the Job from the Sequence and run it separately.
Ignore State ChangeWhen this option is enabled, any changes to the state of this Job are ignored and not displayed in the Monitor view. For example, if a Submit Job Task submits another Sequence entry, if the child Sequence is halted, the icon in the parent Sequence should reflect this. By default, this option is enabled.
Depends On
Completion SeveritySelect the severity that the Job must have for the Sequence Job to continue. If the Job does not have this severity, the Sequence will halt.
Log
Log File NameEnter the location where the submitted Jobs log file is saved. Changing this value lets you change the default location for this file. It has the same effect as using the LogFileName argument in the Submit-JAMEntry PowerShell cmdlet.
Parameters
ParametersReview the collection of Parameters that is used when the Job is submitted. These are the Parameters in the Job Definition.
Overridable Properties
AgentSelect the Agent where the Job will execute when the Job is submitted.
Batch QueueSelect the Batch Queue that will be used when this Job is scheduled.
CalendarSelect the Calendar to use for scheduling. When a Calendar is listed, the Job will have access to the Date Types, such as holidays, in the Calendar.
Retry CountEnter the maximum number of retry attempts if the Job fails.
Retry IntervalEnter the time interval, in Delta Time, between automatic retry attempts.
Execute AsSelect the Credentials the Job will execute as when it is submitted.
Home DirectoryEnter the full path to the initial current directory for the Job.
Notify E-MailEnter the email address that is combined with the addresses in any email notification event.

Adding a Failure Action Task

Use Failure Action Tasks to define how the Sequence behaves when a Job or Task fails. Wrapping a Task in a Failure Action is the recommended approach when you want a Sequence to continue past a failure or trigger alternate steps rather than clearing the Wait property on a Submit Job Task, which can cause unintended behavior.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the Failure Action Task onto the canvas area of the Source tab.
  3. On the Failure Action Task, click to set the properties.
  4. In the Failure Action drop-down menu, select Fail or Continue to set the behavior for the Sequence Job when a child Task fails.
  5. Click Save.
  6. Drag and drop a Task/Job to monitor for failure into the Failure Action Task.
  7. Click Save.

Failure Action Properties

PropertyDescription
Display TitleEnter the text to identify the Task in the Design Area.
Failure ActionSet the desired behavior if a child Task within the Failure Action Task fails. Select one of the following:
  • Fail to have the Sequence Job fail.
  • Continue to have the Sequence Job continue.
  • NotSpecified to have the Sequence Job fail.

Control Flow Tasks

Overview

Control Flow Tasks let you run Jobs/Tasks sequentially or in parallel. Use Sequence Tasks to nest ordered steps within a larger flow. Use Parallel when steps are independent and you want them to run simultaneously to save time.

Adding a Sequence Task

The Sequence Task is used to organize Jobs and tasks to run in a sequential order. You can nest a Sequence within a Sequence to group related steps and keep the design area organized.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the Sequence Task onto the canvas area of the Source tab.
  3. On the Sequence task, click to set the properties.
  4. Under Display Title, enter a name for this Sequence Task.
  5. Click Done.
    The Sequence Task appears in the design area labeled with the Display Title you entered.
  6. Drag and drop other Tasks into the Sequence Task as needed to build your Job.
  7. Click Save.

Adding a Parallel Task

The Parallel Task is used to group Tasks to run at the same time and in parallel.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the Parallel Task onto the canvas area of the Source tab.
  3. On the Parallel task, click to set the properties.
  4. Under Display Title, enter a name for this Parallel Task.
  5. Click Done.
    The Parallel Task appears in the design area labeled with the Display Title you entered.
  6. Drag and drop other Tasks into the Parallel Task as needed to run them at the same time.
  7. Click Save.

Sequence and Parallel Properties

PropertyDescription
Display TitleEnter the text to identify the Task in the design area.

Coordinator Tasks

Overview

Use Coordinator Tasks to control execution order across parallel branches in a Sequence. Set Event, Clear Event, and Wait for Event work together to signal when a branch has completed and allow dependent Tasks to proceed. This is useful when you need one branch to wait for another before continuing, without stopping the entire Sequence.

Example:

Two parallel branches are running. Branch A processes a file; Branch B should only begin after Branch A finishes. Place a Set Event task named "FileReady" at the end of Branch A and a Wait for Event task named "FileReady" at the start of Branch B. If the event name will be reused across Sequence runs, add a Clear Event task to reset it.

Notes:

  • Task order matters. The Set Event task signals the event at the point in the Sequence where it is placed. A Wait for Event task that appears before the Set Event task in the flow will block until the Set Event task runs. Plan the order of tasks in your Sequence carefully. The Clear Event task must be placed after the Wait for Event task that consumed the event, and before the next Set Event task that will signal it again. Placing it out of order can cause the Sequence to behave unexpectedly. For example, clearing an event before a Wait for Event task has a chance to respond to it.
  • The event name must be consistent. The Set Event and Wait for Event tasks communicate through the event name. If the names do not match exactly (ignoring case), the Wait for Event task will not respond to the signal.
  • Reusing events. If you need to use the same event name more than once in a Sequence, use a Clear Event task to reset the event between uses. Without clearing, a Wait for Event task that references an event that has already been set will run immediately without waiting.
  • Already-completed events do not block. If the Set Event task has already run before execution reaches the Wait for Event task, the Wait for Event task runs immediately. This allows the Sequence to proceed without requiring precise timing between branches.

Adding Set Event

A Set Event task creates a named event signal within a Sequence Job. When the Set Event task runs, it broadcasts that signal to any Wait for Event task in the Sequence that is listening for the same event name. Use a Set Event task when you need one branch of a Sequence to trigger or unblock another branch based on a condition you define.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the Set Event Task into the Sequence container in the design area.
  3. On the task, click to set the properties.
  4. Optional - In the Display Title field, enter a label to identify this task in the design area. The Display Title does not affect execution. It exists only to make the canvas easier to read.
  5. In the Event Name field, enter a name for the event. This name is not case-sensitive and must match the event name you enter in any corresponding Wait for Event task.
    Choose a descriptive name that reflects what the event represents, such as RegionA_Complete or FileReady. A clear naming convention makes the Sequence easier to maintain, especially when the same event is reused across multiple places in the flow.
  6. Click Done.
  7. Click Save.

Adding a Wait Event

A Wait for Event task pauses execution of the Sequence at a specific point until a named event is signaled by a Set Event task. Use a Wait for Event task when a step in your Sequence must not proceed until a separate branch or earlier step has completed and signaled its completion.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the Wait for Event Task into the Sequence container in the design area.
  3. On the task, click to set the properties.
  4. Optional - In the Display Title field, enter a label to identify this task in the design area. The Display Title does not affect execution. It exists only to make the canvas easier to read.
  5. In the Event Name field, enter the name of the event to wait for. This name must match the event name defined in the corresponding Set Event task. The name is not case-sensitive.
    If the Set Event task has already completed by the time execution reaches the Wait for Event task, the Wait for Event task runs immediately and does not block. This is by design and allows Sequences to handle timing differences between branches without deadlocking.
  6. Click Done.
  7. Click Save.

Adding a Clear Event

A Clear Event Task resets a named event that was previously signaled by a Set Event Task. Use a Clear Event Task when you need to reuse the same event name at more than one point in a Sequence. Without clearing, a Wait for Event Task that references an event that has already been set will not block. It will run immediately, which can cause steps to execute out of order.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the Clear Event Task into the Sequence container in the design area.
  3. On the task, click to set the properties.
  4. Optional - In the Display Title field, enter a label to identify this task in the design area. The Display Title does not affect execution. It exists only to make the canvas easier to read.
  5. In the Event Name field, enter the name of the event to reset. This name must match the event name used in the corresponding Set Event Task. The name is not case-sensitive.
  6. Click Done.
  7. Click Save.

Properties

PropertyDescription
Display TitleEnter the text to identify the Task in the Design Area.
Event NameEnter the name for the event.

Windows Tasks

Windows Tasks allow you to run PowerShell scripts or Windows Command scripts directly within a Sequence Job without needing a separate Job definition. Use these Tasks for lightweight scripting steps where creating a standalone Job would add unnecessary overhead.

Adding a PowerShell Script Task

Use the PowerShell Task to run inline PowerShell scripts directly within a Sequence Job without needing a separate Job Definition. This is useful for lightweight scripting steps, such as data transformation, variable manipulation, or calling APIs where creating a standalone Job would add unnecessary overhead. Output from the script can be captured in a variable and passed to subsequent Tasks.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the PowerShell Script Task into the Sequence container in the design area.
  3. On the task, click to set the properties.
  4. Optional - In the Display Title field, enter a label to identify this task in the design area. The Display Title does not affect execution. It exists only to make the canvas easier to read.
  5. In the Script field, enter your PowerShell code.
  6. Enter any PowerShell input or output variable for this script.
  7. Click Done.
  8. Click Save.

Properties

PropertyDescription
Display TitleEnter the text to identify the Task in the Design Area.
ScriptEnter the PowerShell script that will run.
Input VariableEnter the PowerShell variable that will be the input to this command or script.
Output VariableEnter the PowerShell variable that will be set to the pipeline output of this command or script.

Adding a Command Line Script Task

Use the Command Script Task to execute Windows commands using the Command shell directly within a Sequence Job. This Task functions the same way as the Windows Command Job in JAMS, making it a familiar option for teams already using Command-based Jobs.

  1. Open the Source tab of the Sequence Job.
  2. Drag and drop the Command Line Script Task into the Sequence container in the design area.
  3. On the task, click to set the properties.
  4. Optional - In the Display Title field, enter a label to identify this task in the design area. The Display Title does not affect execution. It exists only to make the canvas easier to read.
  5. In the Script field, enter your code.
  6. Click Done.
  7. Click Save.
PropertyDescription
Display TitleEnter the text to identify the Task in the Design Area.
ScriptEnter the script that will run.