Siebel Business Process Framework: Task UI Guide > Reference Materials for Siebel Task UI > About Event Handling >

Operations That Call an Event Handler


This topic describes operations that call an event handler.

Pause Operation

The Pause operation saves the following information in the Siebel database:

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

Resume Operation

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 Operation

The Cancel operation stops the task transaction and rolls back the modifications that Siebel CRM saved before the user cancelled this task instance.

Events That the Cancel Operation Uses

Table 24 describes handling for the PreCancel and PostCancel events.

Table 24. Handling for the PreCancel and PostCancel Events
Event Type
Description
Usage

PreCancel

Note the following:

  • The PreCanncel event occurs in the context of the task UI, 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 UI 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

Note the following:

  • The PostCancel event occurs after the PreCancel event finishes, outside of the context of the task UI, 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.

Delete Operation

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

  • Inbox
  • Siebel database

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

Complete Operation

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

  • The user clicks Finish or Submit.
  • Siebel CRM finishes the task instance automatically.

If the task finishes, then Siebel CRM starts the PostComplete event.

PostComplete Operation

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

  • A user runs a task UI 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 submittal, a workflow process must run. This requirement makes sure no unwanted data exists. For example, a user can follow multiple paths in a task UI and create records in these paths. The user can navigate backward in the task UI 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.

Siebel Business Process Framework: Task UI Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.