Creating an Automatic Activity in a Process Definition
An Automatic Workflow Activity is an Activity consisting of script code performed by Content Manager, and requires no user input. In Workflow Designer, create one by dragging a shape onto the work area and specifying properties. You can also specify expiration script code for the Activity.
Procedure
- Add an Automatic Activity to the Process Definition by dragging and dropping one of the following SDL Tridion Workflow Shapes from the stencil window to the work area:
Shape Description Automatic Activity: the Activity script code contains logic to perform the Activity. Automatic Decision Activity: the Activity script code contains logic to perform the Activity, and to decide what the next Activity will be. If this is the first Activity of a Process Definition, and the Process is applied to a classic editing workflow, the Activity cannot be Automatic.
- Double-click the shape in the work area.
An Automatic Activity Properties dialog opens.
- Set the following mandatory properties:
- Title
-
The name of this Activity Definition as it will appear to the user.
- Description
-
A description of the Activity Definition as it will appear to the user.
- Specify the Activity script to execute in order to perform the Activity:
- Script Type
-
The type of script:
- Select C# to edit C# code directly in Workflow Designer.
- Select External Activity to refer to an external .NET assembly, uploaded to a Template Building Block.
- Edit Script
-
Opens a dialog in which you can enter Activity script code (actual code or a .NET assembly reference).
- Optional: Under Approval Status, select the status that you want the items related to this Activity to have, after the Activity is finished.
- Optional: To constrain what the Activity script can and cannot do as part of this Activity, select options in the Constraints area:
- Deny items to be added/removed
-
Prohibits the script from adding or removing items in the Process.
- Deny Subject(s) to be edited
-
Prohibits the script from editing content items associated with the Activity.
- Deny Bundle metadata to be edited
-
Prohibits the script from editing the metadata of a Bundle associated with the Activity.
- Optional: To set, or to allow the script to set, a time constraint on this Activity, select options in the lower half of the dialog:
- Allow to override due date
-
If selected, this option allows the script to do one of the following:
- If no period is specified under Expires in, the script can set a due date for the specific Activity Instance.
- If a period is specified, the script can change the due date of the Activity Instance.
- Expires in
-
The maximum amount of time allotted for this Activity. The time starts running when the Activity is assigned, and stops when the Activity is finished. Specify the amount of time in minutes, hours, days or weeks. A value of 0 indicates that the Activity has no time limit. You can calculate the default due date for the Activity: this is the moment of assignment + the amount of time specified here.
- If either Allow to override due date is set or if Expires in is set to a value higher than 0, you can tell Content Manager to execute an expiration script when the due date for the Activity has expired:
- Expiration Script Type
-
The type of script:
- Select C# to edit C# code directly in Workflow Designer.
- Select External Activity to refer to an external .NET assembly, uploaded to a Template Building Block.
- Edit Expiration Script
-
Opens a dialog in which you can enter expiration script code (actual code or a .NET assembly reference).
- Click OK to create the Activity.