Siebel Business Process Framework: Workflow Guide > Using Predefined Workflow Policies > Using Predefined Workflow Policy Programs >

Using a Workflow Policy Program to Manage the Service Request Close Date


The example in this topic uses a workflow policy program to close service requests that are marked as resolved but not closed. You can define a workflow policy so that if a service request includes an activity of type Resolution, and if the service request is open for more than five days, then Siebel CRM changes the service request close date to the date for today. If this workflow policy calls the workflow policy program, then the workflow policy program changes the current system date to the value that the Close Date field of the service request contains.

Table 50 describes arguments for the Change SR Close Date to Today workflow policy program.

Table 50. Arguments for the Change SR Close Date to Today Workflow Policy Program
Argument Name
Description

Primary ID

Contains the row ID of the service request that meets the conditions for the workflow policy.

Primary Table

Operation Type

Specifies the S_SRV_REQ table and the operation that Siebel CRM runs to do the Update operation.

Sql Statement

Contains a SQL statement to get the current date. It uses the following format:

select sys_extract_utc(current_timestamp) from &Table_Owner.S_DUAL

To get the current date, this statement calls the following Siebel function:

now

The SQL can include a math function. For example, the following SQL statement returns the current date plus seven days:

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

Different RDBMS databases use different formats for the same function. For example, in MSSQL, the GetDate function returns the current date.

The column name length must be less than 30 characters. For example, the following statement is not valid because it is more than 30 characters in length:

TO_CHAR(CREATED,'dd month yyyy','NLS_DATE_LANGUAGE=FRENCH')

Sql Statement Outputs

Siebel CRM gets the value for the Today variable from the SQL statement.

New Close Date (Column)

Specifies to update the ACT_CLOSE_DT column in the record.

New Close Date

Specifies to update the field to the value of Today.

Update Row ID

Specifies the Row Id of the record you must update. This argument is the same as the value of the Primary ID.

Siebel Business Process Framework: Workflow Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.