Siebel Business Process Framework: Workflow Guide > Options for Configuring a Workflow Process > Setting the Workflow Mode Property >

Options for an Interactive Workflow Process


This topic includes the following topics:

For examples of an interactive workflow processes, see the following topics:

About the Synthetic Event

A synthetic event is a run-time event that controls navigation for a workflow process. Examples of synthetic events include Suspend, Resume, Next, and Back. To control navigation, the Workflow Engine interprets these synthetic events to navigate the user backward or forward through a workflow process, or to pause or resume a workflow process. For example, assume the Siebel client includes an Account Note view that includes an Account Entry Applet, and that this applet includes Back, Next, and Save synthetic events. These buttons allow the user to move forward or backward from the Account Note view, or to pause an interactive workflow process, and then return to it later to resume the workflow process.

You can define buttons, and then associate methods in the interactive workflow process to these buttons. For example, to configure the Next synthetic event, you associate a method with an outgoing connector on a user interact step. You set the method name of the synthetic event in the MethodInvoked property of the button control.

Comparison of a Synthetic Event to a User Event

A synthetic event differs from a user event:

  • A user event is internal to Siebel Workflow. Siebel CRM uses it only to resume a workflow process from the Workflow Process Manager server component. It uses a user event only in a long-running workflow process.
  • A synthetic event is a run-time event that Siebel CRM uses to resume a workflow process from the Application Object Manager where it creates the synthetic events. Siebel CRM can use a synthetic event only with an interactive workflow process or with a 7.0 workflow process.
Forward and Backward Navigation Between Views

To define navigation in an interactive workflow process, you can use a synthetic event. If the user clicks Next or Back, then Siebel CRM navigates the user to the next or to the previous view without losing the context of the workflow process instance.

Siebel CRM uses a synthetic event to allow the user to navigate backward through views. It uses a run-time event to allow forward navigation but not backward navigation.

To navigate back and forth, the following requirements must be met:

  • The resumed workflow process must be an interactive workflow process or a 7.0 workflow process.
  • The calling event must be a navigation event of a workflow process. For example, the calling event must include a name such as InvokeMethod, and a sub event with a name such as FrameEventMethodWFBFevent_name or EventMethodWFBFevent_name, where event_name is the name of the event, such as Next.

Table 34 describes backward and forward navigation that is available for workflow process modes.

Table 34. Backward and Forward Navigation with Workflow Modes
Workflow Mode Supported
Workflow Mode Not Supported

Siebel CRM supports the following modes with backward and forward navigation:

  • Interactive Flow
  • 7.0 Flow

Siebel CRM does not support the following modes with backward and forward navigation:

  • Service Flow
  • Long Running Flow
Guidelines for Configuring Backward Navigation

If you configure Siebel CRM to use backward navigation, then it is recommended that you use the following guidelines:

  • Make sure that any workflow process steps that Siebel CRM repeats as a result of using backward navigation do not result in Siebel CRM performing duplicative actions on data.
  • Note that backward navigation does not undo changes that the workflow process makes. It only modifies the current step counter to reference a previous step.
Synthetic Event Methods

Table 35 describes synthetic event methods.

Table 35. Synthetic Event Methods
Synthetic Event Method
Description

FrameEventMethodWFNext

Uses an applet to move the user forward in an interactive workflow process. To use a synthetic event that resumes a workflow process from a step that is different from the current step on which the workflow process is waiting, you can use a prefix of BF in the method name. For example, FrameEventMethodWFBFevent_name. Use this optional BF prefix to define backward and forward behavior for the synthetic event.

EventMethodWFNext

Operates the same as FrameEventMethodWFNext except navigation occurs through the business component.

FrameEventMethodWFBack

EventMethodWFBack

Moves the user backward in the interactive workflow process.

SaveWorkflow

Pauses and saves the interactive workflow process and makes it appear in the user Inbox.

ResumeLastIntFlow

Resumes the interactive workflow process that Siebel CRM most recently ran.

ResumeLastIntFlow is not specific to a particular workflow process. Siebel CRM can call it from elsewhere in a Siebel CRM application. The button that corresponds to this event can reside in an applet. It is recommended that you place this button in the task bar where Siebel CRM locates the Site Map icon.

Configuring a Synthetic Event Button for Next and Back Events

This topic describes how to configure a synthetic event button for next and back events.

