Operations That Call an Event Handler

The following table describes the operations that call an event handler.

Operation Description

Pause

The Pause operation saves the following information in Siebel database:

  • Task state and task instance.

  • An inbox item. The user can use this inbox item to restart the task instance.

Resume

The Resume operation restores the state and history of a task instance and resumes a paused task instance. The user can click a (task) inbox item in the Inbox Items List view to resume a task instance.

Cancel

The Cancel operation stops the task transaction. For more information, see Cancel Operation Events.

Delete

The Delete operation removes a task instance from the following items:

  • Inbox

  • Siebel database

If a parent task starts a task, then the subtask sends the parent task an Abort status. The task utility service creates this event.

Complete

The Complete operation ends the task instance in the following situations:

  • The user clicks Finish or Submit.

  • Siebel CRM finishes the task instance automatically.

When the task finishes, Siebel CRM starts the PostComplete event.

Post Complete

The PostComplete operation allows the task to do more work after it finishes running. The following examples describe how Siebel CRM uses the PostComplete operation:

  • A user runs a task that updates an account record. If the user submits the modifications to the account, then Siebel CRM passes the modifications and information about who modified the record as inputs to a business service. This configuration creates an audit trail on the account record.

  • A task instance finishes running and, after it has been submitted, a Workflow Process must run. This requirement makes sure no unwanted data exists. For example, a user can follow multiple paths in a task and create records in these paths. The user can navigate backward in the task and forward again down other paths. In this situation, a cleanup process that occurs at the end of the task session can eliminate unwanted data.

In these situations, it is important that the task instance finishes. The PostComplete event handler can handle a failure that occurs when Siebel CRM creates an audit trail or during cleanup. Siebel CRM does not abort this task instance.

Cancel Operation Events

The following table describes the (PreCancel and PostCancel) events that the Cancel operation uses.

Event Type Description Usage

PreCancel

The PreCancel event occurs in the context of the task, before the rollback.

This event handler can compensate for a modification that occurs in an external system.

The Cancel operation calls a PreCancel event before Siebel CRM rolls back temporary storage or before it deletes the task instance.

If the user cancels a task, then the PreCancel event handler starts before Siebel CRM rolls back the temporary storage of the Object Manager.

If the task includes a parent flow, then the parent flow receives an Abort status from the task.

Rollback does not occur before this event, so it can access the context data of a task. The context data includes the field values that existed before the rollback occurred that is part of the Cancel operation.

If an error occurs, then the task remains on the same view and displays an error in the Siebel client.

You can configure Siebel CRM to use the Pre Cancel event handler in the following situations:

  • If the handler fails, then the Cancel event must quit.

  • An external system must perform some action.

PostCancel

The PostCancel event occurs after the PreCancel event finishes, outside of the context of the task and after the rollback.

You can use the PostCancel event to compensate for the temporary storage data of the Object Manager that Siebel CRM saves to the Siebel database during a commit step.

The Cancel operation calls a PostCancel event after Siebel CRM rolls back the temporary storage due to the Cancel operation. The PostCancel event does not require access to temporary storage or the task context.

If an error occurs, then Siebel CRM navigates the user to the view that it displayed after the task cancelled or finished. It displays the next standard view regardless of whether the handler succeeds or fails.

You can configure Siebel CRM to use the Post Cancel event handler in the following situations:

  • If the handler fails, then the Cancel event must not stop.

  • Access to temporary storage is not required.