Siebel Business Process Framework: Workflow Guide > Adding Workflow Process Steps > Adding Steps and Connectors >

Adding a Stop Step


The stop step is a type of workflow process step that Siebel CRM uses to display an error message in the client, and then terminate a workflow process.

If Siebel CRM uses a stop step in a sub process, then this stop step stops the sub process and it also stops the parent workflow process. It is not necessary to define a stop step in the parent workflow to stop the sub process.

To add a stop step

  1. Add a stop step to a workflow process.

    For more information, see Adding a Step to a Workflow Process.

  2. Make sure the step you added in Step 1 is still chosen in the Process Designer.
  3. In the Properties window, In the Error Code property, choose an error code.
  4. In the Error Message property, enter an error message.
  5. In the MVPW, define input arguments for the step.

    The input arguments for a stop step contain the substitution variables that Siebel CRM displays in the error message. A percent sign (%) identifies a substitution variable. To define the substitution value, you enter it in the Name field. For example:

    %1

    For more information, see Arguments That You Can Define for a Process Property.

  6. If the predefined error messages that the Error Code property of the stop Step displays do not meet your requirements, then you can define a custom error message on the stop step.

    For information, see Defining a Custom Error Message on a Stop Step.

How Siebel CRM Handles the Stop Step

Table 13 describes how Siebel CRM handles the stop step.

Table 13. How Siebel CRM Handles a Stop Step
How Called
Where the Workflow Process Runs
Work That the Workflow Process Manager Performs

A workflow policy calls a workflow process that contains a stop step.

Not applicable

Exits and writes an error message to the log file.

A script or a run-time event calls a workflow process that contains a stop step.

Workflow Process Manager Object Manager

Writes an error message to the log file.

Application Object Manager

Displays an error message in the client.

Calling a Workflow Process That Includes a Stop Step

It is recommended that you use the stop step only in a workflow process that a script calls. For example, assume a workflow process includes a stop step that displays a custom error message. When Siebel CRM runs this workflow process, the custom error message includes stack information. Siebel CRM cannot suppress this stack information.

Assume a workflow process that a script starts contains an end step that defines the error message in a process property. Assume this workflow process encounters an error, and that the subsequent step is an end step that does not display messages. Siebel CRM returns control to the script. This script examines the value that the process property contains. It then uses the following function to display the message:

RaiseErrorText

The error dialog displays the error text but it does not include workflow process or stack trace information.

Defining a Custom Error Message on a Stop Step

This topic describes how to define a custom error message on a stop step.

To define a custom error message on a stop step

  1. Add a stop step to your workflow process.
  2. Click the stop step, and then use the Properties window to set the Error Code property to the following value:

    WF_ERR_CUSTOM_1

    Siebel Tools sets the Error Message property %1, by default.

  3. In the MVPW, add a new input argument for the stop step.

    For more information, see Arguments That You Can Define for a Process Property.

  4. Set the Name field to the substitution variable that Siebel Tools displays in the Error Message property in the Properties window.

    In this situation, this value is %1.

  5. Enter the custom text message in the Value field.

    At run time, Siebel CRM replaces the %1 substitution variable with the value that you enter in the Value field.

Defining Multiple Custom Error Messages for a Stop Step

You can use multiple customizable codes in the Error Code property of a stop step. These codes use the following format:

WF_ERR_CUSTOM_x

Each WF_ERR_CUSTOM_x code is unique. You can use each of these error codes only one time and for a specific purpose. If you must display multiple custom error messages, then you can use WF_ERR_CUSTOM_2, WF_ERR_CUSTOM_3, and so on, instead of using %1, %2 for the same WF_ERR_CUSTOM_x.

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