Siebel Business Process Framework: Workflow Guide > About Workflow Policies > About Defining Workflow Policy Objects >

Defining Workflow Policy Objects


This topic describes how to use Siebel Tools to define object definitions that are used when configuring a workflow policy. It includes the following topics:

For more information, see Examples of Predefined Workflow Policy Programs.

Defining a Workflow Policy Column

This topic describes how to define a workflow policy column. Before you can add a workflow policy column to a workflow policy component, you must define the workflow policy column in the Workflow Policy Columns Object List Editor (OBLE).

The procedure has two parts. First, you identify the business object, business component, and applet that use the new workflow policy column. Second, you create the new workflow policy column.

CAUTION:  Deleting a workflow policy column requires removal of references to the columns in workflow policy objects. Even if a workflow policy column is not currently being used in an active policy, the Workflow Monitor Agent is referencing the columns in the repository. This facilitates fast activation of new policies in the future, but care must be taken to remove old references if design requirements change so as to avoid potential link conflicts.

To define a new Workflow Policy Column

  1. In the Siebel client, navigate to the view that will use the new policy column. For example, from the Accounts List, drill down on an account record, then choose the Activities view tab.
  2. From the application-level menu, choose Help > About View.
  3. Note the Business Object, Business Components, and Applets that this view uses.
  4. In Siebel Tools, in the Business Components OBLE, choose one of the business components identified in Step 3, then note the value in the Table property.

    The Table property displays the table name for the Siebel database table that this business component references.

  5. Choose Workflow Policy Column in the Object Explorer.
  6. From the application-level menu, choose Edit > New Record.
  7. In the Workflow Policy Columns OBLE, use values you found in previous steps of this procedure to define properties for the new object definition.

    Note that the table name/column name combination must be unique. You are not allowed to save the object definition if the table name/column name combination has already been defined in another object definition.

Configuring a Workflow Condition Based on a Foreign Key

You can configure a workflow condition that is based on a foreign key that exists in the primary table of the workflow object. For example, SOPTY.CURR_STG_ID, where S_OPTY is the primary table of the Opportunity workflow object, and CURR_STG_ID is a foreign key from S_STG.NAME.

To configure a workflow condition based on a new Workflow Policy Column

  1. In the Workflow Policy Columns OBLE, create a new workflow policy column object definition with S_STG.NAME in the Name property.
  2. Make sure CURR_STG_ID is added under the Opportunity workflow component.
  3. Create a new workflow component in the Opportunity workflow object based on the S_STG table, using values displayed is the following table:
    Property
    Value

    Name

    (your choice)

    Source Table Name

    S_STG

    Source Column Name

    ROW_ID

    Target Component Name

    Opportunity

    Target Column Name

    CURR_STG_ID

  4. Add the new workflow column, S_STG.NAME, you created in Step 1 to the new workflow component you created in Step 3.

You can now create a workflow condition that is based on the new workflow column.

Defining a Workflow Policy Object

This topic describes how to define a workflow policy object.

CAUTION:  In the Workflow Policy Components OBLE, you should define one, and only one record as the primary workflow policy component. Only one record should have the Primary property checked.

To define a new Workflow Policy object

  1. In Siebel Tools, navigate to the Workflow Policy Objects OBLE.
  2. From the application-level menu, choose Edit > New Record.
  3. Define properties for the new record.
  4. In the OE, choose the Workflow Policy Components object type.
  5. From the application-level menu, choose Edit > New Record.
  6. Make sure the Primary property has a check mark.

    Note the caution provided at the beginning of this topic.

  7. Add more Workflow Policy Component object definitions, defining relationships to the primary workflow policy component, as necessary.
  8. In the OE, choose the Workflow Policy Component Col object type.
  9. In the Workflow Policy Component Columns OBLE, add object definitions for each of the workflow policy components you defined in Step 7.

Defining a Workflow Policy Component

This topic describes how to define a workflow policy component.

To define a Workflow Policy Component

  1. In Siebel Tools, choose Workflow Policy Object in the OE.
  2. In the OBLE, choose the object definition with Account in the Name property.
  3. In the OE, expand Workflow Policy Object then choose the Workflow Policy Component object type.
  4. In the OBLE, create a new record and enter a value in the Name property for the new Workflow Policy Component.
  5. Enter a value in the Source Table Name property.
  6. Enter a value in the Source Column Name property.

    The Source Column Name property establishes a relationship between the workflow policy component you are currently defining and the primary policy component.

  7. Identify the set of columns for the workflow policy component you just defined that you must monitor:
    1. In Siebel Tools, navigate to the Workflow Policy Column OBLE.
    2. Identify the column in the predefined workflow policy columns that has an activity assigned to it but is not currently exposed in the Workflow Policy Component Column OBLE.

Defining a Workflow Policy Component Column

This topic describes how to associate a column with a workflow policy component.

