Classes as event receivers

Dart, Jocelyn jocelyn.dart at sap.com
Tue Dec 19 18:46:11 EST 2006


ESS Leave....  always started with a long list of container values and
no main object.  
And yes... nasty approach but still works. 

Regards,
Jocelyn Dart
Senior Consultant
SAP Australia Pty Ltd.
Level 1/168 Walker St.
North Sydney 
NSW, 2060
Australia
T   +61 412 390 267
M   + 61 412 390 267
E   jocelyn.dart at sap.com
http://www.sap.com

The information contained in or attached to this electronic transmission
is confidential and may be legally privileged. It is intended only for
the person or entity to which it is addressed. If you are not the
intended recipient, you are hereby notified that any distribution,
copying, review, retransmission, dissemination or other use of this
electronic transmission or the information contained in it is strictly
prohibited. If you have received this electronic transmission in error,
please immediately contact the sender to arrange for the return of the
original documents. 
Electronic transmission cannot be guaranteed to be secure and
accordingly, the sender does not accept liability for any such data
corruption, interception, unauthorized amendment, viruses, delays or the
consequences thereof.
Any views expressed in this electronic transmission are those of the
individual sender, except where the message states otherwise and the
sender is authorized to state them to be the views of SAP AG or any of
its subsidiaries. SAP AG, its subsidiaries, and their directors,
officers and employees make no representation nor accept any liability
for the accuracy or completeness of the views or information contained
herein. Please be aware that the furnishing of any pricing information/
business proposal herein is indicative only, is subject to change and
shall not be construed as an offer or as constituting a binding
agreement on the part of SAP AG or any of its subsidiaries to enter into
any relationship, unless otherwise expressly stated. 


-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Bakker, Paul
Sent: Wednesday, 20 December 2006 10:35 AM
To: SAP Workflow Users' Group
Subject: RE: Classes as event receivers

Crikey! No main object? I didn't think that was possible.

Can you please give an example of a workflow that would start without an
object? 

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Dart, Jocelyn
Sent: Wednesday, 20 December 2006 9:24 AM
To: SAP Workflow Users' Group
Subject: RE: Classes as event receivers

Hi Phillip, 

You might be better off looking at one of the standard event receiver
function modules or at class CL_SWF_EVT_EVENT. 

Of course passing an object key is not mandatory (not every workflow has
a main object when started) so it may be that particular event linkage
only uses the container. 
 


Regards,
Jocelyn Dart
Senior Consultant
SAP Australia Pty Ltd.
Level 1/168 Walker St.
North Sydney
NSW, 2060
Australia
T   +61 412 390 267
M   + 61 412 390 267
E   jocelyn.dart at sap.com
http://www.sap.com

The information contained in or attached to this electronic transmission
is confidential and may be legally privileged. It is intended only for
the person or entity to which it is addressed. If you are not the
intended recipient, you are hereby notified that any distribution,
copying, review, retransmission, dissemination or other use of this
electronic transmission or the information contained in it is strictly
prohibited. If you have received this electronic transmission in error,
please immediately contact the sender to arrange for the return of the
original documents. 
Electronic transmission cannot be guaranteed to be secure and
accordingly, the sender does not accept liability for any such data
corruption, interception, unauthorized amendment, viruses, delays or the
consequences thereof.
Any views expressed in this electronic transmission are those of the
individual sender, except where the message states otherwise and the
sender is authorized to state them to be the views of SAP AG or any of
its subsidiaries. SAP AG, its subsidiaries, and their directors,
officers and employees make no representation nor accept any liability
for the accuracy or completeness of the views or information contained
herein. Please be aware that the furnishing of any pricing information/
business proposal herein is indicative only, is subject to change and
shall not be construed as an offer or as constituting a binding
agreement on the part of SAP AG or any of its subsidiaries to enter into
any relationship, unless otherwise expressly stated. 


-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Kisloff, Philip B
Sent: Tuesday, 19 December 2006 10:58 PM
To: SAP Workflow Users' Group
Subject: RE: Classes as event receivers

Hi Mike,