To configure a synthetic event button for next and back events

  1. In Siebel Tools, identify a view to which a user interact step must navigate the user.
  2. Define a Next button or a Back button on an applet where the event is called.

    Siebel CRM must display the button in an applet that references the primary business component. For example, if the workflow process references the Service Request business object, and if the view displays activities that are associated with a service request, then Siebel CRM must display the button in the applet that references the Service Request business component. In this example, if Siebel CRM displays the button in an applet that references the Activities business component, then the synthetic event button does not work. For more information, see Defining the Primary Business Component and Using Siebel Tools.

  3. Define the MethodInvoked property of the button control as the name of the associated event.

    For example, FrameEventMethodWFBack for backward navigation.

  4. In the Process Designer, associate the applet type run-time event.

    For example, assign FrameEventMethodWFBack to the outgoing connectors of the user interact step in the workflow process that receives the event. Assign the event using values from the following table.

    Property
    Value

    Event Type

    Applet

    Event Obj

    AppletName

    Event

    InvokeMethod

    Sub Event

    [Method Name] For example, FrameEventMethodWFBack.

TIP:   It is not necessary for you to manually define buttons for each applet. You can use the Applet Comparison feature in Siebel Tools to copy a button to other applets. If you add the applet button controls to the HTML Model Controls applet, then you can choose the method buttons that are related to a workflow process when you use the New Applet Wizard to create a new applet.

Configuring a Synthetic Event Button for the Save Workflow Event

This topic describes how to configure a synthetic event button for the save workflow event.

To configure a synthetic event button for the save workflow event

  1. In Siebel Tools, identify a view to which a user interact step must navigate the user.
  2. Define a Save button on an applet where Siebel CRM calls the event.

    For more information, see Using Siebel Tools.

  3. Set the MethodInvoked property of the button control to reference the SaveWorkflow event.
  4. Use the following script to call the event handler that Siebel Workflow uses to handle the button click event. The script also sends the contextual information for the event to the Siebel Workflow event handler, which is the name of the view where the event occurs. It is not necessary for you to define the event in the workflow process:

    function WebApplet_InvokeMethod (MethodName)

    {

    return (ContinueOperation);

    }

    function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)

    {

    // Recognize SaveWorkflow event, which is

    // used to save Interactive flow

    if (MethodName == "SaveWorkflow")

    {

    CanInvoke = "TRUE";

    return (CancelOperation);

    }

    return (ContinueOperation);

    }

    function WebApplet_PreInvokeMethod (MethodName)

    {

    // Handle SaveWorkflow event.

    // Call Workflow Process Manager to save the interactive

    // flow(s) that is waiting in the current view.

    if (MethodName == "SaveWorkflow")

    {

    var Inputs = TheApplication().NewPropertySet();

    var Outputs = TheApplication().NewPropertySet();

    // Event name ("SaveWorkflow"), view name, and the rowId

    // of the active row of the underlying buscomp are

    // three required parameters for handling the event

    Inputs.SetProperty("Event Name", MethodName);

    var viewName = TheApplication().ActiveViewName();

    Inputs.SetProperty("Sub Event", viewName);

    var bc = BusComp ();

    var bcId = bc.GetFieldValue ("Id");

    Inputs.SetProperty("RowId", bcId);

    var workflowSvc = TheApplication().GetService("Workflow Process Manager");

    workflowSvc.InvokeMethod("_HandleSpecialEvent", Inputs, Outputs);

    return (CancelOperation);

    }

    return (ContinueOperation);

    }

Configuring a Synthetic Event Button for the Resume Last Flow Event

This topic describes how to configure a synthetic event button for the resume last flow event.