Your business can use specialized terminology that more clearly defines the environment within your company. You can use the Alias property in the Workflow Component Columns OBLE to create a custom label. Then, you can use this label when referring to the workflow component column definition.

Values that appear in the Condition Field picklist on the Conditions applet of the Workflow Policies view in the Siebel client are populated from the Alias property.

Adding or Modifying a Workflow Policy Component Column

To create a new workflow policy object or if you need to add new columns to an existing workflow policy object, you add or modify a Workflow Policy Component Column object definition to the workflow policy object.

To add a Workflow Policy Component Column to a Workflow Policy Object

  1. In Siebel Tools, navigate to the Workflow Policy Columns OBLE.
  2. Query the Name property for the name of the column you need to modify.

    If the query returns no results, create a new Workflow Policy Column object definition that references the required data table and data table column.

  3. Navigate to the Workflow Policy Objects OBLE, then locate the required object definition.
  4. In the OE, choose the Workflow Policy Component object type, then locate the required object definition in the Workflow Policy Components OBLE.
  5. In the OE, choose the Workflow Policy Component Col object type.
  6. Define your customization:
    • If you are creating a new definition, from the application-level menu, choose Edit > New Record, then add values to the Workflow Column Name and Alias properties, as necessary.
    • If you are modifying an existing definition, locate the required Workflow Policy Component Column object definition, then modify the Alias property.

      When defining the Workflow Column Name property, use the picklist to choose a column from the current set of columns available for this Workflow Policy Component.

      Note that if the workflow policy component column that you must monitor is not in the list, you must define a new object definition for it by using the Workflow Policy Columns OBLE.

  7. In the OE, choose the Workflow Policy Object object type.

    By default, the Workflow Policy Object with the name of the object you just modified should be the active record in the OBLE.

  8. From the application-level menu, choose Tools > Compile Selected Objects, then click Compile.
  9. In the Siebel client, navigate to Administration-Business Process > Policies.
  10. In the Policies List applet, click the Query button.
  11. In the Workflow Object field query for the workflow object you just modified, then click Go.

    Note that your custom alias appears in the Condition Field picklist in the Conditions applet.

Example of Modifying a Workflow Policy Component Column to Display a Custom Organization Label

This topic gives one example of modifying a workflow policy column. You might use this feature differently, depending on your business model.

In this example, the sales department in your company needs to refer to the person who is handling the opportunity as the Opportunity Primary Sales Associate.

To modify a Workflow Policy Component Column to change the opportunity organization label

  1. In Siebel Tools, locate the Workflow Policy Object named Opportunity in the Workflow Policy Objects OBLE.
  2. In the OE, choose the Workflow Policy Component object type, then choose the Workflow Policy Component named Opportunity in the OBLE.
  3. In the OE, choose the Workflow Policy Component Col object type.
  4. Locate the Workflow Policy Component Column named Opportunity Primary Sales Rep Position, then change the Alias property to Opportunity Primary Sales Associate.
  5. In the OE, choose the Workflow Policy Object object type.

    By default, the Workflow Policy Object named Opportunity should be the active record in the OBLE.

  6. From the application-level menu, choose Tools > Compile Selected Objects, then click Compile.
  7. In the Siebel client, navigate to Administration-Business Process > Policies.
  8. In the Policies List applet, click the Query button, enter New Opportunity in the Name field, then click Go.
  9. In the Conditions applet, create a new record, setting the Condition Field to Opportunity Primary Sales Rep Position, and the Operation to IS ADDED.

    Note that your custom alias appears in the Condition Field picklist.

Defining a Workflow Policy Program

This topic describes how to define a workflow policy program. A workflow policy program is a generic event that actions are based on. You define a program by defining the workflow policy event.

CAUTION:  Do not rename or change the name of an existing workflow policy program. Doing so can result in the loss of actions created for the program.

When defining a Workflow Policy Program that inserts new records, you must determine and provide the minimum field values that constitute a valid record for the inserted record, as defined in the repository for the table. Values you should provide include:

  • Provide values for required columns that constitute the inserted record. If a default value is defined for a column, that default value is used on the insert if the program specifies none. For example, S_EVT_ACT has two required columns: NAME and ROW_STATUS. ROW_STATUS defaults to Y so you do not have to set a value in the program.
  • It is not necessary for you to provide a value for system generated columns such as CREATED, CREATED BY, LAST_UPD, LAST_UPD_BY, ROW_Id, MODIFICTION_NUM, CONFLICT_Id.

For more information, see Siebel Data Model Reference.

CAUTION:  Thoroughly test SQL queries you plan to use with custom policy programs. Be aware that if the SQL statement fails to find rows, the workflow policies action is unable to process a token.

Copying an Existing Workflow Policy Program Object Definition

The advantage of copying an existing workflow policy program object definition is that if something goes wrong with your customized workflow policy program, you can always start over with the original, unmodified workflow policy program.

