Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2638

Re: Advanced instantiaton of IF_WAPI_WORKITEM_CONTEXT and the WIM manager

$
0
0

Hi Mike,

 

well, the idea of using an implicit enhancement to make a "secret" object publish from the inside seems somewhat promising in the sense to get the workitem-instance, which is in progress.

 

What I'm looking for?

 

I have two ideas ... or problems: One is (or was) to make a rule-function context-aware, in which situation and state of the workitem it was called. Usually you can retrieve by a call to SWO_QUERY_REQUESTER the workitem-ID of the one, which is being executed (by a user or by the WF-Batch). But that's not used during a rule resolution and furthermore, the workitem isn't yet written onto the database - so no chance to get some information, even when you have the ID at hand.

So this is now solved, as the SAP Runtime does offer you the workitem-context, although the access is very limited, but sufficient for me at the moment, regarding this particular problem.

 

The other idea was to write a workitem-exit, let's say ... something linke ... "ZCL_DEADLINE_MOVER", that will move the deadlines counting only the workdays, and skips the weekends ... which is a very common problem. For that matter you need to have the (definition) information of the workitem (that's not a problem),... but you also need to gain access to the functionality that writes the entries to the call-back-functions, which are then processed by the RSWWDHEX in turn.

A workitem-exit can achieve this, as I've looked at the database situation, once the workitem was written to the db... but however, the solution would be a bit "dirty" in the end, and I'm looking for a more elegant way to trick around the deadlines, before they go to the database.

There's even a "deadline" class instance available as an attribute through the workitem context ... but from what I see in the debugger, this is some unfinished work in the SAP Workflow runtime, as all the elements are still initial... and calling methods there... have not really an effect.

 

So I was hoping to get hold of the internal workitem instance to get hold of the deadline creation.

 

But for both problems/ideas there is a way now and I think it could be more release-safe at the end, if I make a deadline correction in the aftermath and not during the creation. There will be a small problem left, when a deadline would had immediate effect on the workitem status; but that could be a limitation, one has to live with, for a while ... :-)

 

Thanks for the ideas and the very best wishes

Florin


Viewing all articles
Browse latest Browse all 2638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>