on 10-02-2006 4:20 PM
Hi experts,
I have a WF where at one stage the user ends on a decision task where he selects an option for wich an task need to be executed in background.when the task finishes the WF returns to the decision task which is assigned to the same person. but because of the intermediate background task the Work item finishes and the user need to reselect the WI in his inbox.
is there a way to keep the WI active, so it doensn't return in the inbox of the end user.
this works fine when 2 subsequent tasks are assigned to the same user, for the end user the WF stayed on his screen.
that's what I want to simulate here.
end user select an option, background task executed and the end user have the next decistion task automatically displayed whithout having to go to his inbox and reselect the work item.
any idea ?
regards,
Abdelaltif
hi,
In the step definition there's an option called continue with dialog, set this one active for all of the steps, this will continue executing workitems until one goes into error or when a user is needed (it's explained if you press F1 on the checkbox)
Kind regards, Rob Dielemans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to convert the background task to a foreground task and have the agent for this task same as the agent for decision task. Also have the 'Advance with dialog' checked on this task.
In this way the user will think that it is s background task but it is not. Instead it is executed in the foreground. Also since the agents for all the 3 tasks is same and have the 'Advance with dialog' switched on, the user will come back to the same decision screen without going back to the inbox.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abdellatif,
In that case it is not possible in a straightforward way: By switching userIDs you are ending the 'flow' of execution, the user context is lost.
A workaround is possible by executing your background task asynchronously. I don't mean in the asynch task sense, but to execute it parallel to the user decision.
This has some postential pitfalls because you need to consider what happens if the BG task fails but may just work depending on your scenario:
Put your background step into it's own workflow, then
Either call SAP_WAPI_START_WORKFLOW with the START_ASYNCHRONOUS flag set in a dialog step, or raise an event which triggers the flow.
You could handle failure by raising an event from the subwf which the calling flow waits for, but it would result in the user having a decision which is cancelled after he has seen the decision screen. Not pretty but you could send them an explanatory mail from your subflow.
Hope that helps.
Cheers,
Mike
Hi,
Definitely won't work. A different user breaks the dialog chain. The only way to get that to work is to start a new WF which runs independent of the current user context.
Why bother with a background job? Using events is much easier, runs quicker and does the same. Simply create a custom event on the object, put a 'raise event' step where your background step is, and put your bg step into a new WF triggered by the event.
Cheers,
Mike
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.