Bookshelf Home | Contents | Index | PDF |
Siebel Business Process Framework: Workflow Guide > Administering, Testing, and Migrating Workflow Policies > Administering Workflow Policies > Administering Database Triggers on the Workflow Policy ServerThis topic describes how to administer database triggers on the workflow policy server. It includes the following topics:
Overview of Creating Database TriggersThe Generate Trigger (GenTrig) server component on the Siebel Server allows you to create database triggers. Workflow Policies uses these triggers to identify the records that match workflow policy conditions. You can run Generate Triggers if you must do one of the following:
How Generate Triggers Works with a Workflow Policy That Contains Multiple ConditionsIf a workflow policy includes two or more workflow policy conditions, then Generate Triggers uses OR logic instead of AND logic. Table 64 describes example workflow policy conditions that Siebel CRM uses to create a workflow policy that references the Account object. Siebel CRM can use multiple database triggers for multiple workflow policy conditions in one workflow policy. This configuration keeps Generate Triggers functionality and Workflow Monitor Agent functionality separate:
Using an AND Condition with Multiple Database TriggersIf multiple workflow policy conditions exist in a workflow policy, then you cannot use an AND condition between database triggers. Generate Triggers can only monitor database changes. Database changes that meet different conditions might not be concurrent. Using an AND condition can cause Generate Triggers to miss many conditions. For example, assume a workflow policy contains the following workflow policy conditions: In this situation, Siebel CRM creates the following database triggers:
If you use an AND database trigger, and if a user creates a service request that does not include an activity, then Siebel CRM does not run the database trigger because the activity does not exist. If the user then adds an activity to the service request, then no database trigger runs because the service request does not change. The AND condition causes Siebel CRM to miss this violation. If you use an OR condition, and if Workflow Monitor Agent evaluates the workflow policy condition even though multiple violations exist in the S_ESCL_REQ table, then the Workflow Monitor Agent only processes one request because the other requests do not evaluate to TRUE. For more information, see Tables That Workflow Monitor Agent Uses. Configuring Database TriggersThis topic describes how to configure the Generate Triggers server component. You can configure this server component from the Siebel client or from the command line. The Siebel client and the command line use the same parameters. CAUTION: If you incorrectly define a workflow policy condition, then running Generate Triggers can result in an invalid database trigger. An invalid database trigger can prevent Siebel CRM from processing normal user transactions. It is recommended that you thoroughly test your workflow policies in a test environment before you migrate them to a production environment. To configure database triggers
Using the EXEC ParameterThe EXEC parameter specifies how to run the SQL script file automatically according to one of the following values:
If one of the following situations is true, then you must set EXEC to FALSE, you must manually run the SQL script file, and you must not use the Generate Triggers server component. For more information, see Manually Running the SQL Script File:
Manually Running the SQL Script FileAfter Generate Triggers finishes, if the EXEC parameter is FALSE, then you must run the SQL script file. To manually run the SQL script file
Guidelines for Configuring Database TriggersIf you configure the Generate Triggers server component, then it is recommended that you use the following guidelines:
Using Database Triggers with Remote UsersIf a remote user synchronizes, then Siebel CRM incorporates changes in the Siebel database. For example, it updates account information in the S_ORG_EXT table. If you configure a workflow process that creates database triggers that compare changes in the Siebel database to a workflow policy condition, and if these changes affect this condition during synchronization, then the database triggers fire and Siebel CRM writes rows to the S_ESCL_REQ table. For more information, see Tables That Workflow Monitor Agent Uses. Managing Database Triggers and Database AdministrationIt is important to make sure your database administrators are informed of database triggers that are active for a workflow process. A database update or insert event causes the database trigger to react, regardless of how the event runs. For example, if inserts to the S_SRV_REQ table exist, and if the Siebel database administrator performs a table export and import of these records, then the database triggers treat every record in the Siebel database as if it is a newly inserted record. This situation can result in Siebel CRM inappropriately modifying old records that were simply imported again. Beginning with Siebel CRM version 8.1, the Generate Triggers server task requires the Privileged User Name and Password instead of Table Owner ID and Password. Fixing Problems in the S_ESCL_REQ TableIf a database trigger runs on a workflow policy condition, then Siebel CRM inserts a record in the S_ESCL_REQ (escalation request) table. This table contains the rows that can cause a workflow policy to run. After the Workflow Monitor Agent processes a request, it removes the row from this table. A database trigger does not include the logic that you define in a workflow policy condition. The conditions in the database trigger file might not be indicative of the workflow policies that are met. When Workflow Monitor Agent runs, the records in the S_ESCL_REQ table causes Siebel Workflow to evaluate the related workflow policy conditions. The database triggers exist only to trigger the Workflow Engine to examine the workflow policy conditions. For more information about the S_ESCL_REQ table, see About the Workflow Monitor Agent. To fix problems in the S_ESCL_REQ table
|
Siebel Business Process Framework: Workflow Guide | Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |