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 Close Date to Today

Using this program, you can define a policy such that if a Service Request has an activity of type Resolution, and the SR is open for more than five days, the SR close date is changed to today's date.

When the policy triggers the workflow policy program, the program enters the current system date into the Close Date field of the Service Request record. Table 59 shows the arguments for the Change SR Close Date to Today program.

Table 59.  Change SR Close Date to Today Program Arguments
Argument Name

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).

Sql Statement

select {fn now()} from &Table_Owner.S_DUAL

This statement calls the Siebel function now() to obtain the current date and uses the table &Table_Owner.S_DUAL to hold the value temporarily. The S_DUAL table is used to hold temporary values.

Math functions can also be performed. For example, SQL Statement = select {fn now()}+7 from &Table_Owner.S_DUAL returns the current date plus seven days.

Different RDBMS have different formats for the same function (for example, in MS SQL, the function GetDate() is used to return the current date).

Sql Statement Outputs

The "Today" variable obtains its value from the SQL statement.

New Close Date (Column)

Specifies the column in the record to be updated (ACT_CLOSE_DT).

New Close Date

Specifies the field to be updated to the value of Today.

Update Row ID

The row ID of the record you want to update. (The same as the value of the Primary ID.)

Siebel Business Process Designer Administration Guide