05-21-2012 02:31 AM
05-21-2012 03:46 AM
05-21-2012 04:03 AM
05-21-2012 05:27 AM
05-21-2012 05:59 AM
05-21-2012 06:36 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);
05-21-2012 10:35 AM
05-22-2012 04:41 AM
05-22-2012 05:35 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.