Siebel Business Process Designer Administration Guide > Workflow Policies > About Creating Workflow Policies >

Example of a Workflow Policy Action: Creating a Run External Program Action

In Siebel Workflow you use the action type Run External Program for defining an action that runs an external program. For example, your company could write a custom executable for calculating the quality of a new lead coming into the system. You could then call this executable from Siebel Workflow whenever the parameters for calculating the lead change.

In the first of the following examples, a program named "leadcalc.exe" is in the C:\bin directory and the action is being defined to call and execute this program. The second example provides the procedure for running external programs on UNIX.

To run an external lead calculation program

  1. In the Workflow Policies Actions view, fill in the Actions applet fields as follows.
    1. Create a new record in the Actions applet and enter the name of the action:

       Run Lead Calculation Program

    1. Select a predefined workflow policy program from the Program field picklist:

       Run External Program

    1. Select a predefined workflow policy object from the Workflow Object field picklist.

      NOTE:  The workflow object field fills in automatically only when a workflow policy object is specified in the workflow policy program being selected. You pick a workflow policy object from the picklist when it does not automatically fill in.

  2. Fill in the Run External Program Arguments applet.
    1. Enter the name of the executable:


    1. Enter any command line parameters.

      These are the parameters you want to pass to the executable.

    2. Select an execute type.
    3. Select dynamic fields from Available Substitutions.
  3. Fill in the Recipients applet.
    1. Select a predefined recipient type from the Recipient Type field picklist:

       Send to Position

    1. Select Recipient Name from the Recipient Name picklist:

       Support Manager

This action is now available to use in a workflow policy.

To run an external program on a UNIX platform

The Run External Program workflow policy program is not supported on UNIX. However, you can use the following procedure as a workaround.

  1. Define a business service that executes an external program.
    1. From the application-level menu, choose View > Site Map > Business Service Administration > Business Service Methods.
    2. Add a new Business Service, for example, Run Program.
    3. Add a new Method, for example, Run.
    4. Add a new Method Argument, for example, Program.
    5. Select Proc: Service_PreInvokeMethod.
    6. Call Clib.system in the function body, for example:

      var program = Inputs.GetProperty ("Program")
      if (program)
      return (CancelOperation);

  2. Create a workflow process calling the business service created in step 1.
    1. Add and connect a Start step, a Business Service step, and an End step.
    2. For the Business Service step, specify Run Program and Run.
    3. For the input argument for Program, specify the external program you want to run. For example, /bin/mail </home/users/hkim/letter.txt.
  3. Run your workflow process.
Siebel Business Process Designer Administration Guide