Siebel policy executes twice when it should only execute once

2.9k views Asked by At

My problem is that a policy is running twice, instead of once.

The policy runs when a oportunity field [status] is changed to "close". The policy executes a workflow, but when I change that field, the policy runs twice executing the workflow two times (that creates an activity for that opportunity) in a delay interval of 2-15 seconds.

I searched to see if there's another policy running in that field and I have confirmed that the policy is running twice (exactly the same policy). I tried making a query and a decision point in the workflow to "validate" if there is one activity created and it works, but only if the policy runs in a delay of >9 seconds. If it works in less than that, the workflow runs twice.

How can I resolve this?

2

There are 2 answers

0
Derick Schoonbee On

Workflow policies are used to manage database triggers. The trigger creates a record in the s_escl_req table, so see what happens here. Then:

  • Make sure you have only one Workflow Monitor Agent
  • Run Generate triggers and try again.

If you want to debug in more details, review the SIEBEL_ROOT\siebsrvr\trigger.sql file to see if your table and field apprears twice. If that is the case, you might want to expire some policies.

PS: The correct way to solve this is to search on metalink...

0
Bhasker Pandya On

Here's what I would do:

  1. Check the database triggers on the Opportunity table (S_OPTY I think) with a database utility and see if there are two triggers there by accident; the Row Id of the Workflow Policy should be in there. If this is the case, drop and regenerate triggers as stated by a previous answer.

  2. If not, see what happens in both S_ESCL_REQ (where immediate triggers are sent) and S_ESCL_STATE (where delayed triggers are sent) and look for records where BT_ROW_ID matches the ROW_ID of the S_OPTY record. This will help with further investigation. Post back!