Siebel Business Process Framework: Workflow Guide > Administering, Testing, and Migrating Workflow Policies > Administering Workflow Policies >

Expiring a Workflow Policy


When you expire a workflow policy, you can remove rows that belong to the expired or workflow policy in the S_ESCL_REQ table, which is preferable to deleting the workflow policy.

To expire a workflow policy

  1. Make a backup copy of the Siebel database or the effected tables.

    If necessary, you can use this backup later to restore the tables to their state that existed before you deleted rows.

  2. Use SQL to manually delete the rows that reference expired or deleted workflow policies. Delete these workflow policies according to RULE_ID.

    For example:

    delete from table name where RULE_ID = 'rule_id'

    Siebel CRM does not support direct delete or update statements on the Siebel database. Also, the following tables are the only tables that do not contain dependencies. Make sure you perform this procedure in accordance with Siebel Support guidelines:

    • S_ESCL_REQ
    • S_ESCL_ACTN_REQ
    • S_ESCL_STATE
  3. Expire the workflow policy:
    1. Log in to the Siebel client, and then navigate to Administration-Business process screen.
    2. Locate the workflow policy you must expire in the Policies view.
    3. Enter a date and time in the Expiration field that has already occurred.
  4. To delete database triggers that reference expired workflow policies, run the Generate Triggers server task with the following parameters:

    Drop Triggers:

    EXEC = True
    Remove = True

    Generate Triggers:

    EXEC = True
    Remove = False

    If some workflow policies are expired, and if these policies did not drop and recreate database triggers, then the database triggers for these policies can still cause Siebel CRM to insert records in the tables for Siebel Workflow. Dropping these database triggers prevents Siebel CRM from creating rows in the S_ESCL_REQ table that are related to expired policies.

  5. If necessary, recreate database triggers.

    For more information, see Configuring Database Triggers.

  6. If the errors continue, then get help from Oracle.

    Include a description of the steps you performed to resolve the error, along with a copy of the Workflow Monitor trace files with the following traces set:

    Error Flags = 2
    SQL Trace Flags = 2

    For more information, see How to Get Help with an Error of a Workflow Process.

Resolving a Problem That Fails to Load Parent Rows

If Siebel CRM displays a Failed to Load Parent Rows error message, then it might be due to the presence of rows in the S_ESCL_REQ, S_ESCL_STATE table and the S_ESCL_ACTN_REQ table that reference an expired workflow policy. This topic describes how to use SQL queries to determine if rows exist in these tables that reference a policy that no longer exists in the S_ESCL_RULE table.

To resolve a problem that fails to load parent rows

  1. Look for the following error message in the WorkMon_file_number.log trace file:

    [DBG33] 2000-01-24 08:49:30 Message: Rule not found
    [DBG33] 2000-01-24 08:49:30 Message: Failed to load parent rows

    Siebel CRM logs this error message if Workflow Monitor agent attempts to process records from the S_ESCL_REQ, S_ESCL_STATE table or the S_ESCL_ACTN_REQ table but the workflow policy that it is trying to review is expired or deleted.

  2. To determine if records exist that reference an expired workflow policy, run the following query:

    select row_id, name, expire_dt
    from s_escl_rule
    where expire_dt is not null and expire_dt <= getdate()

    Sysdate is an Oracle date time function. The corresponding function for SQL Server is getdate.

  3. Note the ROW_ID for the expired workflow policy identified in Step 2.
  4. To determine the number of records that exist in the S_ESCL_REQ table that reference an expired workflow policy, run the following query:

    select * from s_escl_req where rule_id in (select row_id from s_escl_rule where expire_dt is not null and expire_dt <= getdate())

  5. Repeat Step 4 for the S_ESCL_STATE and S_ESCL_ACTN_REQ tables.
  6. If records exist in the S_ESCL_REQ, S_ESCL_STATE table, or the S_ESCL_ACTN_REQ table that reference an expired workflow policy, then log in to the Siebel client and start the Workflow Monitor Agent with Ignore Errors set to TRUE.

    Workflow Monitor Agent can bypass the error and clean the S_ESCL_REQ table.

    CAUTION:  To clean up the workflow tables, you can temporarily set Ignore Errors to True. It is strongly recommended that you do not permanently set Ignore Errors to True.

  7. Stop the Siebel Server task.
  8. Restart the Siebel Server task with Ignore Errors set to FALSE.

    This step makes sure you do not overlook other types of errors.

  9. If the errors continue, then delete rows by RULE_ID, expire old workflow policies, and delete database triggers.
Siebel Business Process Framework: Workflow Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.