AW: Start workitem immediately within the application

Werner Kößl werner.koessl at hirschvogel.de
Mon Sep 8 02:59:36 EDT 2003


Hi Mike,
 
i took some time but last week i tried to trigger the event by myself.
I used SWE_EVENT_CREATE in a user exit of the document management.
But as you said, the user context is already lost.
It does not work although i was the creator of the workflow and not
WF_Batch.
Now i will make use of an express mail.
 
Regards,
Werner.
 
 
-----Urspr|ngliche Nachricht-----
Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
Michael Pokraka
Gesendet: Freitag, 20. Juni 2003 14:50
An: SAP-WUG at MITVMA.MIT.EDU
Betreff: Re: Start workitem immediately within the application
 
 
Hi,
That's probably not going to cut it, for the same reasons you're already
stating :-)
SWE_EVENT_CREATE is handled by the event manager, who triggers the workflow
by tRFC - even if on the same system. RFC means WF-BATCH...
 
The next problem is that status management may also happen in an update task
(most likely in fact), in which case the user context is already lost - the
user is sitting with a 'document saved' message whilst the updates are still
making their way into the DB. In this case it isn't going to work and an
express message is your best bet.
If it isn't done in an update task, you might get away with starting the
workflow directly via SAP_WAPI_START_WORKFLOW (Phil - is this what you
intended?). I'm not too sure if it will work - let us know if you're going
to try it.
 
Cheers
Mike
 
On Fri, Jun 20, 2003 at 10:39:21AM +0200, Soady, Phil wrote:
> Lieber Werner,
>
> if the event is processed and the wf started by WF-BATCH ( a background )
user,
> then how can the workflow connect back to your modi ?
> And interesting security issue.
>
> The workflow must be started by the current user. Ie no asynchronous
handling.
>
> Any chance of calling swe_event_create synchronously ?
> See the flag on the Function call.
>
> That implies no event Q ? Well, I've never tried synchronous and event q.
>
> At least now, the user should get the user decision.
>
> hth / htw
>
> Cheers
>
>
> Phil Soady
> Senior Consultant
> Business Technologies
> SAP Australia
> * : 0412 213 079
> * : phil.soady at sap.com
>
>
>
>
>
> -----Original Message-----
>> From: Werner Kv_l [mailto:werner.koessl at hirschvogel.de]
> Sent: Friday, June 20, 2003 5:35 PM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Start workitem immediately within the application
>
>
> Hi everyone,
>
> we start one workflow when someone changes the status of a document. But
the first workitem should be executed immediately after the change of the
status. (Not only created, but executed!)
>
> The first workitem is a user decision, and the receiver of the first
workitem is WF_INITIATOR. The "Advance with immediate dialog"-field is
marked in the workflow template and in the first step.
>
> But the workitem does not execute!
>
> Does anybody have an idea?
>
> Regards,
> Werner.
 


More information about the SAP-WUG mailing list