Working with triggers

Triggers are scripts that are fired (executed) when an event occurs.
Consider these examples:
  1. An email notification trigger is fired when a CR is assigned to a user.

    This type of trigger is a post-transition script that is run asynchronously: it runs after the transition event occurs. The user is not required to wait while the execution finishes.

  2. A task verification script checks that all associated tasks are completed before a CR can be resolved.

    This type of trigger is a pre-transition script that is run asynchronously: it runs when the transition event is initiated but before being completed. The user must wait while the scripts execute. Also, if the verification fails, completion of the event (transitioning of the CR) does not occur.

Triggers are attached to events in the lifecycle. They are started with the following syntax:

[async|verify:]executable script_file [arguments]

For example:

async:perl crAssignEmail.pl

bsf transition_associated_tasks.js task_deferred

verify: bsf verify_associated_task_states.js completed excluded deleted

You must put trigger files in the following directory:

CHANGE_APP_HOME/WEB-INF/wsconfig/triggers


Feedback