In this example code, the WorkItemExample code retrieves a collection of starting point activity objects from the Work Item Facade. The example passes the logged-in users’ session profile information to the API in order for the API to validate the session profile and to retrieve the collection of starting point activity objects. These starting point activity objects represent the activities in the process flow where the logged in user is either the named actor or a member of a role that is the actor of the activity.
protected Collection startingPointActivities_;
...
public Collection getStartingPointList()
throws WorkItemException
{
startingPointActivities_ =
workItemFacade_.getStartingPointList(
this.getSession Profile());
return startingPointActivities_;
}
...
ActivityVO activity = null;
Iterator startingPointsIterator =
startingPointActivities_.iterator();
while (startingPointsIterator.hasNext())
{
activity = (ActivityVO) startingPointsIterator.next();
createAndSendWorkItem(activity);
}