This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Duplicate "call method MakeDecision" jobs being generated

In version 8.0, I infrequently get frozen standard jobs of type JobChainName = "Created by QBMDBQueueProcess: call method MakeDecision for object type personwantsorg" with ErrorMessages =

Error saving <PersonWantsOrg-Display>: [810306] Error during execution of 'OnSaved' in logic module 'QER.Customizer.PersonWantsOrg'.
[810092] <PersonWantsOrg-Display> was changed by another user.
Method MakeDecision was called for 1 object(s) of type personwantsorg.

I found out that the reason for the error is the fact that in the error scenario, there are two jobs being generated (within milliseconds), the first one succeeds, the second one runs into the error. Sometimes, the job that started first runs into the error while the job started second succeeds (obviously, race condition). In any case it is wrong that two jobs for the same PWO are being generated. The Where condition of the two jobs is identical and looks like this:

(uid_personwantsorg = '1c8c3652-856d-4f4d-bf73-e3ae94ba7fc3' and DecisionLevel =          3) and ( OrderState in (select OrderState from QER_VPWOOrderState where IsOrder = 1))

So far I was not able to find a reasonable explanation for this bevahiour. Where do I need to look for a possible source of this problem, or could it be some flaw in the 1IM standard processing?

Any hints on this issue are highly appreciated. Thank you.

  • You have identified the problem well. Please check workflow . As the decisionlevel is 3. It is the fourth step from the top that is being executed twice. I hope you'll find something.

  • Tomi, thank you for your answer. I am providing workflow details in this posting. The workflow only consists of EX and CD steps (unfortunately I am not able to upload a screenshot of the workflow from Manager tool), as follows:

    Level PWODecisionStep
    0 EX  Wait for child PWOs
    1 CD  IsManual Provisioning
    2 EX  Wait for Childs IdAdmin Verification
    3 CD  Verify Previous Parent Exists?
    4 EX  Wait for TroubleTicket
    5 EX  Wait for All childs
    The Condition of the Calculated Decision in Level 1 looks like this:
    EXISTS(
     SELECT 1 FROM PersonWantsOrg
     WHERE UID_PersonWantsOrgParent = '@UID_PersonWantsOrg'
     AND CCC_ProvisioningType = N'Manual'
    )

    Since the specific PWO does not have value 'Manual' in column CCC_ProvisioningType, it branches from Level 1 to Level 3 (with value 'Manual' it would branch to Level 2).

    The two jobs "Created by QBMDBQueueProcess: call method MakeDecision for object type personwantsorg" with condition
    (uid_personwantsorg = '1c8c3652-856d-4f4d-bf73-e3ae94ba7fc3' and DecisionLevel =          3) and ( OrderState in (select OrderState from QER_VPWOOrderState where IsOrder = 1))
    are being generated right after the calculated decision in Level 1 completed.

    Here's the info from PWODecisionHistory:

    SELECT XDateInserted, DecisionLevel, Ident_PWODecisionStep, IsDecisionBySystem, DecisionType, ReasonHead
    FROM PWODecisionHistory
    WHERE UID_PersonWantsOrg = '1c8c3652-856d-4f4d-bf73-e3ae94ba7fc3'
    ORDER BY XDateInserted

    2018-05-18 13:59:32.277 0 NULL    0 Order NULL

    2018-05-18 14:08:39.033 0 Wait for child PWOs  1 Grant #LDS#Automatic system approval with method EX: Condition was met.

    2018-05-18 14:09:28.720 1 IsManual Provisioning  1 Dismiss #LDS#Automatic system approval with method CD : Condition was not met.

    2018-05-18 14:10:29.037 3 Verify Previous Parent Exists? 1 Dismiss #LDS#Automatic system approval with method CD : Condition was not met.

    2018-05-18 14:53:39.527 5 Wait for All childs  1 Grant #LDS#Automatic system approval with method EX: Condition was met.

    Here's the info from JobHistory:

    SELECT StartAt, EndedAt, WasError, ErrorMessages FROM JobHistory 
    WHERE BasisObjectKey = '<Key><T>PersonWantsOrg</T><P>1c8c3652-856d-4f4d-bf73-e3ae94ba7fc3</P></Key>'
    AND JobChainName = 'Created by QBMDBQueueProcess: call method MakeDecision for object type personwantsorg'
    ORDER BY XDateInserted

    2018-05-18 14:08:49.533 2018-05-18 14:09:28.783 0 NULL

    2018-05-18 14:09:28.847 2018-05-18 14:14:28.837 1 (2018-05-18 14:10:29.177) Error saving ...

    2018-05-18 14:09:28.863 2018-05-18 14:10:29.083 0 NULL

    The job that started at 14:08:49.533 is the call_MakeDecision job for Level 1 (the first CD step in workflow) with condition:
    (uid_personwantsorg = '1c8c3652-856d-4f4d-bf73-e3ae94ba7fc3' and DecisionLevel =          1) and ( OrderState in (select OrderState from QER_VPWOOrderState where IsOrder = 1))

    As you can see, right after this job ended at 14:09:28.783, two call_MakeDecision job for Level 3 are being generated: one at 14:09:28.847 and the second one at 14:09:28.863 (in this case, the second job succeeds while the first one gets the error).

    I still don't see a reason in workflow setup why this is happening. Any suggestions?