@Override
    public void executeWorkItem(WorkItem wi, WorkItemManager wim) {
      for (String k : wi.getParameters().keySet()) {
        System.out.println("Key = " + k + " - value = " + wi.getParameter(k));
      }

      wim.completeWorkItem(wi.getId(), null);
    }
 @Override
 public void executeWorkItem(WorkItem wi, WorkItemManager wim) {
   for (String k : wi.getParameters().keySet()) {
     System.out.println("Key = " + k + " - value = " + wi.getParameter(k));
   }
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("out_test_successful", "true");
   params.put("out_test_report", "All Test were SUCCESSFULY executed!");
   wim.completeWorkItem(wi.getId(), params);
 }
  @Override
  public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
    Task task = createTaskBasedOnWorkItemParams(workItem);
    ContentData content = createTaskContentBasedOnWorkItemParams(workItem);
    connect();
    TaskAddedHandler taskAddedHandler = new TaskAddedHandler(workItem.getId());

    if (isAutoClaim(workItem, task)) {
      taskAddedHandler =
          new TaskAddedAutoClaimHandler(
              workItem.getId(), (String) workItem.getParameter("SwimlaneActorId"));
    }

    client.addTask(task, content, taskAddedHandler);
  }
 public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
   String emailAddress = (String) workItem.getParameter("emailAddress");
   String message = (String) workItem.getParameter("message");
   // Simulate sending an email
   System.out.println("to: " + emailAddress + " --> " + message);
 }
 @Override
 public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
   GetTaskResponseHandler abortTaskResponseHandler = new AbortTaskResponseHandler(client);
   client.getTaskByWorkItemId(workItem.getId(), abortTaskResponseHandler);
 }
Exemplo n.º 6
0
 public VariableResolver getVariableResolver(String name) {
   return new SimpleValueResolver(workItem.getResult(name));
 }
Exemplo n.º 7
0
 public boolean isResolveable(String name) {
   return workItem.getResult(name) != null;
 }