8Manipulating Data in a Workflow Process
Manipulating Data in a Workflow Process
This chapter describes how to configure a workflow process to manipulate and process data. It includes the following topics:
For information on manipulating data validation rules, see Siebel Order Management Infrastructure Guide.
Using Process Properties
This topic describes how to use process properties. It includes the following topics:
Overview of the Process Property
A process property is a container that stores a value that the workflow process gets from the Siebel database or that it derives before or during processing. You can use the value that a process property contains in the following ways:
Pass information between objects. For example, between steps in a workflow process, between a workflow process and a sub process, or between a workflow process and a business service. You define a process property as an input argument or output argument on a workflow step.
Base a decision branch on the value that a process property contains.
Use the value that a process property contains in an expression.
When a workflow process finishes, the final value of each process property is available as a separate output argument that Siebel CRM can pass to another object.
For more information about:
An example that uses a process property, see Defining a Workflow Process That Traverses a Record Set to Close Service Requests.
Arguments that you can use with a process property, see Fields and Arguments of Process Properties.
A detailed description of property sets, see Integration Platform Technologies: Siebel Enterprise Application Integration.
Process Property and the Property Set
A property set is a hierarchical structure that contains name and value pairs, known as properties, at each level in the hierarchy. The process property stores data that is associated with the property set. A workflow process uses a property set to send data to and from a workflow process step.
The following figure describes how Siebel CRM uses a process property in a workflow process.

Explanation of Callouts
Siebel CRM does the following when it uses a process property in a workflow process:
The process property sends data to Workflow Step 1 as an input argument.
Workflow Step 1 modifies the data according to the configuration for Step 1.
An output argument on Workflow Step 1 sends data from the step to the process property.
An input argument on Workflow Step 2 brings the data that Step 1 uses into Workflow Step 2, where the workflow process can use it according to the internal configuration that is defined for workflow Step 2.
You can define the process property and step arguments in the Multi Value Property Window. For more information, see Using the Multi Value Property Window.
How Siebel CRM Sets the Starting Value of a Process Property
The following table describes how Siebel CRM sets the starting value of a process property when it starts a workflow process.
Table How Siebel CRM Sets the Starting Value of a Process Property
Process Property | Start Value |
---|---|
A process property of type string, number, or date and that includes an In/Out type of In or In/Out. |
The value that the input property with the same name contains, if one exists. |
A hierarchy process property that includes an In/Out type of In or In/Out. |
The value that child input property sets contain. |
A process property that contains a Default String. |
The value that the Value property of the input property set contains. |
How Siebel CRM Sets the Ending Value of a Process Property
The following table describes how Siebel CRM sets the ending value of a process property when a workflow process ends.
Table How Siebel CRM Sets the Ending Value of a Process Property
Process Property | End Value |
---|---|
A process property that is of type string, number, or date, and that includes an In/Out type of In or In/Out, |
Stored as a property in the output property set. |
A hierarchy process property that includes an In/Out type of In or In/Out, |
Stored as a child property set. |
A process property with the name [Value] is defined. You can also use the process property [Value] to send binary data in a sub process step. Siebel CRM can set the starting value of the input argument [Value] of the sub process with data that resides in the main process, and then the sub process step can get this data. For more information, see Passing Data to and from a Workflow Process. |
Stored in the Value property of the output property set. |
Arguments That You Can Define for a Process Property
An argument is a part of the process property hierarchy that allows you to define values for fields. An argument field is a variable on an argument that allows you to define a value that determines the parameters of a process property.
The following table describes how an argument in the MVPW can send data to or from a workflow process step.
Table Arguments That You Can Define for a Process Property
Argument | Description |
---|---|
Input Argument |
Brings data into a workflow process step. |
Output Argument |
Sends data out of a workflow process step. |
Search Specification |
Defines a search specification for a Siebel operation step. |
Recipient |
Defines a recipient for a task step or a sub process step. |
A workflow process step can include several types of arguments. The type of step determines the arguments that you can define. The Type field for an argument affects other fields in the argument that you must define. For more information, see Defining a Step Argument in the MVPW.
Input Arguments of the Business Service Step, Sub Process Step, and Wait Step
An input argument allows you to define the value for a field that Siebel CRM must send to the business service method. Many methods require an input argument. For more information, see Input Argument Fields of a Process Property.
Output Arguments of the Business Service Step, Sub Process Step, and Siebel Operation Step
An output argument can contain the result of work that the business service method performs. Siebel CRM can store an output argument in a process property. Siebel CRM cannot use a calculated field as a value for an input argument or an output argument. If you must use a calculated value, then use an expression. For more information, see Output Argument Fields of a Process Property.
Process Properties of the Business Service Step
Siebel CRM can use the process property of a business service step as an input argument or output argument for a business service method. The Data Type field of the process property must contain one of the following values:
Hierarchy
Integration object
Strongly typed integration object
If Siebel CRM must call a workflow process through a business service, then you can map the data that the input and output property sets contain to or from a process property. This configuration is useful if Siebel CRM must run a workflow process from a script.
Using the Multi Value Property Window
The following table describes the Multi Value Property Window (MVPW), which is a window that you can use to define a process property or a step argument. For more information about:
An illustration of the MVPW that displays a predefined process property, see MVPW Usage with the Step Argument.
A description of how the process property and the step argument work with one another, see Process Property and the Property Set.
An example that uses the MVPW, see Creating the Workflow Process.
Table How the Multi Value Property Window Displays Properties and Arguments
Object | Description | How You Use It |
---|---|---|
Process Property |
Stores values that Siebel CRM applies to the entire workflow process. Siebel Tools displays process properties when it opens the canvas or if no object is chosen in the Process Designer. |
Click the Process Designer canvas, and then use the MVPW. |
Step Argument |
Communicates information between a process property and a workflow process step. |
Click a workflow process step, and then use the MVPW. |
MVPW Usage with the Step Argument
The following figure includes an example of the MVPW that displays the arguments of the Set Commit Time in 1 Hour step.

