cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow issues

Former Member
0 Kudos

Hi All

I face a certain issue intermittently with workflows.

Sometime, the workflows even after being triggered take a lot of time to appear under the workflow activities in the workbench, similarly the workflow email notifications also are quite late at times.

This happens very randomly, also the time difference sometimes reaches to half an hour.

Any thoughts on this please?..

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

This seem to be a racing condtion issue and that causes an optimistic lock error. After the workflow engine has taken a snapshot of contract/MA for edit, the MA is updated from another thread.

This could be an user or a phase change script (in contract document) or preScript (in the workflow) which updates an MA. As the contract doucment & MA can be edited independently, trying to update MA from an Contract Document Script would typically cause such racing issues

Could you check if any of your workflow or Contact document scripts are updating the Master Agreement. if yes, try avoiding that...

Thanks, Baski

Former Member
0 Kudos

Hi

To add on to the above issue, I notice that as soon as a user(eg. requester) moves the contract document to a workflow enabled phase the contract document gets locked. The approver should now get this in his workflow activities, but it doesnt reflect.

On checking the logs, I see the below errors:

//----


2011-07-12 06:45:07.562 ERROR local4 com.frictionless.contracts.ContractDb save Daemon-027: EVENT_WORKFLOW_ENGINE (-2147483448, -2147483547, 0) event_workflow_engine daemon com.frictionless.api.common.exception.DatabaseException: The Contract has been changed by requester, and your changes cannot be saved. You must discard these changes and reload the document. Object: -1781530623:1004:Contract_ABC

2011-07-12 06:45:07.573 ERROR local4 WorkflowEngineDaemon processHook Daemon-027: EVENT_WORKFLOW_ENGINE (-2147483448, -2147483547, 0) event_workflow_engine daemon com.frictionless.api.common.exception.ApplicationException: The Contract has been changed by requester, and your changes cannot be saved. You must discard these changes and reload the document. AssociatedAttribute=STANDARD_ATTRIBUTE_ID - SourceBo=-1781530623:1004:Contract_ABC - ValidatingParent=-1781530623:1004:Contract_ABC- com.frictionless.api.common.exception.ApplicationException: The Contract has been changed by requester, and your changes cannot be saved. You must discard these changes and reload the document.

//----


Seems this occurs as soon as the "addApprover" script runs in workflow prescript.

But after half an hour, I see that the same contract document now appears under the workflow activities of the approver for approval.

The issue is that the lock on the master agreement put by requester while he is moving the contract document to this locking phase still exists when the workflow engine tries to add an approver in workflow prescript.

How to get a solution to this issue?

Thanks in advance!

Former Member
0 Kudos

Hi,

Firstly, is there more than one contract document on this Master Agreement?

It sounds as though there is. If, thatu2019s the case it sounds like the workflow is going through contract document 1 and is not completed so the workflow on contract document 2 is unable to start.

Which might explain the delay of the workflow showing up on certain reports.

Things to Try:

1) Ensure that the EVENT_WORKFLOW_ENGINE daemon is up to date ( background task status - daemon reg. - event workflow daemon - heartbeat column - the dates are current )

2) Restart this deamon by deleting the trashcan in System information( this essentially restarts this daemon )

You should also open a ticket with SAP Support if this continues to be an issue.

Paul