ProcessDefinitionDirectory procDefDir = null;
ProcessDirectory procDir = null;
try {
procDefDir = workflowService.processDefinitionDirectory();
procDir = workflowService.processDirectory();
ProcessMgr pmgr = procDefDir.processMgr
("timing", "cancel_test");
WfProcess process
= pmgr.createProcess(new DefaultRequester (workflowService));
process.start();
assertTrue (stateReached (process, "closed.completed"));
ProcessData pd = process.processContext();
assertTrue ("EXPIRED".equals(pd.get("wait2Result")));
assertTrue ("CANCELED".equals(pd.get("wait1Result")));