AW: Event - object key

Michael Pokraka workflow at quirky.me.uk
Fri Apr 23 05:35:30 EDT 2004


Hi,
Excellent idea, just a word of caution on the event queue: Careful how yo=
u
set up your event delivery. If it's set to sequential/synch, Jocelyn's
theory should work. However if you use the queue for anything volume-base=
d
this is not ideal. Asynch or parallel settings end up collecting the even=
ts
into the queue and firing them off all at the same time. The result there=
 is
that you could end up with more simultaneous events than you were origina=
lly
trying to avoid.
Cheers
Mike
 
 
Dart, Jocelyn wrote:
> Werner,
> As you are raising the event manually in your own program anyway....
> just a couple of design thoughts... these aren't tested just off the to=
p of
> my head so let me know
> how it goes if you decide to take this approach.
>
> You need another object e.g. COLLECTOR to act as your collection object=
.
> E.g. create a custom object with date as the key.
> Add an event e.g. COLLECTOR.NEWOBJECT which has an object reference to =
your
> real business object as an event parameter.
> Instead of raising your current event, raise COLLECTOR.NEWOBJECT with t=
he
> event parameter filled with the object instance of your real business
> object.
> In your workflow wait for event COLLECTOR.NEWOBJECT based on the date, =
pick
> up the object instance from the event parameter, and add it to your tab=
le of
> object instances.
>
> One other thought - just in case two COLLECTOR.NEWOBJECT events are rai=
sed
> at the same time, you might want to put the event queue on to ensure yo=
ur
> workflow has time to process the loop.
>
> As far as starting your workflow, you could then test whether there are=
 any
> workflows out there with object COLLECTOR and the current date in the
> workflow container - if not you know to raise you real business
> object/event, if there are you know to raise the collector event.
>
> By the way, this sort of collection approach is standard in ccBPM (thin=
k
> workflow for XI) where this approach is pretty usual for document messa=
ging.
>
> Jocelyn
>
> -----Original Message-----
>> From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of W=
erner
> Koessl
> Sent: Thursday,22 April 2004 11:52 PM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: AW: AW: Event - object key
>
>
> Hey Kjetil,
>
> in my workflow i wanted to collect data from business events that are
> created.
> I started the first workflow manually. The first step is the wait step.
> When a business event is created the workflow goes through a loop and
> collects the information.
> At midnight the loop in the wf stops and sends a workitem (with the dat=
a) to
> certain people.
> The last step of the workflow creates a new event to start a new workfl=
ow.
> So i have 1 workflow each day.
>
> But if i doesn't work i send a workitem for each event!
>
> Regards,
> Werner.
>
>
> -----Urspr=FCngliche Nachricht-----
> Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
> Kjetil Kilhavn
> Gesendet: Donnerstag, 22. April 2004 15:43
> An: SAP-WUG at MITVMA.MIT.EDU
> Betreff: Re: AW: Event - object key
>
>
> Basically your problem is that you try to hack the system. There is a
> reason they are called _instance_ events. It seems that you should list=
en
> to an object type event instead - or perhaps rather re-consider your
> solution design.
>
> I can't really imagine what you are trying to do, but it sounds strange
> that you want to have a workflow which sits idle and waits for data to
> collect. Collect where and for how long? Could you change it and have e=
ach
> event report its data somewhere? Then each event could start a workflow
> which runs to its completion.
> --
> Kjetil Kilhavn
>
>
>
>
>
>                     Werner Koessl
>                     <Werner.Koessl at hirsch        To:
> SAP-WUG at MITVMA..MIT.EDU
>                     vogel.com>                   cc:     (bcc: Kjetil
> Kilhavn)
>                     Sent by: SAP Workflow        Subject:     AW: Event=
 -
