And they are one of the most commonly used functionality in Siebel.
The following are the different ways to invoke a workflow.
- Runtime Events
- User Property
- Workflow Policy
Runtime events can be specified at
- Workflow Process and
- Administration Runtime
To define a runtime event in the workflow process, follow the steps given below.
- Select the connector after the start step as shown below
- In the Workflow Step Branch: windowbelow provide the details at which you want to this workflow to execute.
e.g. For example If I want my workflow to be invoked at write record of Action buscomp then I will enter the following details
Event Object Type: BusComp
Event Object: Action
Event: Write Record
- Next and the last step is we need to reload the runtime events from Siebel client.
- Runtime Events are available in Administration – Runtime Event Screen.
- We have all the corresponding events which we find in BusComp, Applet and Application such as WriteRecord, PreWriteRecord, ChangeRecord, and PreQuery etc.
- We need to remember one thing here is that Runtime events fire before the corresponding object event.
e.g. WriteRecord runtime event for object type BusComp will fire before BusComp WriteRecord event
- To call a workflow from Administration Runtime event define a Action Set and Enter the information as shown below
Business Service-Name: Workflow Process Manager
Business Service-Method: RunProcess
Business Service-Context: “ProcessName”, “Name of workflow”
- Even Spaces matter in Business Service Context value after there is a space after comma and then workflow name.
- Now you can define the event according to your requirement which will call this Action Set.
- Reload the runtime events.
- The following is the example code to call the workflow from a script.
- Here any property that you set in input property set will be assigned to corresponding process property in the Workflow Process (WFP) as in the above example
Input.SetProperty(”Object Id”, rowId);
- Above line of code will result in process property called “Object Id” in WFP to assigned to the value of variable “rowId”.
We can use ‘Named Method’ property on BC to invoke a workflow.
Name: Named Method
Value: [Event Name] , “INVOKESVC”, , “Workflow Process Manager”, “RunProcess”, ‘ProcessName’,[Name of the Workflows] , ‘RowId’, [Row Id Value]
The below example mentioned will invoke a workflow named ‘Example Workflow’ when a new record is created in Example BC.
- Workflow Process can also be called from workflow policy.
- Steps to create Workflow Policy are not in the scope of this post. We assume here that you have created a workflow policy record and specified appropriate conditions (We can Define a workflow policy (WFP) in Administration – Business Process >> Policy.).
- In the argument section choose
Argument: Process Name
Value: Workflow Process Name