
Originally Posted by
adepue
Say 10 different workflow instances are all waiting for "approval" from a particular user. When that user logs in, I want to present the user with their task list: the things waiting their attention.
I do this in my current app. When the user logs in, you call:
Code:
int[] currentSteps = workflow.getAvailableActions( workflowEntryId, new HashMap() );
If currentsteps contains the step you are looking for (in this case, an 'awaiting approval' step), then add that workflow to the user's to-do list.
The only extra step in your case is that you will need to assign the workflow to a specific user when it enters the 'awaiting approval' step. This can be done with Beanshell in your workflow .xml definition file, either by assigning a userId property to the workflow, or by using OSWorkflow's built-in OSUser integration.