/** puts instance into the PayloadMap */
 public void resumeWorkflow(Workflow instance) throws WorkflowException {
   List<Workflow> all = payloadMap.get(instance.getWorkflowData().getPayload());
   if (all == null) {
     all = new ArrayList<Workflow>();
     payloadMap.put(instance.getWorkflowData().getPayload(), all);
   }
   all.add(instance);
 }
 /** just removes the instance from the PayloadMap */
 public void terminateWorkflow(Workflow instance) throws WorkflowException {
   List<Workflow> all = payloadMap.get(instance.getWorkflowData().getPayload());
   if (all != null) {
     all.remove(instance);
   }
 }