Catalog Task workflow activity

The Catalog Task activity creates a service catalog task record.

A user must complete the catalog task. This activity is available only for workflows running on the Catalog Request Item [sc_req_item] table.

Results

You can assign a result value using activity.result from within a script field of the activity. The final State value of the catalog task record determines the result value for the Create Task activity. Possible result values are:
  • Closed complete
  • Closed incomplete
  • Closed skipped
  • Deleted
  • Cancelled

Input variables

The following variables determine the behavior of the activity.
Table 1. Catalog Task activity input variables
Field Description
Priority The Priority that is assigned to the task.
Wait for completion If selected, the workflow activity waits for the task to complete before continuing. If cleared, the task is created but the workflow proceeds.
Due date based on The due date fields are used to determine the values to use for setting Expected Start Time and Due Date for the task. The type determines how the due date is computed:
  • A user specified duration: The duration is based on a user specified value.
  • A relative duration: The duration is calculated from a relative duration (such as End of Next Business Day).
  • A date/time or duration field: The duration is based on the value of a field on the current record.
  • Script: The duration is returned by a script.
Duration The specific number of days and hours. This field is available only when Due date based on is A user specified duration.
Relative duration The general number and length of business days. This field is available only when Due date based on is A relative duration.
Due date field The date/time or duration field. This field appears when the Due date based on is A date/time or duration field.
Due date script The script that sets 'answer' to the number of seconds for the duration. This field is available only when Due date based on is Script.
Schedule based on The basic schedule the timer uses to count working hours. If a schedule is specified, the duration will only be considered for times that are specified on the schedule. For example, if the duration is 2 hours and the workflow begins at 4:00pm on a schedule that is 8am - 5pm, then it ends at 9:00am the next day. The options are:
  • This workflow's schedule: The schedule uses workflow context date, time, and an optional Time zone based on value.
  • A specific schedule: The schedule uses a pre-defined Schedule and an optional Time zone based on value.
  • A schedule field: The schedule uses a value from a table and an optional Time zone based on value.
Schedule The predefined Schedule from a list. This field available only when Schedule based on is A specific schedule.
Schedule field A date and time or duration field for the schedule, that is associated with the table. Valid fields appear in blue on the Select the element from a tree dialog. This field is available only when Schedule based on is A schedule field.
Time zone based on The time zone for calculating the duration. The time zone may be based on:
  • No time zone: Default. Workflow uses the GMT time zone.
  • A specific time zone: A predefined Time zone.
  • A time zone field: A Time zone field to track time duration from a field on the form.
Time zone The predefined time zone. This field is available only when Time zone based on is A specific time zone.
Time zone field A date and time or duration field for the schedule, that is associated with the table. Valid fields appear in blue on the Select the element from a tree dialog. This field is available only when Time zone based on is A time zone field.
Task value from The values used to create the task may either come from:
  • Fields: a predefined set of fields including Fulfillment group, Assigned to, Short description and Instructions.
  • Template: an existing template for the selected task table.
  • Values: values that you specify using a Set Values widget.
Fulfillment group The group that is responsible for completing the task.
Assigned to The user that is responsible for completing the task.
Short description A short description for the task.
Instructions The task instructions for the user to complete prior to closing the task. These instructions appear in the Description field.
Advanced If selected, the Advanced script is called to allow for additional task values to be set.
Advanced Script Set additional values for the task in this script. Use the variable task when setting additional values. This script is run after the task values are set using the Fields, Template or Values you have specified. For example:

task.short_description = current.short_description;

Variables on Task Form A slush-bucket of optional catalog variables to include. The variables here are displayed in the Catalog Task form in a field called Variable Editor. If no variables are defined in the field on the Catalog Task activity, the Variable Editor field in the Catalog Task form is not visible.

States

The activity state tells the workflow engine what to do with the activity.
Table 2. Catalog Task activity states
State Description
Executing The workflow engine knows to start the onExecute function of the activity.
Waiting The workflow engine ignores the activity until a specific event to restart the activity is fired.
Finished The activity finished running. See the result value for the outcome of the activity.
Cancelled This activity, or the workflow that contains this activity, was canceled.
Error A JavaScript error occurred. Review the logs for error details.