Bookshelf Home | Contents | Index | PDF |
Siebel Business Process Framework: Workflow Guide > Reference Materials for Siebel Workflow > Manipulating and Processing Data > Passing Data To and From a Workflow ProcessThis topic provides information about passing data to a workflow process and obtaining data from a workflow process. It includes the following topics:
The Workflow engine can be invoked by calling a business service. The Workflow Process Manager business service is a standard business service used for this purpose. When you run a workflow process by invoking the Workflow Process Manager business service, you can pass inputs to Workflow, and in some cases, obtain outputs from Workflow. While this topic discusses passing data to and from a Business Service step, keep in mind that the Sub Process step uses the same conventions for passing property sets. For more information, see About the In/Out Process Property. Passing Inputs to a Workflow ProcessThe input property set is required to contain a property named ProcessName, which specifies the name of the workflow process to be run. In addition to the ProcessName property, you can put other values, such as strings, numbers, and property sets, into the property set. These values are passed to the workflow process by the Workflow Process Manager business service. Simple data type process properties, such as String, Number, and DateTime, that are marked In or In/Out are initialized if the input property set has a property in the top-level property set with a name matching the name of the workflow process property. The value of such a property in the input property set initializes the value of the matching workflow process property. Hierarchical data type process properties that are marked In or In/Out are initialized if the input property set has a child whose property set Type field contains a string matching the name of the hierarchical workflow process property. If such a match is found, the matching child and everything below the child in the input property set is copied into the process property. Note that multiple variables can be passed into SQL Program Arguments. For more information, see Passing Multiple Variables into SQL Program Arguments. Passing Outputs from a Workflow ProcessIt is possible that a workflow process started programmatically will not return outputs. For example, an interactive workflow process can be started programmatically, but since it can pause, the output from the call to start the workflow process might reflect the state at an intermediate point. For this reason, only a workflow process that is guaranteed to run to completion in one call, that is, a service flows, can be expected to provide output in the output arguments of the call into the Workflow Process Manager business service. Output arguments follow the same convention as input arguments. Simple workflow process properties, such as String, Number, and DateTime, that are marked Out or In/Out appear as properties on the top-level property set. Hierarchical process properties appear as children of the output property set. Hierarchical process properties can be located by examining the Type field of the child, which match the workflow process property name. Passing Parameters from a Workflow Process to a Global VariableYou can use a business service to access and pass parameters from a workflow process to a global variable. Note that when an update is made to a global variable by using a Batch Manager task, each task is in essence a separate user session. Therefore, an update that is made to a global variable by using a Batch Manager task might not be visible to subsequent Workflow Process Batch Manager tasks. For more information, see Example of Script That Accesses Workflow Parameters. Passing a Constant from a Workflow Policy Action into a Workflow ProcessYou can use the Run Workflow Process program to pass a constant from a Workflow Policy Action into a Workflow Process. To configure a workflow to pass a constant from a workflow policy action into a workflow process
Examples of Script That Pass Data To and From a Workflow ProcessThis topic describes several examples of using script to invoke a workflow process and for passing parameters. Example of Script That Invokes a Workflow Process and Constructs an Input Property SetThis topic gives one example of using script to invoke a workflow process and construct an input property set. You might use this feature differently, depending on your business model. The following is a sample script that invokes the Workflow Process Manager business service which constructs an input property set, psInputs, for the business service. This script defines strings that are put into the input property set as properties: 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" Example of Script That Defines Property Sets for the Input Property SetThis topic gives one example of using script to define property sets for the input property set. You might use this feature differently, depending on your business model. The following is a sample script that defines property sets, which are put into the input property set as child property sets: var psRequest = app.NewPropertySet(); var psAgentNumTag = app.NewPropertySet(); var psType = app.NewPropertySet(); Example of Script That Constructs Property SetsThis topic gives one example of using script to construct property sets. You might use this feature differently, depending on your business model. The following is a sample script that constructs property sets: //Build property set hierarchy psRequest.SetType("XMLHierarchy"); psAgentNumTag.SetType("DataAgentNumber"); psAgentNumTag.SetValue(sAgentID); psRequest.AddChild(psAgentNumTag); Example of Script that Assembles Properties and Child Property Sets into the Input Property SetThis topic gives one example of using script to assemble properties and child property sets in the input property set. You might use this feature differently, depending on your business model. The following is a sample script that assembles properties and child property sets into 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); Example of Script That Invokes the Workflow Process Manager Business Service and Passes the Input Property SetThis topic gives one example of using script to invoke the workflow process manager business service and pass the input property set. You might use this feature differently, depending on your business model. The following is a sample script that invokes the Workflow Process Manager business service and passes the input property set to the Workflow Process Manager 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 Example of Script That Accesses Workflow ParametersThis topic describes how to use script to access workflow parameters for a running workflow process. To access workflow parameters for a running workflow process
|
Siebel Business Process Framework: Workflow Guide | Copyright © 2008, Oracle. All rights reserved. | |