Siebel Business Process Framework: Workflow Guide > Reference Materials for Siebel Workflow > Predefined Business Services >
About the Server Requests Business Service
This topic describes the predefined Server Requests business services. It includes the following topics:
You can use the predefined Server Requests business service to send generic requests to the server request broker. Processing modes in which the Server Requests business service can send requests include:
- Asynchronous.
- Synchronous.
- Schedule.
Using Synchronous and Asynchronous Modes
When in synchronous mode, the Server Requests business service sends a request to the server request broker then waits for a response. Otherwise, it sends the request but does not wait for a response. It is recommended you use the Server Requests business service, in most cases, rather than the Workflow Process Manager (Server Request) business service. It is more efficient to make an asynchronous workflow process call. When a synchronous workflow call is made the workflow process runs in the Object Manager, causing the user to wait for the process to end. Specifying the SRBroker Parameters
When invoking the Server Requests business service to submit a component request, you must specify SRBroker parameters in the input property set and component specific parameters in a child property set. Considerations to weigh include:
- When invoking the Server Requests Business Service to invoke a Siebel Component, the component parameter names must be referenced by the parameter's Alias Name. Note that the Alias Name usually does not contain spaces.
- Failure to use the correct format results in an error message. Table 81 describes correct and incorrect formats.
Table 81. Description of Component Parameter Format for Invoking the Server Requests Business Service
|
|
ObjReq.SetProperty "BCName", "Account" |
ObjReq.SetProperty "Buscomp Name", "Account" |
- Component parameters must be specified with their Alias Names in the child property set.
- There is no validation of these Alias Names.
- These arguments do not appear in the picklist in the Administration-Business Process views.
Passing Parameters to Server Components
If you need to pass parameters to the server component that are not listed as available arguments, you can create a custom business service that contains the necessary parameters. Alternatively, you can create a component job that has the parameters defined as part of the job definition. For more information on component jobs, see Siebel System Administration Guide. Methods for the Server Requests Business Service
Methods available for this service include:
- Submit Request. Use this method to submit a request to the server request broker.
- Cancel Request. Use this method to cancel server requests that are currently awaiting to be run.
Submit Request Arguments
Table 82 describes Submit Request method arguments.
Table 82. Description of Submit Request Method Arguments for the Server Requests Business Service
|
|
Component |
Required if Component Job is not entered. Enter the name of the server component to run. |
Component Job |
Required if Component is not entered. Enter the name of the component job to run. |
Delete After |
Optional. Number of iterations before deleting the request. Works with Delete After Units. The default value is 0 (zero). |
Delete After Units |
Optional. The units to measure the iterations for the Delete After argument. The default value is "NoReq" for synchronous where the request is not saved to the database and "Eon" for asynchronous where the request is never deleted. Other possible values include:
- ASAP
- SECONDS
- MINUTES
- HOURS
- DAYS
- WEEKS
- MONTHS
- YEARS
|
Description |
Optional. A description of the server request. |
Enterprise Server |
(This cell is intentionally empty.) |
Hold Flag |
Optional. For asynchronous requests only. Flag to indicate whether or not to hold the request. |
Maximum Execution Time |
For future use. |
Method |
Optional. Only applicable for service-based server components. For example, Workflow Process Manager or Communications Manager. Specify the business service method to invoke. |
Mode of Server Request |
Required. This tells the server request broker how to handle the server request. While in Auto mode, the server request broker sets the mode to Synchronous or Schedule, depending if the Siebel client is connected or mobile. Potential values include:
- DirectDB: Asynchronous request, written directly to S_SRM_REQUEST
NOTE: It is recommended you use this argument to invoke an asynchronous request. When DirectDB mode is used, the data in S_SRM_REQUEST is not lost. If you use Async when the Workflow Process Manager reaches MaxTasks, it cannot process every SRM request.
- Async: Asynchronous
- Sync: Synchronous
- Schedule: Schedule
- Auto: Automatic configuration
|
Number of Retries |
Maximum number of times the request is retried in case of error.. |
Request ID Needed |
Optional. This is only applicable to asynchronous and schedule mode. If this is set to false, these two server requests return even faster. |
Repeat Amount |
Amount of units of time to repeat. |
Repeat Interval |
Optional. The interval for repeating requests. |
Repeat From |
Optional. Possible values are Scheduled Start, Actual Start, and End. |
Repeat Interval Units |
Optional. Unit of intervals for repeating requests. |
Repeat Number |
Optional. The number of repetitions for repeating requests. |
Retry On Error |
Used for resubmitting the request, if it errors out. Default setting is FALSE. |
Repeat Unit |
Unit of time to repeat. |
Request ID |
Used for request key based routing. |
Server Name |
Optional. Enter the specific server that this request is run from. |
Start Date |
Optional. Start date and time. |
Storage Amount |
Optional. Enter the amount of time that the server request is stored in the database in the event that the server is down. |
Storage Units |
Optional. Enter the units to measure the iterations for the Storage Amount argument. The units are the same as Delete After Units. |
Cancel Request Method Arguments
Table 83 describes Cancel Request method arguments.
Table 83. Description of Cancel Request Method Arguments for the Server Requests Business Service
|
|
Request ID |
Required. This is the ID of the server request to be cancelled. |
Repeat Number |
Optional. This is the number of repetitions of the repeating server requests that are to be cancelled. |
Example of Using the Server Request Business Service to Invoke a Workflow From Script and Pass Values
This topic gives one example of how to use the predefined Server Requests business service to invoke a workflow process from script and to pass field values to process properties. You might use workflow processes differently, depending on your business model. //Example: Passing Field Values to Process Properties and invoke workflow from script using the Server Request BS
//function Invoke_Process()
{
var svc = TheApplication().GetService("Workflow Process Manager(Server Request)");
var Input = TheApplication().NewPropertySet();
var Output = TheApplication().NewPropertySet();
var bo = TheApplication().ActiveBusObject();
var bc = bo.GetBusComp("Opportunity");
var rowId = bc.GetFieldValue("Id");
var accountId = bc.GetFieldValue("Account Id");
Input.SetProperty("ProcessName", "My Opportunity Process");
Input.SetProperty("Object Id", rowId);
// Pass the value of the Account Id field to the Account Id process property
Input.SetProperty("Account Id", accountId);
svc.InvokeMethod("RunProcess", Input, Output);
}
Example of Using the Server Requests Business Service to Invoke an EIM Task
This topic gives one example of how to use the predefined Server Requests business service from within a workflow process to invoke an EIM task. You might use workflow processes differently, depending on your business model. You can use a workflow process to start a server task. For example, you can start the EIM task to export base tables to IF tables or to load IF tables into base tables. The required EIM component-specific parameters must be passed in a child property set. You can either use a wrapper business service for EIM, such as the Synchronous Assignment Manager Requests business service, or you can use the predefined Server Requests business service. Since the Server Requests business service is designed to invoke a variety of server tasks, it does not contain definitions for component-specific parameters. Instead, component-specific parameters are passed down in a child property set which are not declared in the repository. To make workflow pass values in a child property set, you use the dot notation of [type].[property]. In this example, since the Server Request Manager service does not care about the child type, but takes the first child, you pass all parameters in the same child, such as EIM.Config. To create a workflow process that uses the Server Requests Business Service
- In Siebel Tools, in the Workflow Processes Object List Editor (OBLE), create a new workflow process object definition with the following values:
Property |
Value |
Process Name |
EIM Export to IF (Tools) |
Business Object |
Account |
Workflow Mode |
Service Flow |
To view an example, see Creating a New Workflow Process Object Definition.
- Open the Process Designer for the workflow process you created in Step 1, then create a workflow that resembles the workflow in the following diagram:
For more information, see About Workflow Process Steps and Connectors, and Diagramming a Workflow Process.
- Click the Export EIM workflow step, then use the Properties window to define values described in the following table:
Property |
Value |
Business Service Name |
Synchronous Server Requests |
Business Service Method |
SubmitRequest |
- With the Export EIM workflow step still chosen, in the MVPW add a new input argument using values described in the following table:
Argument Field |
Value |
Input Argument |
Component |
Type |
Output Argument |
Value |
EIM |
For more information, see About Process Properties.
- Add another input argument to the Export EIM workflow step using values described in the following table:
Argument Field |
Value |
Input Argument |
EIM.Config |
Type |
Output Argument |
Value |
accnt.ifb |
- Make sure the Server section of the client .cfg file contains the configuration described in the following table:
Variable |
Value |
GatewayAddress |
Gateway_Machine_Name |
EnterpriseServer |
Enterprise_Server_Name |
RequestComponent |
SRMSynch |
RequestServer |
Siebel_Server_Name |
- To prepare the workflow process for testing, set up accnt.ifb in the Siebel_Server\Admin directory.
- Validate then simulate the workflow process.
For more information, see Process of Testing a Workflow Process.
If the workflow executes successfully it finishes without errors. There is an EIM task log created in the Server Tasks screen in the Siebel client each time you step through the Process Simulator.
- Deploy the workflow process.
Once the workflow is Active, you can invoke it from a workflow policy, script, or as a sub-process from another workflow process. For more information, see Process of Deploying a Workflow Process.
|