03-17-2014 04:30 PM
03-21-2014 09:30 AM
03-21-2014 02:56 PM
03-22-2014 11:01 AM
// Create the workflow with the newly created node as an item of the workflow
List<WorkflowDefinition> workflows = workflowService.getAllDefinitionsByName("activiti$LoanRequestProcess"); // This could be "jbpm$LoanRequestProcess"
WorkflowDefinition workflow = workflows.get(0); // Assume it is there
// Set the workflow package
// this contains the files within the workflow
NodeRef workflowPackage = workflowService.createPackage(null);
ChildAssociationRef childAssoc = nodeService.getPrimaryParent(nodeRef);
this.nodeService.addChild(workflowPackage, nodeRef, WorkflowModel.ASSOC_PACKAGE_CONTAINS, childAssoc.getQName());
// Set the parameters for the workflow
Map<QName, Serializable> parameters = new HashMap<QName, Serializable>();
parameters.put(WorkflowModel.ASSOC_PACKAGE, workflowPackage);
parameters.put(WorkflowModel.ASSOC_ASSIGNEE, this.personService.getPerson("admin"));
WorkflowPath workflowPath = workflowService.startWorkflow(workflow.getId(), parameters);
03-26-2014 11:30 AM
03-27-2014 06:29 PM
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.