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
- In the Workflow Policies Actions view, fill in the Actions applet fields as follows.
- Create a new record in the Actions applet and enter the name of the action:
Run Lead Calculation Program
- Select a predefined workflow policy program from the Program field picklist:
Run External Program
- 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.
- Fill in the Run External Program Arguments applet.
- Enter the name of the executable:
- Enter any command line parameters.
These are the parameters you want to pass to the executable.
- Select an execute type.
- Select dynamic fields from Available Substitutions.
- Fill in the Recipients applet.
- Select a predefined recipient type from the Recipient Type field picklist:
Send to Position
- Select Recipient Name from the Recipient Name picklist:
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.
- Define a business service that executes an external program.
- From the application-level menu, choose View > Site Map > Business Service Administration > Business Service Methods.
- Add a new Business Service, for example, Run Program.
- Add a new Method, for example, Run.
- Add a new Method Argument, for example, Program.
- Select Proc: Service_PreInvokeMethod.
- Call Clib.system in the function body, for example:
var program = Inputs.GetProperty ("Program")
- Create a workflow process calling the business service created in step 1.
- Add and connect a Start step, a Business Service step, and an End step.
- For the Business Service step, specify Run Program and Run.
- For the input argument for Program, specify the external program you want to run. For example, /bin/mail email@example.com </home/users/hkim/letter.txt.
- Run your workflow process.