AW: Event - object key

Dart, Jocelyn jocelyn.dart at sap.com
Thu Apr 22 21:42:12 EDT 2004


Werner,=20
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 =
top of my head so let me know
how it goes if you decide to take this approach.=20
 
You need another object e.g. COLLECTOR to act as your collection =
object.=20
E.g. create a custom object with date as the key.=20
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 =
the 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 table of object instances. =20
 
One other thought - just in case two COLLECTOR.NEWOBJECT events are =
raised at the same time, you might want to put the event queue on to =
ensure your workflow has time to process the loop.=20
 
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.=20
 
By the way, this sort of collection approach is standard in ccBPM =
(think workflow for XI) where this approach is pretty usual for =
document messaging.=20
 
Jocelyn=20
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of =
Werner 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 =
data) to certain people.
The last step of the workflow creates a new event to start a new =
workflow.
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 =
listen
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 =
each
event report its data somewhere? Then each event could start a workflow
which runs to its completion.
--
Kjetil Kilhavn
 
 
 
 
                                                                        =
                                                                        =
     =20
                    Werner Koessl                                       =
                                                                        =
     =20
                    <Werner.Koessl at hirsch        To:     =
SAP-WUG at MITVMA..MIT.EDU                                                 =
                     =20
                    vogel.com>                   cc:     (bcc: Kjetil =
Kilhavn)                                                                =
       =20
                    Sent by: SAP Workflow        Subject:     AW: Event =
- object key                                                            =
     =20
                    <Owner-SAP-WUG at MITVMA                               =
                                                                        =
 
                    .MIT.EDU>                                           =
                                                                        =
     =20
                                                                        =
                                                                        =
     =20
                                                                        =
                                                                        =
     =20
                    20.04.2004 14:27                                    =
                                                                        =
     =20
                    Please respond to                                   =
                                                                        =
     =20
                    "SAP Workflow Users'                                =
                                                                        =
     =20
                    Group"                                              =
                                                                        =
     =20
                                                                        =
                                                                        =
     =20
                                                                        =
                                                                        =
     =20
 
 
 
 
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 =
event.
That works.
Now we want to collect data. That means when the first business event =
is
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 =
find 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 =
key
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 =
the
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 =
trigger
the
event.
So what can i do?
Because i want to collect data in my workflow, so i collect the first =
data
and then create a wait step (within a loop) where i wait for the next =
data.
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 =
the
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 =
the
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 =
workflow.
I know now why i didn't work.
The system entered an entry in transaction SWEINST for my object type =
and
my
event.
But when i use SWUE to trigger the used event, it only works for the =
object
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 =
the
addressee, please notify the sender immediately by return e-mail and =
delete
this message.
Thank you.
 


More information about the SAP-WUG mailing list