Siebel Business Process Framework: Workflow Guide > About Workflow Process Steps and Connectors > About Workflow Process Step Types >

About the Stop Step


The Stop step is used to raise an error to the user and terminate the workflow process instance. The main parts of creating a Stop step for a workflow process are:

  1. Defining a Stop Step
  2. Defining a Custom Error Message with the Stop Step

NOTE:  When using a Stop step in a subprocess within a workflow process, the Stop step stops the subprocess and it also stops the parent, invoking process. It is not necessary for you to configure a Stop step within the parent process to stop subprocess logic from executing.

Table 20 describes the way the Stop step is handled, depending on how it is called and in which object manager it is running.

Table 20. Description of How Workflow Process Manager Handles a Stop Step
Stop Step Condition
Where Process Runs
Action Taken by Workflow Process Manager

Workflow policy calls a process that contains a Stop step.

(This cell is intentionally empty.)

Exits. Writes an error message to the log file.

A script or run-time event calls a process that contains a Stop step

Workflow Process Manager Object Manager

Writes an error message to the log file.

Application Object Manager

 

Flags an error message to the user.

Defining a Stop Step

This topic describes how to define a stop step.

To define a Stop step

Perform the procedure described in Adding a Step to a Workflow Process with the following modifications:

  1. In the Error Code property, choose a predefined error code from the picklist.

    For information about defining a custom error message, see Defining a Custom Error Message with the Stop Step.

  2. In the Error Message property, enter an error message.
  3. With the Wait step chosen in the canvas, define input arguments for the step in the MVPW.

    For more information, see About Process Properties.

    Note that no picklist is available for the Name argument field. The input arguments for a Stop step are the substitution variables that appear in the error message. Substitution variables are identified by a percentage symbol: %. To define the substitution value, enter the substitution variable in the input argument's Name argument field, such as %1.

Invoking the Stop Step

It is recommended that the Stop step be used only in a workflow process invoked from a script.

For example, consider a workflow process that displays a custom error message in a stop step. When the workflow is run, the custom error message is displayed that includes stack information that you need to suppress. It is not possible to suppress stack information with a stop step.

However, a workflow process invoked from a script can have an end step that defines the error message in a process property. When the workflow encounters the required condition, the process property that contains the error message is sent. Since the subsequent step is an end step that does not display any messages, control is returned to the calling script that checks for the value set in the process property, then uses RaiseErrorText() to display the message. The error dialog displays the error text but does not display workflow or stack trace information.

Defining a Custom Error Message with the Stop Step

If none of the predefined error messages provided in the Error Code property on the Stop Step meet your requirements, you can define a custom error message on the Stop step.

To define a custom error message on the Stop step

  1. Add a Stop step to your workflow process.
  2. Click the Stop step, then use the Properties window to set the Error Code property to WF_ERR_CUSTOM_1.

    Note that the Error Message property defaults to %1.

  3. Create a new input argument in the MVPW for the Stop step.

    For more information, see About Arguments for a Workflow Process Step.

  4. Set the Name argument field to the value displayed in the Error Message property in the Properties window. In this case, that value is %1.
  5. Enter the custom text message in the Value argument field.

    When you create the input argument in this way, the value you specify is used in the %1 variable.

Defining Multiple Custom Error Messages

Several customizable codes are available in the Error Code property on the stop step. These are indicated by WF_ERR_CUSTOM_x. Since each WF_ERR_CUSTOM_x is unique, it can only be used once. If you need to display multiple custom error messages, use WF_ERR_CUSTOM_2, WF_ERR_CUSTOM_3, and so forth, instead of using %1, %2 for the same WF_ERR_CUSTOM_x.

Siebel Business Process Framework: Workflow Guide Copyright © 2008, Oracle. All rights reserved.