@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); }