Classes as event receivers

Mike Pokraka asap at workflowconnections.com
Tue Dec 19 06:33:34 EST 2006


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
>





More information about the SAP-WUG mailing list