protected void doWorkflowTask(final Object tokenId)
{
begin();
TokenContext token = getProcessFacade().getTokenById(tokenId);
// Check the process variables of the token context
Object p = token.getProcessVariableValue("globalObject");
assertTrue(p instanceof PersistedComplexParam);
PersistedComplexParam rcp = (PersistedComplexParam) p;
int nRet = rcp.getResult();
assertEquals(startValue + 1, nRet);
// Get the workflow task that is associated with our process.
WorkflowTaskCriteria criteria = new WorkflowTaskCriteria();
criteria.setTokenContext(token);
Iterator it = getProcessFacade().getworkflowTasks(criteria);
assertTrue(it.hasNext());
WorkflowTask task = (WorkflowTask) it.next();
TokenContext taskToken = task.getTokenContext();
// Check the process variables of the token context
Object p2 = taskToken.getProcessVariableValue("globalObject");
assertTrue(p2 instanceof PersistedComplexParam);
PersistedComplexParam rcp2 = (PersistedComplexParam) p2;
int nRet2 = rcp2.getResult();
assertEquals(startValue + 1, nRet2);