Siebel Business Process Designer Administration Guide > Workflow Policies > About Customizing Workflow Policies with Siebel Tools >

Example of Using a Predefined Workflow Policy Program: Change SR Owner to Manager


If the service request is not closed within a specific duration of time, assign the service request to the owner's manager. This would allow a proper response time to service calls.

This workflow policy program does the following:

  • Uses the Primary ID as input into a SQL statement
  • Uses a query SQL statement to retrieve the current value of the field Manager
  • Sets the New Owner field to default to the current value of Manager
  • Allows the end user to update the New Owner field optionally through a picklist

Table 61 shows the arguments for the Change SR Owner to Manager program.

Table 61.  Change SR Owner to Manager Program Arguments
Argument Name
Comment

Primary ID

Contains the row ID of the Service Request record meeting the policy condition.

Primary Table

Operation Type

Specifies the table (S_SRV_REQ) and what action is to take place (Update).

New Owner (Column)

Specifies the field in the record to be updated (Owner_EM_ID).

New Owner

Indicates that a picklist is to be displayed for assigning a new owner.

Sql Statement

SELECT MGRPOS.PR_EMP_ID FROM
&TABLE_OWNER.S_POSTN POS, &TABLE_OWNER.S_EMPLOYEE EMP, &TABLE_OWNER.S_POSTN MGRPOS, &TABLE_OWNER.S_SRV_REQ SR
WHERE
SR.ROW_ID = ?
AND
SR.OWNER_EMP_ID = EMP.ROW_ID
AND
EMP.PR_POSTN_ID = POS.ROW_ID
AND
POS.PAR_POSTN_ID = MGRPOS.ROW_ID

SR.ROW_ID = ? uses a question mark as a placeholder for inputting the value of the Primary ID. The system knows to substitute the Primary ID for the question mark.

This SQL statement joins four tables, giving access to data from all of them. In this example, only one field is retrieved.

Policy Monitor requires the definitions contained in the workflow policy object, workflow policy components, and workflow policy columns. In working and coding workflow policy action programs using the Siebel tables, explicit joining of the base table through SQL code is required.

Sql Statement Inputs

Set to the value of Primary ID.

Sql Statement Outputs

Set to the value of Manager.

Siebel Business Process Designer Administration Guide