Classes as event receivers

Kjetil Kilhavn KJETILK at statoil.com
Wed Dec 20 03:15:58 EST 2006


One reason for starting a workflow is the log it generates. However, if
that isn't an issue you do have a point performance-wise of course. I
have been close to being stoned by our basis department after rewriting
our approval solution to use work items instead of doing much the same
in a (non-logging) program. Not only do the work items steal application
server resources (dialog processes), the tablespace is being filled
quite a lot faster than it used to be. This is in a 46C system, but I
suspect this bit won't change when we upgrade.

My arguments about both disk and "big irons" being cheap were not
accepted as relevant :-)
-- 
Kjetil Kilhavn, Statoil OFT GBS BAS DEV SAP

 

> -----Original Message-----
> From: sap-wug-bounces at mit.edu 
> [mailto:sap-wug-bounces at mit.edu] On Behalf Of Kisloff, Philip B
> Sent: Tuesday, December 19, 2006 12: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
> 


-------------------------------------------------------------------
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