As the event generation is set in customising, I doubt if the
event_container is filled - but I'll look carefully asap. 
If not there, and I wanted this to work, I see I would have to introduce
an intermediary receiver function module that moves the object key to
the container, and have a class receiver from that one. That's unless
there aren't other pre-requisites for using BOR with OO that Jocelyn
talks about at the end of her blog?

But now you've tweaked my curiosity - why can't the receiver do quite a
bit of processing ? What are the cons ? For the pro, I was thinking the
work has to be done somewhere, so why generate a workflow step or steps
for an ultimately purely background task.

Regards

Phil

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]On Behalf
Of Mike Pokraka
Sent: 19 December 2006 11:34
To: SAP Workflow Users' Group
Subject: RE: Classes as event receivers


Hi Phil,
"The receiver does quite a bit of processing" - this already sounds like
it should maybe not be in an event linkage.

Yes you can mix and match *event types*, but it sounds like what you're
trying to do is mixing concepts - an receiver class would have to accept
a container as a parameter. I don't have a NW system available right now
but I imagine that's where your object key would live. Normally the
event really just serves as a definition - a name by which the event
manager can look up in the receiver table what should be triggered.

Cheers,
Mike


On Tue, December 19, 2006 10:58, Kisloff, Philip B wrote:
> Hi Mike,
>
> Thanks for those suggestions. I've just read Jocelyn's blog, and I
think
> I need to explain a bit more about what I'm trying to do.
>
> The event created is from a traditional BOR event 'assigned', from the

> ArchiveLink area. Although I don't have a content repository in the 
> testdrive, our 4.6C production system does, and I was curious to see
how
> the workflow could be re-written with objects. So I can re-create the 
> assigned event with the object key filled in. The receiver for this 
> event does quite a bit of processing and only starts a workflow for 
> exception handling. A one-to-one replacement of the receiver function 
> module with a receiver class was my intention.
>
> I now suspect I'm trying to mix'n'match BOR and classes in the event 
> linkage table, which is a different question entirely!
> Would be why there is no event details in the container. Perhaps it 
> can't/shouldn't be done.
>
> Not got access to the testdrive system right now, so apologies for not

> trying again before typing a response.
>
> regards
> Phil
>
>
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu]On
Behalf
> Of Mike Pokraka
> Sent: 19 December 2006 10:24
> To: SAP Workflow Users' Group
> Subject: Re: Classes as event receivers
>
>
> Hi Phil,
>
> It's much simpler than that. The event is not really used in the class

> sense and in a workflow context isn't handled by the class, and you 
> don't really need the BI_...interface (at least I've always simply 
> entered
it
> directly into the linkage).
>
> It serves just for the sake of definition. The WF system handles the 
> event, not the class. The object key is in an event container which
gets
> passed to the event receiver in the usual way.
>
> Jocelyn has done a sterling job of describing this in great detail:
> https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4089
>
> Cheers,
> Mike
>
> On Mon, December 18, 2006 22:59, Philip Kisloff wrote:
>> Hi all,
>>
>> I want to create an event receiver using a class instead of a
function
>> module. I've created a class with user interface 
>> BI_EVENT_HANDLER_STATIC, as I can only see classes using that
> interface
>> are selectable in the event linkage table.
>>
>> Fortunately, it works - but only up to a point. I can create the
event
>> and in synchronous mode break-point inside the method ON_EVENT.
>> Unfortunately, the next step is defeating me: how to pick up the
> object
>> key? I've tried including interface IF_SWF_EVT_EVENT and calling
> method
>> GET_OBJECT_KEY, but the attribute m_standard_elements-objkey is just
> not
>> getting filled.
>>
>> Am I missing something obvious ? Or not so obvious ? I'm using the
SAP
>> WAS 6.40 testdrive.
>>
>> Phil
>>
>> _______________________________________________
>> SAP-WUG mailing list
>> SAP-WUG at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/sap-wug
>>
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>


_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug


***********************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  
Any attachments should be checked for viruses by you, before being
opened. SunWater accepts no responsibility for an attachment that
contains a virus.
***********************************************************************

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug




More information about the SAP-WUG mailing list