@SuppressWarnings("unchecked") @Override public List<String> getTaskAssignees() { return (List<String>) getProperty(PROP_TASK_ASSIGNEES); }
@Override public String getTaskAssigneesPermission() { return (String) getProperty(PROP_TASK_ASSIGNEES_PERMISSION); }
@Override public String getTaskLayout() { return (String) getProperty(PROP_TASK_LAYOUT); }
@Override public String getId() { return (String) getProperty(PROP_NODE_ID); }
@Override public String getTaskDueDateExpr() { return (String) getProperty(PROP_TASK_DUE_DATE_EXPR); }
@Override public String getOutputChain() { return (String) getProperty(PROP_OUTPUT_CHAIN); }
@Override public String getTaskNotificationTemplate() { return (String) getProperty(PROP_TASK_NOTIFICATION_TEMPLATE); }
@Override public String getInputChain() { return (String) getProperty(PROP_INPUT_CHAIN); }
@Override public String getTaskDirective() { return (String) getProperty(PROP_TASK_DIRECTIVE); }
public String getTaskAssigneesVar() { return (String) getProperty(PROP_TASK_ASSIGNEES_VAR); }
protected String getSubRouteInstanceId() { return (String) getProperty(GraphNode.PROP_SUB_ROUTE_INSTANCE_ID); }
@Override public long getCanceledCount() { Long c = (Long) getProperty(PROP_CANCELED); return c == null ? 0 : c.longValue(); }
@Override public boolean isMerge() { String merge = (String) getProperty(PROP_MERGE); return StringUtils.isNotEmpty(merge); }
@Override public Date getTaskDueDate() { Calendar cal = (Calendar) getProperty(PROP_TASK_DUE_DATE); return cal == null ? null : cal.getTime(); }
protected boolean getBoolean(String propertyName) { return Boolean.TRUE.equals(getProperty(propertyName)); }
@Override public String getTaskDocType() { String taskDocType = (String) getProperty(PROP_TASK_DOC_TYPE); if (StringUtils.isEmpty(taskDocType) || TaskConstants.TASK_TYPE_NAME.equals(taskDocType)) { taskDocType = DocumentRoutingConstants.ROUTING_TASK_DOC_TYPE; } return taskDocType; }
protected void incrementProp(String prop) { Long count = (Long) getProperty(prop); if (count == null) { count = Long.valueOf(0); } document.setPropertyValue(prop, Long.valueOf(count.longValue() + 1)); saveDocument(); }
@Override public String getSubRouteModelId() throws DocumentRouteException { String subRouteModelExpr = (String) getProperty(PROP_SUB_ROUTE_MODEL_EXPR); if (StringUtils.isBlank(subRouteModelExpr)) { return null; } try (OperationContext context = getExecutionContext(getSession())) { String res = valueOrExpression(String.class, subRouteModelExpr, context, "Sub-workflow id expression"); return StringUtils.defaultIfBlank(res, null); } }
@Override public boolean canMerge() { int n = 0; List<Transition> inputTransitions = getInputTransitions(); for (Transition t : inputTransitions) { if (t.result) { n++; } } String merge = (String) getProperty(PROP_MERGE); if (MERGE_ONE.equals(merge)) { return n > 0; } else if (MERGE_ALL.equals(merge)) { return n == inputTransitions.size(); } else { throw new NuxeoException("Illegal merge mode '" + merge + "' for node " + this); } }
context.put("workflowParentNode", getWorkflowParentNodeId()); context.put("workflowInstanceId", graph.getDocument().getId()); context.put("taskDueTime", (Calendar) getProperty(PROP_TASK_DUE_DATE)); context.put("documents", documents); String button = (String) getProperty(PROP_NODE_BUTTON); Map<String, Serializable> nodeVariables = getVariables(); nodeVariables.put("button", button);