예제 #1
0
 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)
       });
 }
예제 #2
0
 public String getOutputSkeletonXML(String caseID, String taskID) {
   YParametersSchema params = _paramsDefinitions.getParamsForTask(taskID);
   YWorkItem item = _engineClient.getWorkItem(caseID + ":" + taskID);
   YSpecificationID specID = item.getSpecificationID();
   YTask task = _engineClient.getTaskDefinition(specID, item.getTaskID());
   return Marshaller.getOutputParamsInXML(
       params, task.getDecompositionPrototype().getRootDataElementName());
 }
예제 #3
0
 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"
       });
 }