Reacting Collectively

Pokraka, Michael michael.pokraka at kcc.com
Thu Aug 29 10:56:46 EDT 2002


Hmmm, interesting one. The easiest would obviously be to put something into
the DB, where all WF's can access it. The first WF to get to it will update
it, and the rest won't react.
 
But then again, a hypothetical question requires a hypothetical (if not
necessarily practical) answer:
- Create a WF which gets called to send out the notification.
- have 2 custom events, ZSTART and ZEND.
- The WF raises ZSTART and then forks
- one branch waits for ZEND (with it's own ID).
- another branch contains a loop, waiting for ZSTART (from another WF)
- another branch sends the mail with a requested start time of +10min
- if it receives a ZEND event, it commits suicide.
- if it receives another WF's ZSTART, it raises the corresponding ZEND (with
that WF's ID) in order to kill it and waits for another ZSTART.
- The waitfor ZSTART needs a deadline so that the first WF will die of old
age when nothing happens for a while.
 
The whole thing needs a couple of clever loops to ensure synchronicity, but
in effect the first WF won't receive a ZEND and will send the mail after 5
min, and all others should receive a ZEND message and simply go away.
 
Have fun
Michael
 
-----Original Message-----
From: Alon Raskin [mailto:araskin at 3i-consulting.com]
Sent: 29 August 2002 12:01
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Reacting Collectively
 
 
Hi Tomasz,
 
I will try and clarify what I am talking about. This is a hypothetical
example
but I am interested in hearing your thoughts (and anyone else who wants to
contribute).
 
1. I have 5000 instances of a Workflow currently running. Each instance is
waiting for a file to come into the system via EAI. If the file comes in
then
5000 events will be raised (one for each record in the file) and the 5000
instances will react accordingly.  If the event does not occur after a few
days
then I need to send a message to a user letting him/her know.
 
2. The problem is that when the file does not come in after a few days, each
workflow would send a message to the user. The users inbox would have 5000
messages saying that the file did not come in. This is useless and annoying
to
the user.
 
The way i understood your suggestion is to have one Master Workflow that
monitors whether the file came in and notify the users. My problem with that
approach is as follows:
 
1. What kicks off the Master Workflow? It cant be the Instance Workflow as
they
would end up kicking off 5000 instances of the Master Workflow which defeats
the purpose.
 
I look forward to your reply.
 
Regards,
 
Alon Raskin
3i Consulting Group
http://www.3i-consulting.com
 
 
 
 
 
 
 
Quoting "Zmudzin,Tomasz,VEVEY,GL-DS/DM" <Tomasz.Zmudzin at nestle.com>:
 
> Alon,
>
> I think I still don't understand the problem. If you refer to the
> additional
> scenario that sends notification as "master" workflow, you wouldn't have
> to
> restart it in case of system crash -- it would simply still be listening
> to
> the events. And if  the event that you refer to is the system crash --
> well,
> there's not much you can handle in this case.
>
> I'm sorry to be so investigative -- actually I'm quite interested in
> the
> problem as this type of control-related requirements I find
> particularly
> playful. Knowing from the previous posts that you know the subject in
> depth
> -- and still asking for other options -- actually makes me even more
> interested...
>
> Kind regards,
> Tomasz
>
>
> -----Original Message-----
>> From: Alon Raskin [mailto:araskin at 3i-consulting.com]
> Sent: Thursday,29. August 2002 09:01
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Re: Reacting Collectively
>
>
> I thought about that but then I would need to have this 'master'
> workflow
> that sat around and listened. If we ever have a system crash it would
> need
> to be manually restarted as nothing actually kicks it off. Its not
> really a
> 'Workflow' as such but rather just a little monitor.
>
> Don't get me wrong Tomasz, that approach will work its just that I
> wanted to
> see if anyone else had any other ideas.
>
> Regards,
>
> Alon Raskin
> 3i Consulting Group
> e: araskin at 3i-consulting.com
> w: http://www.3i-consulting.com
>
>
> -----Original Message-----
>> From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
> Zmudzin,Tomasz,VEVEY,GL-DS/DM
> Sent: Thursday, August 29, 2002 7:55 AM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Re: Reacting Collectively
>
> And if you defined another workflow process that would subscribe to
> that
> event and send the notification?
>
> Tomasz
>
> -----Original Message-----
>> From: Alon Raskin [mailto:araskin at 3i-consulting.com]
> Sent: Thursday,29. August 2002 08:47
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Reacting Collectively
>
>
> Hi All,
>
> I just wanted your thoughts and experiences on the following.
>
> Say I have 5000 instances of a Workflow running in my system. When a
> particular event occurs (which all the Workflow instances are listening
> for)
> I want a mail sent to the User. The hard part is that I want only one
> mail
> sent and not 5000 as I do not want to flood the users inbox with 5000
> similar messages.
>
> I am sure that others have come across a similar scenario and I hope to
> hear
> your ideas.
>
> Regards,
>
> Alon Raskin
> 3i Consulting Group
> e: araskin at 3i-consulting.com
> w: http://www.3i-consulting.com
>
 
------------------------------------------------------------------------------
This e-mail is intended for the use of the addressee(s) only and may contain privileged, confidential, or proprietary information that is exempt from disclosure under law.  If you have received this message in error, please inform us promptly by reply e-mail, then delete the e-mail and destroy any printed copy.   Thank you.
 
 =============================================================================
 


More information about the SAP-WUG mailing list