> object key
>                     <Owner-SAP-WUG at MITVMA
>                     .MIT.EDU>
>
>
>                     20.04.2004 14:27
>                     Please respond to
>                     "SAP Workflow Users'
>                     Group"
>
>
>
>
>
>
> Sorry Robert, i don't know if i understood exactly what you mean.
> I explain my details:
> I trigger an event when someone creates a business event in PSV2.
> I trigger the event manually (using SWE_EVENT_CREATE) out of a FM.
> I can start a workflow and display the information of the business even=
t.
> That works.
> Now we want to collect data. That means when the first business event i=
s
> created then start a workflow.
> In the workflow there is a wait step which waits for the next business
> event.
> The problem that i have is the key:
> When i want to check if there is already an instance running i never fi=
nd a
> workflow
> or when i wait for the event that the new business event raises then it
> does not continue
> because the key from the new business event is different to the key of =
the
> running workflow.
>
>
>
> -----Urspr=FCngliche Nachricht-----
> Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
> Robert.vande.Berg at nuon.com
> Gesendet: Dienstag, 20. April 2004 14:08
> An: SAP-WUG at MITVMA.MIT.EDU
> Betreff: Re: Event - object key
>
>
> You could create your own event with >1 parameter which is a key.
> What I am not getting is that you have 1 objectinstance waiting for an
> event, but it waits for event of several different objects?
> You wait for object with key A on events of objects with key B-Z???
> You should create the instances in your workflow for the objects with k=
ey
> B-Z and for each instance create a wait step.
> OR raise the event for instance with key A and give the other keys in t=
he
> new parameters and do a check on these values.
>
> -----Oorspronkelijk bericht-----
> Van: Werner Koessl [mailto:Werner.Koessl at hirschvogel.com]
> Verzonden: dinsdag 20 april 2004 12:03
> Aan: SAP-WUG at MITVMA.MIT.EDU
> Onderwerp: AW: Event - object key
>
>
> Hi Robert,
>
> the problem in my case is that i have different keys each time i trigge=
r
> the
> event.
> So what can i do?
> Because i want to collect data in my workflow, so i collect the first d=
ata
> and then create a wait step (within a loop) where i wait for the next d=
ata.
> But the next data has an other key.
> So i don't know how to solve that!
>
> Regards,
> Werner.
>
>
> -----Urspr=FCngliche Nachricht-----
> Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
> Robert.vande.Berg at nuon.com
> Gesendet: Dienstag, 20. April 2004 11:57
> An: SAP-WUG at MITVMA.MIT.EDU
> Betreff: Re: Event - object key
>
>
> If you have >1 workflow waiting and you could trigger the event without=
 a
> key, all workflow react on the event. You would like to only trigger th=
e
> workflow which is waiting for the event for the specific key.
>
> That is the use of the key!
>
>
> SAP has set the key of the object mandatory to create an instance of th=
e
> object. That is the way to raise an event, with an instance!
>
> -----Oorspronkelijk bericht-----
> Van: Werner Koessl [mailto:Werner.Koessl at hirschvogel.com]
> Verzonden: dinsdag 20 april 2004 11:40
> Aan: SAP-WUG at MITVMA.MIT.EDU
> Onderwerp: Event - object key
>
>
> Hi workflowers,
>
> i posted to you my problem with the step "wait for event" in my workflo=
w.
> I know now why i didn't work.
> The system entered an entry in transaction SWEINST for my object type a=
nd
> my
> event.
> But when i use SWUE to trigger the used event, it only works for the ob=
ject
> key that is entered for my event in SWEINST.
> I left the field for the object key blank in SWEINST because i want to
> trigger the event for every instance. But that does not work!
> Does anybody know why i have to enter an object key???
>
> Regards,
> Werner.
>
>
>
>
> -------------------------------------------------------------------
> The information contained in this message may be CONFIDENTIAL and is
> intended for the addressee only. Any unauthorised use, dissemination of=
 the
> information or copying of this message is prohibited. If you are not th=
e
> addressee, please notify the sender immediately by return e-mail and de=
lete
> this message.
> Thank you.
>
 


More information about the SAP-WUG mailing list