Java Reference
In-Depth Information
} catch (Exception e){
System.err.println(e.toString());
e.printStackTrace();
}
}
// perform all the pending activities on behalf of the
// actor
static void performActivity(Actor actor)
throws WfBase.BaseException {
// iterate on all work items of the resource
WfAssignmentIterator it # actor.get_iterator_work_item();
WfAssignment workItem;
while ((workItem # it.get_next_object())! # null ){
WfActivity activity # workItem.activity();
if (activity.workflow_state() ##
workflow_stateType.open){
if (activity.while_open() ## while_openType.running){
// if the activity is open and running completes it
activity.complete();
System.out.println
("Completed: " ! activity.name());
} else
if (activity.why_not_running() ##
why_not_runningType.not_started){
// if the activity is not started yet,
change its state to running
activity.change_state(workflow_stateType.open !
"." ! while_openType.running);
System.out.println("Started: " ! activity.name());
}
}
}
}
}
21.6
Prototype 3: User interface
This prototype focuses on providing a web-based user interface to the WfMS
developed in the previous step. The interface is built with JSP technology
(see Sidebar 16.2, page 436), the Java pages use the JFlow interface to
monitor and enact the processes.
21.6.1
Analysis
The interaction with the WfMS involves two main features:
management and monitoring of processes;
enactment of processes.
 
Search WWH ::




Custom Search