Explanation of Callouts
If you choose an object in the canvas, then the MVPW includes the following items:
Argument tab. The argument tabs change depending on the type of step that you choose.
Field. A field in the MVPW is a parameter that you can specify that provides instructions for the argument. MVPW Usage with the Step Argument displays the Field Name, Sequence, Type and Value fields.
Argument. All the fields of a single row in the MVPW represents the definition of a single argument.
Viewing a Process Property in the MVPW
If you click the canvas, and if no step or is connector chosen, then Siebel Tools displays the child objects that the workflow process contains. The Process Properties tab in the MVPW displays the definitions of the process properties.
To view a process property in the MVPW
In the Process Designer, click the canvas.
If necessary, to display the MVPW, choose the View menu, Windows, and then click Multi Value Property Window.
Make sure no steps or connectors are chosen.
In the MVPW, click the Process Properties tab.
Examine the records that the MVPW displays.
Viewing a Step Argument in the MVPW
If you click a step in the Process Designer canvas, then Siebel Tools displays the input arguments and output arguments of the step in the MVPW. Depending on the type of step you choose, the MVPW displays one or more tabs.
To view a step argument in the MVPW
In the Process Designer, click a step.
If necessary, to display the MVPW, choose the View menu, Windows, and then click Multi Value Property Window.
Choose a tab in the MVPW, and then examine the arguments.
Defining a Step Argument in the MVPW
You can define an input argument or output argument for a step in the MVPW.
To define a step argument in the MVPW
In the Process Designer, click the step where you must define an argument.
In the MVPW, click an arguments tab.
In the MVPW, right-click anywhere below the column headings, and then click New Record.
Define the argument field.
For example, if you must define an input argument on a Siebel operation step, then you define the Field Input Argument.
Define the Type field and other fields, as necessary.
For more information, see How the Type Field Affects Other Fields of a Step Argument.
How the Type Field Affects Other Fields of a Step Argument
The value you choose in the Type field for a step argument determines how you define other fields of the argument in the MVPW.
The following table describes how to define an argument depending on the type you choose.
Table How to Define an Argument in the MVPW Depending on the Type You Choose
Type You Chose | Work You Perform |
---|---|
Business Component |
Do the following:
|
Expression |
Enter an expression in the Value field. Siebel CRM evaluates the expression you enter at run time. You can also click the button to open the Expression Builder. |
Literal |
Enter a string in the Value field. The value you enter defines the literal value for the argument. |
Process Property |
Choose a Property Name in the Property Name field. Process Property is only available for an input argument. |
Output Argument |
Choose a property in the Output Argument field. You can choose a process property that is of type In/Out or Out. Output Argument is only available for an output argument. |
Changes Starting with Siebel CRM Version 8.0
The Multi Value Properties Window (MVPW) replaces the list applet in most situations in the Process Designer, starting with Siebel CRM version 8.0:
To view properties in earlier releases, you click the step, and then view a list applet that Siebel Tools displays below the canvas. You now view these properties in the Properties window and you view child items for the step in the MVPW.
To view input arguments and output arguments for a step in earlier releases, you right-click a step. You now view these arguments in the MVPW.
To add or delete values for a step in earlier releases, you use the list applets. You now add or delete these values in the MVPW.
Using the Object Explorer to View a Step Argument
You can use the Object Explorer to view the definition of an input argument or an output argument. The Object Explorer displays the same definition that the MVPW displays when you choose an object in the Process Designer.
To use the Object Explorer to view a step argument
Locate the workflow process.
For more information, see Locating a Workflow Process in the Workflow Processes List.
In the Object Explorer, expand the Workflow Process tree.
Expand the WF Step tree.
In the WF Steps list, choose a workflow process step.
In the Object Explorer, click WF Step I/O Argument.
Siebel Tools displays the definitions for the input arguments and output arguments that are defined for the step. It displays these arguments in the WF Step I/O Arguments list.
Using Predefined Process Properties
The following table describes some of the process properties that come predefined with Siebel CRM.
Table Predefined Process Properties
Predefined Process Property | Description |
---|---|
Object Id |
The Siebel row ID of the record that Siebel CRM uses when it starts a workflow process. For more information, see Object Id Process Property. |
Error Code |
An error symbol that Siebel CRM uses if a step returns an error. It automatically populates this process property if an error occurs. |
Error Message |
The text error message if a step returns an error. It automatically populates this process property if an error occurs. |
Siebel Operation Object Id |
The Siebel row ID of the record that Siebel CRM updates, creates, or queries during a Siebel operation step. It automatically populates this process property when a Siebel operation step is run. |
Process Instance Id |
A unique number that Siebel CRM assigns to the workflow process instance that is currently running. It automatically populates this process property when a workflow process runs and if persistence is activated. |
Object Id Process Property
The Object Id process property is the Siebel Row Id of the primary business component record that Siebel CRM uses when it starts a workflow process.
Run-Time Event Behavior
If a run-time event starts a workflow process, then Siebel CRM sends the business component instance that starts the run-time event to Siebel Workflow. The row that the Object Id property defines receives this run-time event. Siebel Workflow receives and processes this event only if the business component and the workflow process references the same business object. If Siebel Workflow can receive this event, then Siebel CRM sets the Object Id process property to the active row of the primary record in the business object.
If the business component that starts the run-time event is not the primary business component, then Siebel CRM does not update the active row of the business component in the Object Id process property, and it must get this row through some extra processing.
The long-running, interactive, and service workflow processes use the following behavior:
The Object Id must match the Row ID of the active row for the primary business component. If the Object Id process property is different from the active row, then Siebel CRM runs the primary business component again to make the active row the same as the Object Id.
To change the active row, you can configure Siebel CRM to assign a new Row Id to the Object Id property. If Siebel Workflow detects that a new Row Id is assigned to the Object Id property, then it runs the business component again and makes the new Row ID the active row.
If you set the Object Id to an empty string, then Siebel Workflow does not enforce the must match rule. However, Siebel Workflow cannot use objects that require an Object Id, such as the run-time event or Siebel operation step, until it sets the Object Id to a new Row ID.
Changing the Active Row in a Workflow Process Step
You can add a step that changes the active row.
To change the active row in a workflow process step
Add a Siebel operation or business service step that performs an operation that causes Siebel CRM to change the active row.
For more information, see Adding Workflow Process Steps.
Update the value of the Object Id process property to the new value of the active Row ID that resides in the output argument of the workflow process step you added.
After a workflow process step finishes and Siebel Workflow evaluates output arguments, it makes sure the Object Id matches the active row. The Object Id property in this step must include the change to the active row.
Using the In/Out Process Property
If necessary, you can run a workflow process to avoid receiving response data. For example, to prevent Siebel CRM from inserting records in the S_SRM_DATA table that can cause a heavy backlog. If the Type field of a process property is Out or In/Out, then Siebel CRM sends a reply to the object that called the workflow process. For example, it sends a reply to the Server Request Processor. If the caller:
Receives a reply that is not null, then it writes this reply in the S_SRM_DATA table.
Receives no reply, then it does not write a reply in the S_SRM_DATA table.
Siebel CRM does the following:
If it inserts a request in the S_SRM_REQUEST table, then it also inserts one or more rows in the S_SRM_DATA table for the component request parameters and input arguments that the request uses.
When it sends this request, the MSG_TYPE_CD column of the S_SRM_DATA table contains a value of REQ_DATA, which indicates that Siebel CRM must request data or input for the request.
If the request finishes, then it inserts a set of rows in the S_SRM_DATA table and sets the value of the MSG_TYPE_CD column to REQ_RESPONSE, which indicates that the request returned a reply to the caller. In this situation, the request is in the S_SRM_REQUEST table, which indicates that the Server Request Processor component is the caller.
Running a Workflow Process to Avoid a Response Data Insert
You can run a workflow process to avoid response data inserts.
To run a workflow process to avoid a response data insert
Do one of the following options:
Leave the In/Out property of the process property set to In/Out until immediately upstream of the end of the workflow process.
Immediately upstream of the end of the workflow process, call another step that nulls out values that Siebel CRM stores in the process properties.
If you use this configuration, then Siebel CRM does not send reply text to the Server Request Processor and it does not insert a record in the S_SRM_DATA table.
Review the process properties, and then set the In/Out property to NONE.
Defining a Custom Process Property
You can define a process property in the Multi Value Property Window or in the WF Process Props list. You can define process properties while you diagram a workflow process, or you can diagram the entire workflow, and then define properties for individual steps. It is recommended that you define process properties before you define an input argument or output argument on an individual step because some of these arguments might reference a process property. For more information, see Using Process Properties.
To define a custom process property
Locate the workflow process you must modify.
For more information, see Locating a Workflow Process in the Workflow Processes List.
Right-click the workflow process, and then choose Edit Workflow Process.
Choose the View menu, Windows, and then the Multi Value Property Window menu item.
For more information, see Using the Multi Value Property Window.
Click the canvas, making sure no workflow process step or connector is chosen.
In the MVPW, make sure the Process Properties tab is chosen.
In the MVPW, right-click in the window that is located below the Process Properties tab, and then choose New Record.
Enter a name for the process property.
For more information, see Naming a Workflow Process Step or a Process Property.
Define the Data Type field, using values from the following table.
Data Type Type of Data the Process Property Holds String
Character value.
Number
Numeric value.
Date
Date value.
Hierarchy
Hierarchical data, as in a property set.
Binary
Binary value.
Siebel CRM encodes binary data in the original character set where it was entered. This data type code is appropriate for data that describes itself, such as XML code.
Integration Object
Integration object.
The Siebel runtime repository uses the integration object definition for this object.
Strongly Typed Integration Obj
Strongly typed integration object.
Alias
XPath notation for pointing to a child in a hierarchical process property.
The String data type code is appropriate for strings, text data, and non XML data even though Siebel CRM can store XML data as string data. Siebel CRM assumes that string data in a workflow process is UTF 16 String encoded. Literal or Expression data types are UTF 16 String.
You cannot modify a data type after you define it.
Define the Default String, Default Date, or Default Number property, if necessary.
Siebel CRM uses the value that you define in one of these properties when it runs a workflow process. If the corresponding data type for the value is chosen, then you only define one of these default values. For example, if you define the Date data type, then you can define a Default Date.
Repeat steps 5 to 9 to define more process properties, as required.
Using Process Properties to Manipulate Data
This topic describes how to use a process property to manipulate data. It includes the following topics:
Passing a Process Property In and Out of a Workflow Process Step
It is recommended that the Type field of the top level of a hierarchical argument not contain data. If Siebel Workflow passes a hierarchical process property to a workflow process step, then it overwrites the Type field of the top level process property for the duration of the call. It does this so that the process property matches the name of the argument that the configuration for the input argument defines. This configuration applies only for a long-running, interactive, or service workflow process.
For example, assume MyTree is a process property and that the data type for this process property is Hierarchy. MyBusSvc is a business service that contains a hierarchical input argument named SomeTree. The following table describes the configuration for this process property.
Table Example of a Process Property in the MVPW
Input Argument | Type | Property Name |
---|---|---|
SomeTree |
Process Property |
MyTree |
Business Object |
The name of the associated business object. |
|
Created By |
The name of the person who creates the process. |
|
Created |
The date that the process is created. |
If you use the values that the table above describes to define the input argument, then the call to MyBusSvc receives a child in the input process property for the argument where the Process Property Type field is set to SomeTree instead of MyTree. The rest of the data in the child process property remains the same as the contents of the MyTree process property.
Siebel Workflow expects an output argument of a workflow process step that passes out a hierarchy as a child of the output property set. To locate the child, Siebel Workflow examines the Type field of the child.
The string in the Type field must match the name of the Output Argument field, as defined in the output argument applet of the step. If Siebel Workflow finds such a child, then it does the following:
Copies the data into the destination process property.
Discards the Type field on the incoming hierarchy.
Replaces the value that the Type field contains with the name of the process property.
Passing a Process Property by Reference
A sub process that modifies a large amount of data must copy this data through input arguments and output arguments. This situation can negatively affect performance and scalability. Pass By Reference is a feature that allows you to pass a pointer to the property set rather than passing all the data that this property set contains. For more information, see Using the Pass By Reference Feature with a Business Service.
Passing Data Through a Process Property to an Error-Workflow Process
Siebel CRM can pass more than only a system defined process property to an error-workflow process. It can pass the following information:
Workflow process instance. To pass a workflow process instance to a process property that resides in an error-workflow process, you must redefine these process properties in the error-workflow process. You must use the same name and data type in each of these workflow processes.
Property set of a workflow process instance. To pass the property set of a workflow process instance to an error-workflow process, you must define a hierarchy process property in the workflow process and in the error-workflow process. You must use this hierarchy property to pass the property set.
The name of a workflow process instance. To pass the name of a workflow process instance, you must define a process property in this workflow process and in the error-workflow process. You must configure Siebel CRM to pass the name of the workflow process instance through this process property.
To pass data through a process property to an error-workflow process
Define an error exception connector.
For more information, see Defining an Error Exception Connector.
Click the stop step, and then define an input argument in the MVPW using values from the following table.
Field Value Name
%1
Type
Literal
Value
Error Message (or a valid string)
In the Workflow Processes list, create a new workflow process that references the error-workflow process.
Concatenating a Process Property
The example in this topic describes how Siebel CRM can use four process properties in a workflow process to concatenate three string values. The three process properties contain the following values in the Default String property:
Welcome
to
Siebel
To concatenate a process property
In Siebel Tools, in the Workflow Processes list, create a new workflow process using values from the following table.
Property
Value
Process Name
Concatenate
Business Object
Account
Workflow Mode
Interactive Flow
For an example, see Creating the Workflow Process.
Open the Process Designer for the workflow process you defined in the step above, and then create a flow that resembles the following diagram:
For more information, see Overview of Workflow Process Steps, and Diagramming a Workflow Process.
In the MVPW, define four process properties using values from the following table.
Name In/Out Business Object Default String Data Type ProcessProperty1
In/Out
Account
Welcome
String
ProcessProperty2
In/Out
Account
to
String
ProcessProperty3
In/Out
Account
Siebel
String
ProcessProperty4
In/Out
Account
(no value)
String
Business Object
The name of the associated business object.
Business object of the parent process. The business object determines the business components that are available for conditions. This is a read-only field.
Business object of the parent process. The business object determines the business components that are available for conditions. This is a read-only field.
Created By
The name of the person who creates the process.
This value is automatically entered based on the log on name of the user.
This value is automatically entered based on the log on name of the user.
Created
The date that the process is created.
This value is automatically entered.
This value is automatically entered.
For more information, see Using the Multi Value Property Window.
Click the wait step, and then click the Output Arguments tab in the MVPW.
You can use the wait step to test and develop a workflow process. For more information, see Adding a Wait Step.
Define an Output Argument for the wait step using values from the following table.
Type Output Arguments Value Expression
ProcessProperty4
[&ProcessProperty1]+' '+[&ProcessProperty2]+' '+[&ProcessProperty3]
The ampersand (&) identifies the text that immediately follows the ampersand as the name of a process property. This process property can also be the name of a business component field. ProcessProperty1, ProcessProperty2, and ProcessProperty3 can be of different types, such as string or date.
You must set the Data Type property for the process property in this example to String. If you use a binary type with an expression, then an error might occur. You cannot use an expression to set a process property whose Data Type property is set to binary. An example error in this situation is a process property that includes truncated data.
Validate, and then simulate the workflow process.
For more information, see Process of Testing a Workflow.
After control returns to Siebel Tools, right-click the Simulation window, and then choose Watch Window.
In the Watch window, expand PS:Property Set.
Note the values that Siebel Tools displays for the process properties that you defined in step 3.
Click Simulate Next.
In the Watch window, ProcessProperty4 now contains a concatenation of values from ProcessProperty1, ProcessProperty2, and ProcessProperty3.
Referencing a Process Property
To reference a process property in an expression, you must use the following format:
[&PropName]
For example:
[&Object Id] like '99-28B1T'
where:
& indicates a process property
Object Id is the name of the process property
The following example describes how Siebel CRM can use a process property as a substitution variable. This example uses an input argument to create a message body:
The Activity #" + [&Object Id] + ", owned by " + [&First Name]+" "+[&Last Name] + " is three days past the Due Date.
where:
Object Id, First Name, and Last Name are defined as process properties.
For more examples of using a process property as a substitution variable, see Using Compound Expressions and Substitutions in a Search Specification and Using Substitution Variables in an Expression.
Externalizing Workflow Properties
It is recommended that you define properties for a workflow process that are externalized and that are not hard coded. Hard coding a property in a workflow process requires you to change the object definitions when you deploy the workflow process between environments. For example, if a workflow process sends an email to a customer list, and if you hard code this list in a process property, then the workflow process does not run correctly in the production environment. You must make sure the workflow process reads this kind of data dynamically. For more information, see Externalizing Properties When Using a Business Service.
Passing Data to and from a Workflow Process
This topic describes how to configure Siebel CRM to pass data to a workflow process and to get data from a workflow process. It includes the following topics:
Passing a Parameter from a Workflow Process toa Global Variable
Passing a Constant from a Workflow Policy Action to a Workflow Process
Examples Scripts That Pass Data to and from a Workflow Process
If Siebel CRM uses the Workflow Process Manager business service to start a workflow process, then it can pass data to and get data from this workflow process. To pass a property set, a sub process step uses the same conventions that this business service uses. For more information, see Using the In/Out Process Property.
Passing Values to a Workflow Process
The input property set must include the ProcessName property, which specifies the name of the workflow process to run. You can include other values in the property set, such as strings, numbers, and property sets. The Workflow Process Manager business service passes these values.
If the input property set includes a property in the top level property set, and if the name in this property set matches the Name property of the workflow process, then Siebel CRM initializes simple data type process properties that are marked In or In/Out, such as the following:
String
Number
DateTime
To initialize the value for each process property in the workflow process, Siebel CRM uses the value in the corresponding process property in the input property set.
If the input property set includes a child, and if the Type field of this child contains a string that matches the name of the hierarchical process property in the workflow process, then Siebel CRM does the following:
Initializes the hierarchical data type process properties that are marked In or In/Out.
Copies the matching child and everything below the child in the input property set to the process property.
Siebel CRM can pass multiple variables to SQL Program Arguments. For more information, see Predefined Business Services.
Passing Values from a Workflow Process
A workflow process that starts programmatically might not return an output. For example, an interactive workflow process can start programmatically but it can pause, and the output from the call that Siebel CRM uses to start it might reflect the state that exists at an intermediate point. For this reason, only a workflow process that is certain to complete in one call can provide output in the output arguments of a call to the Workflow Process Manager business service. A service workflow process is the only type of workflow process that runs to completion in this way.
An output argument uses the same convention as an input argument. Siebel Tools displays simple workflow process properties, such as String, Number, or DateTime, that are marked Out or In/Out, as properties on the top level property set. It displays hierarchical process properties as children of the output property set. To locate hierarchical process properties, you can examine the Type field of the child, which matches the name of the process property.
Passing a Parameter from a Workflow Process toa Global Variable
To access and pass a parameter from a workflow process to a global variable, Siebel CRM can use a business service. If it uses a Workflow Process Batch Manager task to update a global variable, then each of these tasks is a separate user session and a subsequent task might not be able to access this update. For more information, see Using a Script to Access Parameters for a Workflow Process.
Passing a Constant from a Workflow Policy Action to a Workflow Process
The Run Workflow Process program can pass a constant from a workflow policy action to a workflow process.
To pass a constant from a workflow policy action into a workflow process
In Siebel Tools, navigate to the Workflow Policy Program list, and then query the Name property for Run Workflow Process.
Navigate to the Workflow Policy Program Arguments list.
Add a new argument.
Choose the File menu, and then the Save menu item.
For example, add a new argument with the Name property set to IOName. Make sure the Visible property contains a check mark.
In the Workflow Policy Program list, click the Run Workflow Process object.
Choose the Tools menu, and then the Compile Selected Object menu item.
Click Compile in the Object Compiler dialog.
The Siebel client displays this argument in the Arguments list in the Workflow Policy Actions view.
Set the default value.
The default value varies according to IOName.
Open the Process Designer for the workflow process to which Siebel CRM must pass the constant.
In the MVPW, create a new record with the Name argument set to the same name defined in the argument in step 3.
For example, Name must be the same as IOName. For more information, see Using Process Properties.
Call the workflow policy.
For more information, see Starting a Workflow Process from a Workflow Policy.
Examples Scripts That Pass Data to and from a Workflow Process
The examples in this topic pass data to and from a workflow process.
Using a Script to Start a Workflow Process and Create an Input Property Set
The following example script calls the Workflow Process Manager business service. This business service creates an input property set named psInputs for the business service. This script defines strings as properties. It puts these strings in the input property set:
var msgName = "Siebel Agent Authorization Retrieval"; var reqSubType = "CICS Services Request"; var reqType = "AgentAuthorizationReq"; var CICSServiceName = "Consumer Auto Agent Authorization Retrieval"; var processName = "Consumer Auto VBC VBC Template"; var reqFileName = "C:\\sea752\\XMLMessages\\AgentAuthorizationVBCReq-final.xml" var resFileName = "C:\\sea752\\XMLMessages\\AgentAuthorizationVBCResponse- final.xml"
Using a Script to Define Property Sets for the Input Property Set
The following example script defines property sets. It puts these property sets in the input property set as child property sets:
//Request PS var psRequest = app.NewPropertySet(); var psAgentNumTag = app.NewPropertySet(); var psType = app.NewPropertySet(); var sAgentID;
Using a Script to Create Property Sets
The following example script creates property sets:
//Create property set hierarchy sAgentID = app.LoginName(); psRequest.SetType("XMLHierarchy"); psAgentNumTag.SetType("DataAgentNumber"); psAgentNumTag.SetValue(sAgentID); psRequest.AddChild(psAgentNumTag);
Using a Script to Assemble Properties and Child Property Sets in the Input Property Set
The following example script assembles properties and child property sets in the input property set:
psInputs.AddChild(psRequest); //Pass in Property Set psInputs.SetProperty("RequestURLTemplate", requestURLTemplate); //Pass in string psInputs.SetProperty("RequestSubType", reqSubType); psInputs.SetProperty("ReqType", reqType); psInputs.SetProperty("MessageName", msgName); psInputs.SetProperty("CICSServiceName", CICSServiceName); psInputs.SetProperty("ProcessName", processName); psInputs.SetProperty("Request File Name", reqFileName); psInputs.SetProperty("Response File Name", resFileName);
Using a Script to Call the Workflow Process Manager Business Service and Pass the Input Property Set
The following example script calls the Workflow Process Manager business service, and then passes the input property set to this business service:
var svc = TheApplication(). GetService(“Workflow Process Manager”); svc.InvokeMethod("RunProcess", psInputs, psOutputs); //Call the Workflow var sErr = psOutputs.GetProperty("sErr"); //Check the Workflow status
Using a Script to Access Parameters for a Workflow Process
The example in this topic accesses workflow parameters for a running workflow process.
To use a script to access parameters for a workflow process
Define a business service that includes the required methods and parameters.
Access the business service from the workflow process.
In the business service step in the workflow process, pass the workflow process properties to the business service method arguments.
For more information, see Passing a Process Property In and Out of a Workflow Process Step.
Use the following script to use the values of the business service argument and assign them to profile attributes:
function Service_PreInvokeMethod (MethodName, Inputs, Outputs) { if( MethodName == "XXX" ) { var isWorkflowRunning, viewValidCurrent, viewValidNext; // read the input arguments into profile attributes isWorkflowRunning = Inputs.GetProperty("Workflow Running"); viewValidCurrent = Inputs.GetProperty("Valid View Current"); viewValidNext = Inputs.GetProperty("Valid View Next"); TheApplication().SetProfileAttr("WFRunning", isWorkflowRunning); TheApplication().SetProfileAttr("WFViewCurrent", viewValidCurrent); TheApplication().SetProfileAttr("WFViewNext", viewValidNext); }
A profile attribute is a string that is visible to any object that exists in a user session. A separate session exists for each user. A user cannot access the strings that another user session contains.
Use the profile attributes for more processing.
Siebel CRM places the required information in the profile attributes. You can use the typical procedures to configure Siebel CRM to access these profile attributes. For more information, see Siebel Personalization Administration Guide.
Configuring a Decision Condition for a Workflow Process
This topic describes how to use the Compose Condition Criteria dialog box to configure a decision condition for a workflow process. It includes the following topics:
Configuring a Decision Condition
To define conditional logic in a workflow process, you define conditions and values that determine the path that the workflow process pursues. For example, you can define a decision condition that uses the value of a priority field:
If the priority is equal to high, then the workflow process pursues a branch that includes a step that sends an email to a vice president.
If the priority is equal to medium, then the workflow process sends an email to an engineer.
You can define a decision condition for the following items:
Start step
Decision point
Wait step
User interact step
Viewing an Example of a Decision Condition
This book includes several examples that use a decision condition. Here are two examples:
If the Revenue field in the Opportunity business component is greater than $10,000, then insert an activity for the parent opportunity. To examine the example that uses this condition, see Defining a Decision Condition for the Decision Point.
Use a CASE statement to identify one of several branches to pursue in the workflow process, depending on the value of the Priority field in the Service Request business component. Insert an activity with a value for the commit time according to the result of the CASE statement. To examine the example that uses this condition, see Defining a Workflow Process That Creates a Service Request.
Adding a Branch Connector
A branch connector is a type of connector in a workflow process that can include a decision condition. You define conditional logic on a connector that emanates out of the step, and not on the step itself. A branch connector typically emanates from a start step, decision point, wait step, or user interact step.
To add a branch connector
Drag, and then drop a connector from the palette to the canvas. Make sure you connect the decision point with the new next step.
Make sure that the connector is correctly attached. For more information, see Diagramming a Workflow Process.
Make sure the connector you added in the step above is still chosen in the Process Designer.
In the Properties window, enter or modify the connector name.
The connector name must be unique in the workflow process. If it is not unique, then you cannot save the workflow process.
Set the Type property.
In most situations, this value is Condition or Default. If you define a decision condition on the connector, then choose Condition. If you use this connector as an exit route, then choose Default. You can set other values. For more information, see the topic about the Connector object type in Siebel Object Types Reference.
If you define multiple branches on this step, then, for caution information, see Adding Multiple Branches to a Single Workflow Process Step.
Enter comments.
Define the decision condition, if necessary.
If you use this connector to incorporate conditional logic, then use the Compose Condition Criteria dialog box. For more information, see Creating a Decision Condition on a Branch Connector.
Creating a Decision Condition on a Branch Connector
You can use the Compose Condition Criteria dialog box to define a decision condition on a branch connector. A branch connector can be a connector that emanates from a start step, decision point, wait step, or user interact step. The Compose Condition Criteria dialog box constrains the values that it lists according to the Business Object property of the workflow process. For an example that uses conditional logic on a connector, see Defining a Decision Condition for the Decision Point.
To create a decision condition on a branch connector
In the Process Designer, right-click the connector where you must define a decision condition.
Choose Edit Conditions.
In the Compose Condition Criteria dialog box, create a condition.
For more information, see Configuring a Decision Condition for a Workflow Process.
Click OK.
Adding Multiple Branches to a Single Workflow Process Step
A start step, decision point, wait step, or user interact step can each reference multiple branch connectors.
To add multiple branches to a single workflow process step
Do the procedure described in Adding a Branch Connector for each branch that you must define for the step. Each branch can contain a separate decision condition.
Comparison of Branching Declaratively to Programming with a Script
You can implement branching declaratively, as in multiple branches that emanate from a single workflow process step. In some situations, you can achieve the same result through a script, as in scripting on a business service.
For example, assume a STATUS field references a List of Values (LOV), and this LOV includes 120 values. If the user updates the STATUS field, then a workflow process performs 100 different updates in three different business components. This workflow process contains a start step that examines 120 decision conditions, and then uses 100 different branches. Each branch updates a business component.
As an alternative, you can create a workflow process that includes a scripted business service. This workflow process sends the STATUS to the business service. The business service computes, and then propagates the outcome to the business components through the same business service or through a separate Siebel operation step in the workflow process.
Note the following:
Essentially, there are few limitations on the number of branches that can emanate from a start step or a decision step.
120 steps with 120 branches in a workflow process can provide the same performance as implementing the same logic through eScript on a business service.
For this kind of programmatically intense operation, eScript is probably a better choice. A workflow process that includes 120 branches is cluttered, while the implementation would be cleaner and easier to maintain in eScript. Conversely, it is recommended that you use a declarative configuration to meet more common requirements.
Using Parallel Processing in a Workflow Process
Siebel Workflow does not support parallel processing. Make sure you define decision conditions so that the workflow process can only proceed along one connector. If you do not do this, then Oracle cannot predict the run-time behavior of the Workflow Engine.
Configuring Fields in the Compose Condition Criteria Dialog Box
The following table describes fields you set in the Compose Condition Criteria dialog box to define a decision condition. For more information, see Configuring Expressions in the Expression Builder.
Table Fields in the Compose Condition Criteria Dialog Box
Field | Description | Possible Value |
---|---|---|
Compare To |
Indicates where the comparison value is coming from. |
Required. The following choices are available:
|
Operation |
Identifies the comparison operation. |
The following choices are available:
|
Object |
The name of the associated business object. |
You choose this value from a drop-down list of business objects. |
Field |
A required value when Applet is the Compare To value. |
The name of the field in the named applet. |
Values |
Not applicable. |
The Values property is dynamic. It uses the Compare To property. Siebel CRM uses the Values property to store data to use when it evaluates the decision condition. |
Configuring Expressions in the Expression Builder
You use the Expression Builder in the Compose Condition Criteria dialog box to define a decision condition. This topic describes parts of the Expression Builder, including Compare To options, operations, and patterns.
Using Compare To Options
The following table describes Compare To options and their required and optional values.
Table Compare To Options in the Compose Condition Criteria Dialog Box
Compare To | Operation | Object | Field | Value |
---|---|---|---|---|
Applet. Compare the run-time value of an applet column to a literal. |
Comparison operation. All operations are allowed. |
The name of the applet. |
The column in the applet. |
One or more literals for comparison. |
Business Component. Compare the run-time value of a business component field to a literal. |
Comparison operation. All operations are allowed. |
The name of the business component. |
The field in the business component. |
One or more literals for comparison. |
Expression. Evaluate expressions and determine if they return true. |
Specifies how to evaluate multiple expressions. Only applicable if the Values property includes multiple expressions. The following choices are available:
For more information, see Using Simple Comparison Operations and Using Substitution Variables in an Expression. |
Optional. If the expression references a business component field, then the object is a business component name. You can reference the fields of only one business component in the expression. |
Not applicable |
One or more expressions. |
Process Property. Compare the run-time value of a process property to a literal. |
Comparison operation. All operations are allowed. |
The name of the process property. |
Not applicable |
One or more literals for comparison. |
Using Simple Comparison Operations
A simple comparison operation involves a comparison that can Siebel CRM can express in a simple expression without using an iterative operation. The following table describes values for a simple comparison operation.
Table Values for Simple Comparison Operations
Comparison | Run-Time Value That Results in a Successful Comparison | Description |
---|---|---|
Between |
Between two predefined literal values. |
This comparison requires two values in the Values property. The Process Designer enforces this requirement. |
Not Between |
Not between two predefined literal values. |
This comparison requires two values in the Values property. The Process Designer enforces this requirement. |
Greater Than |
Greater than a predefined literal value. |
Logically, Siebel Tools requires only one value in the Values property. |
Less Than |
Less than a predefined literal value. |
Logically, Siebel Tools requires only one value in the Values property. |
Is Null |
Null or empty. |
No value is required in the Values property. |
Is Not Null |
Not null or empty. |
No value is required in the Values property. |
Using Iterative Comparison Operations
An iterative comparison operation is a type of operation that uses multiple iterations to get a Boolean result. It does these iterations on the literal values or expressions that the Values property contains, or on child business component records.
The following configurations can result in different iterative behavior:
You define multiple values in the Values property.
Multiple records of the child business component exist in the current workset. A child business component is a business component that is not the primary business component in the current business object that the workflow process references. If you set the Compare To option to Business Component or to Expression, and if you define the Object field as the name of a child business component, then Siebel CRM uses this child business component in the comparison. If Siebel CRM returned multiple records the last time it processed records in the child business component, then multiple records can exist in the current workset of the child business component. For more information, see Defining the Primary Business Component.
All Must Match Operation
The following options are available for the All Must Match operation:
Multiple value behavior. If you set the Compare To option to a value other than Expression, and if at least one value matches, then Siebel CRM defines a literal and this comparison succeeds. If the Compare To option is Expression, and if each expression evaluates to true, then this comparison succeeds.
Multiple child business component record behavior. If the comparison succeeds for every record, then Siebel CRM uses child business component records for comparison and the overall comparison succeeds.
Consider an example where Siebel CRM uses All Must Match and multiple child business components. Account is the business object. The following table describes the decision condition.
Compare To Operation Object Field Values Business Component
All Must Match
Contact
First Name
Jane, Julie
In this example, if a record in the Contact business component in the current workset contains a first name of Jane or Julie, then the comparison succeeds. The workset is the child contact record for the account record that the workflow process is processing.
This Must Match Operation
For the comparison to succeed, field values of the active row of the current instance of the child business component must match the decision condition values that you define for the connector. The This Must Match operation includes the following options:
Multiple value behavior. If the values involved are literal values, and if at least one value matches, then the comparison succeeds. If the values involved are expressions, and if at least one expression evaluates to true, then the comparison succeeds.
Multiple child business component record behavior. If the comparison succeeds for the current record, then Siebel CRM uses only the current record of the child business component for comparison and the overall comparison succeeds.
If you use Remote Asynchronous, then the workflow process resumes from the Workflow Process Manager. The Workflow Process Manager does not preserve the instance of the child business component and the active row for the child business component is lost. For this reason, the branch connector stops working. If you must use Remote Asynchronous, then use an operation other than This Must Match. Otherwise, use Local Synchronous.
None Can Match Operation
The None Can Match operation includes the following options:
Multiple value behavior. If the values involved are literal values, and if none of the values match, then the comparison succeeds. If the values involved are expressions, and if none of the expressions evaluate to true, then the comparison succeeds.
Multiple child business component record behavior. If the comparison fails for every record, then Siebel CRM uses the records of the child business component for the comparison and the overall comparison succeeds.
One Must Match Operation
The One Must Match operation includes the following options:
Multiple value behavior. If the values involved are literal values, and if at least one value matches, then the comparison succeeds. If the values involved are expressions, and if at least one expression evaluates to true, which is the same as This Must Match, then the comparison succeeds.
Multiple child business component record behavior. If the comparison succeeds for at least one of the records, then Siebel CRM uses records of the child business component for comparison and the overall comparison succeeds.
Other Iterative Comparison Operators
Other iterative comparison operators include the following:
All Must Match (Ignore Case)
Same as All Must Match except string comparisons are case insensitive.
This Must Match (Ignore Case)
Same as This Must Match except string comparisons are case insensitive.
None Can Match (Ignore Case)
Same as None Can Match except string comparisons are case insensitive.
One Must Match (Ignore Case)
Same as One Must Match except string comparisons are case insensitive.
Using Substitution Variables in an Expression
You can use a process property or a field in a business component as a substitution variable in an expression. For more information see Referencing a Process Property and Referencing a Business Component Field You.
For more information about the operators, expressions, and decision conditions that you can use in a workflow process, see Siebel Developer's Reference.
Referencing a Business Component Field You
You must use the following format to reference a business component field:
[field_name]
For example, the Contact business component uses the following format:
[First Name] like 'Jane'
You specify the business component name in the Object field of the Expression Builder.
Example of Using an Expression to Compare Values
The following table describes how to use an expression to compare the value of the Object Id process property to the value of the Account Id field in the Contact business component.
Compare To | Operation | Object | Values |
---|---|---|---|
Expression |
This Must Match |
Contact |
[Account Id] like [&Object Id] |
Accessing Data from a Run-Time Event in a Workflow Process
This topic explains how to configure Siebel CRM to access run-time event data from a workflow process.
To access data from a run-time event in a workflow process
If necessary, display the WF Step Branch object type in the Object Explorer.
For more information, see Displaying Object Types You Use to Develop a Workflow Process.
In the WF Step Branch list, define the properties for a WF Step Branch using values described in the following table.
Property Value Name
Enter a name for the branch.
Type
Condition
Event Object Type
Applet
Event
InvokeMethod
Event Object
Choose the name of the event object that starts the workflow process.
Sub Event
NewRecord
Comments
Optional
Event Cancel Flag
The default is blank.
Set up process properties in the Process Designer.
For information, see Using Process Properties.
Click the first step in the workflow process, and then add a new output argument for each process property that Siebel CRM must populate that references the run-time event.
To add a new output argument, you enter values in the fields that Siebel Tools displays in the Output Arguments tab in the Multi-Value Property Window. Use the example values described in the following table.
Field Value Property Name
Enter a name for the property.
Type
Expression
Value
GetProfileAttr("RestrucOut")
When you define the Profile Attribute field, note the name you give to each of the property values for the Profile Attributes.
Output Argument
Leave default value.
Business Component Name
Leave default value.
Business Component Field
Leave default value.
Comments
Optional
Activate the workspace.
For more information, see Process of Deploying a Workflow Process.
-
Load the run-time events:
Navigate to the Administration-Runtime Events screen, and then the Events view.
On the Events list, click Menu, and then click Reload Runtime Events.
Query the Event field for the run-time event you defined in step 4.
Drill down on the Action Set Name field.
Add a new Action for each process property that the run-time event updates.
For example, to set the ACU Transaction ID and name it Set ACU Trans ID, you can create a new action. You must do the following work for each new action:
Set the Action Type property to Attribute Set.
Set the Profile Attribute to match the value you used in the GetProfileAttr call in the Process Designer, such as TransType.
Set the Set Operator value to Set.
Use the Expression Builder to assign the Value field an appropriate value, such as the literal string FA-0001.
Set the Sequence for the action to be less than the default sequence for the Workflow_XXXXXXX Action.
Make sure the Sequence setting of the Workflow_XXXXXXX Action is the highest number so that this action occurs after every other action.
If you modify the workflow process, then Siebel CRM resets the sequence for the workflow action to 1 and you must repeat this step.
From the applet menu, choose Reload Runtime Events.
Using the Timestamp
You can use the time stamp to get the current system time and to do time arithmetic that uses the current time. The arithmetic that Siebel CRM uses with time information for a workflow process is different from the arithmetic that it uses for a workflow policy program. It must use the seconds operand of the Timestamp function in a scale of minutes, which is a fraction of the whole day. For example, to display an arithmetic operation as 30 minutes, Siebel CRM displays the argument according to the following format:
Timestamp()+0.021
where:
0.021 is equal to 30 divided by (24 multiplied by 60)
24 multiplied by 60 represents a whole day in minutes
30 represents the required number of minutes
For more information, see Using Date Calculations in the Conditions List.