accessUseres.addAll(getUserGroupRefs(props.get(WorkflowModel.ASSOC_ASSIGNEES))); accessUseres.addAll(getUserGroupRefs(wt.getProperties().get(WorkflowModel.ASSOC_POOLED_ACTORS))); accessUseres.add(wt.getPath().getInstance().getInitiator());
/** * Returns the username of the user that initiated the workflow the * given task is part of. * * @param task The task to get the workflow initiator for * @return Username or null if the initiator could not be found */ private String getWorkflowInitiatorUsername(WorkflowTask task) { String initiator = null; NodeRef initiatorRef = task.getPath().getInstance().getInitiator(); if (initiatorRef != null && this.nodeService.exists(initiatorRef)) { initiator = (String)this.nodeService.getProperty(initiatorRef, ContentModel.PROP_USERNAME); } return initiator; } }
accessUseres.addAll(getUserGroupRefs(props.get(WorkflowModel.ASSOC_ASSIGNEES))); accessUseres.addAll(getUserGroupRefs(wt.getProperties().get(WorkflowModel.ASSOC_POOLED_ACTORS))); accessUseres.add(wt.getPath().getInstance().getInitiator());
/** * Returns the username of the user that initiated the workflow the * given task is part of. * * @param task The task to get the workflow initiator for * @return Username or null if the initiator could not be found */ private String getWorkflowInitiatorUsername(WorkflowTask task) { String initiator = null; NodeRef initiatorRef = task.getPath().getInstance().getInitiator(); if (initiatorRef != null && this.nodeService.exists(initiatorRef)) { initiator = (String)this.nodeService.getProperty(initiatorRef, ContentModel.PROP_USERNAME); } return initiator; } }
out.println("start date: " + workflow.getStartDate()); out.println("end date: " + workflow.getEndDate()); out.println("initiator: " + workflow.getInitiator()); out.println("context: " + workflow.getContext()); out.println("package: " + workflow.getWorkflowPackage());
out.println("start date: " + workflow.getStartDate()); out.println("end date: " + workflow.getEndDate()); out.println("initiator: " + workflow.getInitiator()); out.println("context: " + workflow.getContext()); out.println("package: " + workflow.getWorkflowPackage());
assertEquals(def.getId(), workflowInstance.getDefinition().getId()); assertEquals(adminHomeNode, workflowInstance.getInitiator()); assertEquals(testWorkflowContext, workflowInstance.getContext()); assertEquals(testWorkflowPackage, workflowInstance.getWorkflowPackage());
assertEquals(def.getId(), workflowInstance.getDefinition().getId()); assertEquals(adminHomeNode, workflowInstance.getInitiator()); assertEquals(testWorkflowContext, workflowInstance.getContext()); assertEquals(testWorkflowPackage, workflowInstance.getWorkflowPackage());