08-07-2011 05:28 PM
08-08-2011 06:36 PM
public class AdornTaskDocumentation implements TaskListener {
@Override
public void notify(DelegateTask task) {
String uuid = UUID.randomUUID().toString();
// set the UUID as a process variable
task.setVariable("taskId", uuid);
…
}
String candidateGroup = req.getParameter("rg");
if (candidateGroup != null && candidateGroup.trim().length() > 0) {
//… RSS Feed Setup
List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(candidateGroup).list();
//… add each task to the list with a link back to the task via the UUID
}
public class TaskServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String taskId = (String) req.getParameter("taskId");
TaskService taskService = ProcessEngines.getDefaultProcessEngine().getTaskService();
// retrieve the task for the given UUID
Task task = taskService.createTaskQuery()
.processVariableValueEquals("taskUUID", taskId)
.singleResult();
if(task == null) {
throw new ActivitiException("No such task");
}
// complete the task
taskService.complete(task.getId());
// maybe send a redirect page..
resp.sendRedirect("http://www.google.com");
}
}
08-11-2011 07:23 PM
08-16-2011 07:52 AM
/** get a variable on a task */
Map<String, Object> getVariablesLocal(String taskId, Collection<String> variableNames);
08-08-2013 11:15 AM
08-09-2013 09:06 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.