NOTE:  It is recommended that when you define a new Workflow Policy Program, you first copy an existing workflow policy program object definition that is similar to what you need, then modify the copy to suit your specific business requirements.

Also, when you modify a copy of an existing workflow policy program, you can often reuse a significant portion of the preexisting configuration, which leads to fewer errors than if you create an entirely new workflow policy program.

To create a Workflow Policy Program

  1. In Siebel Tools, in the OE choose the Workflow Policy Program object type.
  2. In the OBLE, choose an existing Workflow Policy Program object definition that is similar to what you need for the new workflow policy program.
  3. Right-click then choose Copy Record. This copies the entire program, including the program arguments.
  4. In the new Workflow Policy Program object definition, modify the appropriate properties to meet the needs of the new program, such as Workflow Object.
  5. Define the program arguments.

    Enter the arguments carefully to make sure capitalization, punctuation, and spelling are correct:

    • Type the entries in the Name column exactly as indicated in Table 126. Primary ID, Primary Table, Operation Type, SQL Statement, and SQL Statement Outputs must have one space between each word and each word must be properly capitalized. For example, Primary Id must have one space between the two words, capital P, and lowercase d.

      NOTE:  In program arguments, the carriage return character that exists in SQL Statement and SQL Statement Outputs can cause unexpected behavior for a workflow policy program. In most cases, the substitution value is not substituted with the intended value but is instead substituted with the [Label] literally. Avoid using the carriage return character.

    • When using SQL statements in program arguments, make sure the statements are specific to the particular RDBMS you are using.
    • Type the names of the column pairs exactly: One space between each word, identically capitalized, one space in front of the left parenthesis and no spaces in the column.
    • The order of the rows is not important.

NOTE:  Before using a program and the program's related program arguments in a workflow policy, you must delete inactive or incomplete program argument definitions. These can cause Workflow Monitor Agent errors.

Defining a Workflow Policy Program Argument

This topic describes how to define a Workflow Policy Program Argument.

Example of Creating a Workflow Policy Program Argument to Send Opportunity Email

This topic gives one example of using a workflow policy program argument to send an email. You might use this feature differently, depending on your business model.

The example described in this topic adds a new a workflow policy program argument, in this case, Send Opportunity Email. The current recipients of type relative are limited to the Primary Sales representative. You need to add a relative for Primary Contact. This allows policy makers to create an action that sends an email to the Primary Contact for an opportunity.

To add an alternative Send to Relative to the send opportunity email program

  1. In Siebel Tools, navigate to the Workflow Policy Programs OBLE.
  2. In the OE, choose the Workflow Policy Program Arg object type.
  3. Make sure an object definition named Send to Relative exists in the Workflow Policy Program Arguments OBLE.
  4. Create a new record, setting the Name property to Primary Contact.

    Note that anew workflow policy program argument cannot have the same name as an SQL Statement Output. If an attempt is made to add a new program argument that does have the same name as an SQL Statement Output, the Monitor Agent server task suspends and display the message Examining request for policy.

  5. Click in the Default Value property.
  6. In the compose box, create your SQL statement. For example:

    select O.PR_CON_ID, 'Send to Contact'
    from &Table_Owner.S_OPTY O
    where O.ROW_ID=?

    Workflow passes the ROW_ID of the violating row, so be sure your SQL queries use the same ROW_ID. In this example, the WHERE clause is written to use the ROW_ID of the opportunity row that violates the policy.

    Certain requirements must be considered when creating an SQL statement. For more information, see Creating an SQL Statement for a Workflow Policy Program Argument

    TIP:   SQL statements are database vendor-specific. Use an external SQL tool to build and test your statements. When the test works, copy the statement into the field.

  7. Set the PickList property to Workflow Relative Type Picklist.

    This picklist identifies this argument as a relative.

Note that the Visible field is checked for your new Workflow Policy Program Argument object definition. The changed field becomes checked when you create a new program argument.

Creating an SQL Statement for a Workflow Policy Program Argument

An SQL statement written for a Workflow Policy Program Argument must include:

  • The table name and column name you reference must be uppercase.
  • The case-sensitive table name must be prefixed with &Table_Owner.
  • The SQL statement must be valid for the specific database vendor being used.
Considerations When Using SQL Statements for a Workflow Policy Program Argument

Considerations when using SQL statements for a workflow policy program argument include:

  • It is recommended that a workflow program SQL statement return only one record. To be sure, initiate statements that use outer joins rather than inner joins.
  • Only one SQL statement policy program argument can be used for a given Workflow Policy Program. Do not use two or more SQL statement program arguments for a Workflow Policy Program.

CAUTION:  It is recommended you thoroughly test your SQL queries prior to implementing them as Workflow program SQL statements.

Siebel Business Process Framework: Workflow Guide Copyright © 2008, Oracle. All rights reserved.