About Jumps Customizing Workflows

4-28 Application Administrators Guide for Content Server wfAddUserDist_Dept, alias Example 4–4 Condtional Token Rather than creating a jump script for the previous example, you could define a conditional token that adds the Dist_Dept alias whenever the Type is catalog. The token script would look like the following: if dDocType like catalog wfAddUserDist_Dept, alias endif Example 4–5 Token Specifying Management Chain Another common use for tokens is specifying the current users manager as a reviewer. The manager attribute must be specified as a user information field in the content server, or as a user attribute in an external directory such as LDAP or ADSI. The token script would look like: wfAddUsergetUserValueuManager, user

4.5.7 About Jumps

Jumps enable you to customize workflows for your system, your content, and your users. A jump is usually a conditional statement, written in Idoc Script. Typical uses of jumps include: ■ Specifying more than one metadata field as the criteria for entering a workflow. ■ Taking action on content automatically after a certain amount of time has passed. ■ Defining different paths for files to move through the same workflow depending on metadata and user criteria. ■ Releasing a workflow document prior to approval by using the side effect: Release document from edit state. The following is an example of a jump that exits the workflow if the author is sysadmin: if dDocAuthor like sysadmin wfSetwfJumpName, Entry step wfSetwfJumpTargetStep, wfExit0, 0 wfSetwfJumpEntryNotifyOff, 0 endif In most cases, a jump will include a conditional statement. However, you can create a jump that consists of non-conditional code, such as the following: wfSetcustom_wf_variable, new_value wfSetwfJumpTargetStep, step_1 You can use this type of jump to execute code or move a revision to another step automatically.

4.5.7.1 Jumps and Events

As mentioned in Events , each step in a workflow has an entry, update, and exit event. A script with one or more jumps can be defined for any or all of the events in a step. Any Idoc Script defined for an event is evaluated at a specific time that depends on the type of event: Managing Workflows 4-29 ■ An entry event script is evaluated upon entering the step. Every time a step is entered, a default script is evaluated in addition to any user-defined custom script. The default script keeps track of the number of times the step has been entered entryCount and the last time the step was entered lastEntryTs. If the entry event script does not result in a jump or exit, any users, aliases, and tokens are evaluated, and e-mail notifications are sent. ■ An update event script is evaluated and triggered by a state change of the content, such as the workflow update cycle, the update of the revisions metadata or approval or checkin of the revision. Extra exit conditions are evaluated each time the update event script is evaluated. ■ An exit event script is evaluated when a revision has completed the steps approval requirements and the steps extra exit conditions are met. By default, the workflow update cycle occurs hourly. This cycle time can be increased in increments of one hour using the WorkflowIntervalHours configuration setting, but cannot be reduced to less than one hour. To have update scripts evaluated more often or in response to other events, you could initiate a metadata update cycle without changing any metadata. Figure 4–4 Jumps and Events

4.5.7.2 Rejected Content

Within a single workflow, when a reviewer rejects a revision the content item is routed back to the most recent contribution step. However, when a jump is made to a sub-workflow or other workflow and content is rejected there, different behavior occurs. The process returns to the parent workflow, not to the previous contribution step. Important: Update and exit event scripts of the current step are not run when a revision is rejected. Any code that is to be evaluated upon rejection must be located in the entry event script for the step that the rejected file is sent to. 4-30 Application Administrators Guide for Content Server

4.5.7.3 Side Effects

Side effects are the actions that take place when a revision in a workflow step meets the jump condition. Side effects can include: ■ jumping to another step in the same workflow ■ jumping to a step in a sub-workflow or other Criteria workflow for Criteria workflows only ■ notifying users ■ exiting the workflow ■ setting state information in the companion file ■ releasing a workflow document prior to approval Side effects can be generated automatically by selections on the Script Properties Screen and AddEdit Jump Screen , and custom side effects can be specified in the Custom Effects field on the AddEdit Jump Screen .

4.5.8 Jump Variables and Steps