Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3575

Re: What is the best practice to prevent duplicated workflows?

$
0
0

Hello

 

Cibele Soledade de Aguiar Souza wrote:

 

Using the standard, when end user starts workflow manually he can do it several times.

 

Would it be recommended to create a task at the begining of workflow to prevent creation of a second active instance for the same object?

Ideally you should keep the latest workflow instance and cancel the previous ones. (instead if prevent creation of second active instance). You can create a background step in the workflow to read all the workitems related to WS9XXXXXX using FM SAP_WAPI_WORKITEMS_BY_TASK and then use FM SAP_WAPI_ADM_WORKFLOW_CANCEL to cancel the old instances and keep the latest one going on.

 

Regards

Sandy


Viewing all articles
Browse latest Browse all 3575

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>