private void addStartedWorkItem(YWorkItem item, boolean inSequence) { String caseIDStr = item.getCaseID().toString(); String taskID = item.getTaskID(); YSpecificationID specificationID = item.getSpecificationID(); YTask task = _engineClient.getTaskDefinition(specificationID, taskID); String taskDescription = task.getDecompositionPrototype().getID(); if (null == taskDescription) { taskDescription = taskID; } boolean allowsDynamicInstanceCreation = true; try { _engineClient.checkElegibilityToAddInstances(item.getIDString()); } catch (YAWLException e) { allowsDynamicInstanceCreation = false; } _myActiveTasks.addRow( caseIDStr + taskID, new Object[] { caseIDStr, taskID, taskDescription, _formatter.format(item.getEnablementTime()), _formatter.format(item.getFiringTime()), _formatter.format(item.getStartTime()), inSequence ? "Y" : "N", new Boolean(allowsDynamicInstanceCreation), item.getDataString(), getOutputSkeletonXML(caseIDStr, taskID) }); }
private void addFiredWorkItem(YWorkItem workItem, boolean inSequence) { String caseIDStr = workItem.getCaseID().toString(); String taskID = workItem.getTaskID(); YSpecificationID specificationID = workItem.getSpecificationID(); YTask task = _engineClient.getTaskDefinition(specificationID, taskID); String taskDescription = task.getDecompositionPrototype().getID(); if (null == taskDescription) { taskDescription = taskID; } _availableWork.addRow( caseIDStr + taskID, new Object[] { caseIDStr, taskID, taskDescription, "Fired", _formatter.format(workItem.getEnablementTime()), _formatter.format(workItem.getFiringTime()), inSequence ? "Y" : "N" }); }