To configure a synthetic event button for the resume last flow event

  1. In Siebel Tools, identify a view where the user interact step must navigate the user.
  2. Define a Resume button on the applet where Siebel CRM must call the event.

    For more information, see Using Siebel Tools.

  3. Set the MethodInvoked property of the button control to reference the ResumeLastIntFlow event.
  4. Use the following script to call the event that Siebel Workflow uses to handle the button click. This script passes the contextual information for the event to the Siebel Workflow event handler. This handler is the name of the view where the event occurs. It is not necessary for you to define this event in the workflow process:

    function WebApplet_InvokeMethod (MethodName)

    {

    return (ContinueOperation);

    }

    function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)

    {

    if (MethodName == "ResumeLastIntFlow")

    {

    CanInvoke = "TRUE";

    return (CancelOperation);

    }

    return (ContinueOperation);

    }

    function WebApplet_PreInvokeMethod (MethodName)

    {

    // Call Workflow Process Manager to resume the last-run interactive flow

    if (MethodName == "ResumeLastIntFlow")

    {

    var Inputs = TheApplication().NewPropertySet();

    var Outputs = TheApplication().NewPropertySet();

    var workflowSvc = TheApplication().GetService("Workflow Process Manager");

    workflowSvc.InvokeMethod("_ResumeLastInteractFlow", Inputs, Outputs);

    return (CancelOperation);

    }

    return (ContinueOperation);

Pausing and Resuming an Interactive Workflow Process

Siebel CRM can resume an interactive workflow process that the user pauses. The user can navigate out of this workflow process, and then navigate back to it and continue where the user paused it.

For example, assume the user is an insurance agent, and this user pauses an interactive workflow process because the user cannot finish a transaction. Some required information is missing, such as the social security number for a spouse. When the user eventually gets the social security number, the user can resume the workflow process from the Inbox, and then enter the social security number. The Workflow Engine removes the workflow process from the Inbox after it finishes.

If the user pauses an interactive workflow process, then Siebel CRM places this workflow process in the user Inbox. It does this to allow the workflow process owner to track and resume the workflow process.

Table 36 describes work that Siebel CRM performs if the user pauses a workflow process. If an interactive workflow process that is paused finishes, and then terminates, then Siebel CRM removes it from the user Inbox. To realize this behavior, the Auto Persist property for the paused workflow process must contain a check mark.

Table 36. Work That Siebel CRM Performs if the User Pauses a Workflow Process
Pause
Description
Result

Explicit pause.

The user clicks Suspend.

Siebel CRM saves the workflow process to the Siebel database and places it in the user Inbox.

Implicit pause

The user leaves a view that is part of the workflow process.

If the cache is full, or if the user logs out of the Siebel CRM application, then Siebel CRM must remove the workflow process from the cache.

Siebel CRM saves the workflow process to the Siebel database and places it in the user Inbox.

Persisting a Workflow Process

If Siebel CRM pauses a workflow process, and if the Auto Persist property for this workflow process is set to TRUE, then the workflow can be persistent. If Siebel CRM does an implicit pause, and if the user leaves a view that the workflow process displays, then Siebel CRM saves the workflow process instance to the cache but it does not create an Inbox item. If the user logs out, and if the Auto Persist property is TRUE, then Siebel CRM creates an Inbox item in the cache. Siebel CRM displays the Inbox item only if the user logs out, and then logs back in to the Siebel application.

How Siebel CRM Uses the Cache of an Interactive Workflow Process That Is Paused

If a user navigates out of an interactive workflow process, then it remains in memory so that Siebel CRM can resume it later in the same user session. The cache can contain no more than eight instances of an interactive workflow process that is paused. This limit applies to an individual user session. The limit is eight instances for interactive workflow processes that Siebel CRM starts in the user session, not eight instances for each interactive workflow process. You cannot modify this eight instance limit.

The user session is one connection on the Application Object Manager server component, regardless if Siebel CRM logs this thread as a single user. If Siebel CRM reaches the eight instance limit, then it does not prevent a new interactive workflow process from running. If the user starts an interactive workflow process, and if Siebel CRM already cached eight instances in memory, and if the AutoPersist property for the workflow process is set to TRUE, then Siebel CRM replaces the oldest instance with this ninth instance. Siebel CRM replaces the oldest instance only if the cache reaches the cache limit.

Event Handling with an Interactive Workflow Process That Is Paused

Siebel Workflow handles events in the following sequence:

  1. To examine the cache, it uses the matching criteria that the event defines. It does this to determine if workflow process instances exist in the cache that can receive an event.
  2. Examines the Siebel database to determine if persistent instances of the workflow process exist that can receive an event.
  3. Resumes instances it finds in Step 1 and Step 2.
How Siebel CRM Handles an Interactive Workflow Process That it Cached

If the user logs out, then Siebel CRM examines the interactive workflow processes that it paused in the cache. It creates an Inbox item for each workflow process that contains a check mark in the Auto Persist property. It deletes any other workflow processes.

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