Initially, using another task the Create Workflow Job tool is used to create a Workflow Job.
When a ‘Workflow Job Trigger’ step is configured, the appropriate Workflow Job is selected which will expose its data fields so information can be stored by variables for use in later steps.
For an overview about Workflow and how it works, please see the following link:
Table of Contents
Using the Workflow Job Trigger tool
Before the task step is configured, if any key information is to be made available to other steps in the task then variables must be created to hold the results.
In this case, it is the data fields created during the Workflow Job creation task that the variables will be mapped to.
- Start by creating two variables called Action and Username (if required).
- Variables are created in the task brower. Select the Environments tab, locate the Variables node and right click to select New
- The following dialog will be displayed. Provide an appropriate name for the variable and a description if required. Below is an example:
- Select the Details tab to configure the variable as follows:
The variable should always be created as a Parameter type which allows the variable to have data mapped to it.
The Scope must be set to Task Instance which means that data held in the variable only exists during a single task run and then reset. If Task is selected the data held in the variable is persisted across multiple runs of the task. This only works with numerical values where a variable is used as a counter, therefore not applicable in this case.
Configuring the Step
The Workflow Job Trigger tool is dragged from the task browser under Event tools and into the task planner. This will automatically open the General tab where a name and description can be provided.
Within the Main tab a connection to a workflow job is first established. Using the Workflow Agent drop down list a web server that the agent exists on is selected, a workflow job is then selected by using the Source Workflow Job drop down list.
A filter is then created which is applied to a data field of the workflow job, this will cause the task to run when the criteria is met. Variables are then mapped to the data fields to store information.
Workflow Agent (drop down list)– Displays a list of all available Web Servers that have the Workflow Agent present.
Source Workflow Job (drop down list)– Displays a list of all Workflow Jobs available when a web server has been selected.
Filters (table)– This area contains all active filters in place which are looking for specific criteria to trigger the task. Filters can be added, edited and removed.
Any of the above (check box)– If selected, if any one of the filter conditions are met then the task will be triggered to run.
All of the above (check box) – If selected, all of the filter conditions have got to be met before the task is triggered to run.
Mapping (table) – This area displays created task variables and is used to map the variables to data fields in the workflow job so data can be stored. The Parameter column contains a drop down list where a data field is selected, the drop down list will only become populated when a workflow job has first been selected.
Creating a Filter
- Select Add to display the Filter PropertiesHere a filter is placed on a specific data field contained within the workflow job. The name of the data field refers to the Name value that was given to the field during the workflow job creation.When the form is submitted the filter is applied to the data field and if the conditions are met the task is triggered to run.
Form Field – A drop down menu that displays a list of available fields for selection to be used by the filter.
Filter Mask – Text is manually entered to tell the filter what to search for.
Case Sensitive Match – Selecting this option will allow the text search to be case sensitive.
- Using the Form Field drop down menu select the required field to apply a filter to.Note: Notice how 2 additional fields will be present; Action and Username. Action holds the ‘Name’ value of a data field where the type is ‘Submit’, if your workflow job has submit buttons to complete and close the job then they are known as an Action. Username holds the information of who submitted the workflow job.
- In the Filter Mask text box specify what the filter is going to search for and decide if it needs to be a case sensitive match.Note: If you want the filter to trigger the task based on any value present in the data field then just use an asterisk (*)
- Select OK to close. The created filter will now appear in the Filters table.
Note: The above example screenshot shows a filter that has been placed on a workflow job called On Hold Override. It is triggered when a Submit button in the workflow job is selected, submit is known as an Action. Variables are applied which extract the values present in the data fields of the submitted workflow job.
This completes the Workflow Job Trigger step. A filter has been created on a Workflow Job and variables mapped to the data fields to store key information.
To read about tasks which make use of this tool see: