Avoiding workflow collisions

yegorm yegorma at gmail.com
Thu Jul 3 09:46:31 EDT 2014


Hi Volker,

First of all I would like to recommend you another SCN blog post, that
gives good coverage of the subject:
 "A grown-up Singleton concept for Workflow instances (3 step approach)"
 by Florin Wach

http://scn.sap.com/community/bpm/business-workflow/blog/2013/05/05/the-super-singleton-concept-for-workflow-instances-3-step-approach

I think that your approach is similar to step 1 in the post.
According to the post, this approach might fail in a highly concurrent
environment, because there is always some non-zero time interval from the
moment you call SAP_WAPI_START_WORKFLOW to the moment, when the started
workflow becomes visible through SAP_WAPI_WORKITEMS_TO_OBJECT.
So you probably should examine your environment and consider taking further
steps.

When I once had a similar requirement. It was a workflow that brought some
custom business object to functional administrators for correction in case
of occasional customizing errors. The likelihood of errors happening
simultaneously was very low, also it would not have been a big problem if
an administrator got some object twice. So, the simplicity of 'step 1'
approach seemed definitely the right choice.



On Thu, Jul 3, 2014 at 4:29 PM, Wegert, Volker <
volker.wegert at helios-kliniken.de> wrote:

>  Hello,
>
>
>
> I have a scenario which is slightly related to
> http://scn.sap.com/community/bpm/business-workflow/blog/2013/02/25/more-common-mistakes-made-by-workflow-beginners,
> item 16: I have two workflows that operate on the same business object
> (represented by an OO class in this case, not a BOR object type). Both
> workflows are ad-hoc workflows, there is no system event that triggers the
> workflows. I need to ensure that for each individual business object only
> one workflow instance of these two workflow definitions is running at any
> given time. Since there is not event linkage, I can’t use a check function
> module for this.
>
>
>
> The workflows are started using a simple generated form to enter the key
> of the business object. I have extended that form with some validation
> procedures – check that the business object key is valid and so on. My
> naïve approach to tackle the new issue would be to call
> SAP_WAPI_WORKITEMS_TO_OBJECT with SELECTION_STATUS_VARIANT = 0003 and my
> two task IDs in TASK_FILTER, then check if there are any items returned –
> or am I missing something there?
>
>
>
> Thanks
>
>   Volker
>
>
>
>
>
> ________________________________________________
> *HELIOS IT Service GmbH*
> IT
>
> Volker Wegert
> Teamleiter SAP i.s.h.med - Entwicklung Konzern
>
>
> Telefon:
> Mobil:
> E-Mail:
>
>
> +49 30 9401-17338
> +49 152 54777467
> volker.wegert at helios-kliniken.de
>
>
> Schwanebecker Chaussee 50 - 13125 Berlin
> Haus 211
>
>
> *Geschäftsführer:* Dirk Herzberger
> *Sitz der Gesellschaft:* Berlin
> *Handelsregister:* AG Berlin Charlottenburg, HRB 101458 B
>
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
>


-- 
Egor Malov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20140703/cc8825ec/attachment-0001.htm


More information about the SAP-WUG mailing list