Workflow definition
A workflow is a set of tasks to be run, together with times, priorities, and other dependencies that define the processing order.
Optionally, you can schedule when the workflow runs by specifying run cycles such as calendar, set of dates, or repetition rules. Workflows can be defined in a specific smart workflow folder if you want to organize them by line of business or some other custom category.
Workflow definitions can be modified either before or after their run. When you update a workflow in the plan, the change affects all the following runs of that specific workflow in the plan. If you want to save a change to a workflow in the database, you must modify the workflow definition in the database.
- Triggers
- There are four main types of triggers that you can associate to a workflow:
- Services
- You can link a service to a workflow definition, and publish the service on the Self-Service Catalog.
- Run cycles
- A run cycle specifies the days and times when a workflow is scheduled to run. Run cycles are mutually exclusive with event triggers.
- Excluding cycles
- An excluding run cycle specifies the days and times when a workflow must not run. Excluding run cycles take precedence over run cycles. Excluding run cycles are mutually exclusive with event triggers.
- Event triggers
- Event triggers can contain either a single event or a collection of sequential or unordered events, for which can be specified correlations and timeouts. When an event trigger is satisfied, the workflow is submitted. Event triggers are mutually exclusive with run cycles and excluding run cycles.
- Time restrictions
- You can define time restrictions to control the processing of the workflow.
The type of time restriction that you can specify varies depending on the
item that you are defining:
- On tasks in workflows and workflows
-
- Earliest start time
- Latest start time
- Deadline
- On workflows
- Repeat range
- On task in workflows
-
- Minimum duration
- Maximum duration
- Dependencies
- To determine the correct processing order of tasks and workflows, you can define dependencies. A dependency is a condition that must be satisfied before the processing can continue. Dependencies can either be defined on completion of tasks and workflows, or on satisfaction of specific conditions by tasks and workflows.
- On completion of tasks and workflows
- A task or workflows cannot start until other tasks or workflows have completed successfully.
- On satisfaction of specific conditions
- You can define conditional dependencies to make a successor task or workflow run only after some conditions are satisfied by the predecessor task or workflow. If such condition is not satisfied, the tasks in the flow do not run and are put in SUPPR status. The behaviour of regular dependency is different, because tasks are put in HOLD status until the predecessor is in SUCC status.
A set of dependencies can be grouped into a join condition. You can specify the number of dependencies that must be satisfied to consider the join condition as fulfilled, or you can define that all the dependencies must be satisfied to let the successor task run.
Dependencies can be of the following type:- Internal dependencies
- Dependencies between tasks in the same workflow.
- External dependencies
- When a dependency is external, the successor depends on
the predecessor instance that is identified through the
matching criteria. External dependencies can be between:
- Workflow instances
- Workflows and tasks that belong to other workflow instances
- Tasks that belong to different workflow instances.
- Tasks
- You can add any number of tasks to a workflow. Tasks can either be an embedded task, or they can reference a task template.
- Validity
- You can specify from which date a workflow definition is valid by using the validfrom keyword. For more information, see Validity keywords
- Confirmation required
- To control the processing of a task, you can set an option to requires confirmation in a task in workflow definition. By setting this option, a task cannot be marked as successful or failed until you provide confirmation.