cancel
Showing results for 
Search instead for 
Did you mean: 

Error approve reject document uploaded using workflow

sawa
Champ in-the-making
Champ in-the-making
I've started an workflow from a java backed webscript. this workflow allows you to approve or reject an document uploaded but when i try to click on approve or reject i had an error
Please correct the errors below then click OK.
A system error happened during the operation: 03110045 Failed to signal transition approve from workflow task jbpm$419.


Also I have another question I would like to start my workflow from the second node how can i do that

thank you for your help. I'm really stucked & i dont know what to proceed
1 REPLY 1

sawa
Champ in-the-making
Champ in-the-making
There is My code

NodeRef workflowNodeRef = workflowService.createPackage(null);
nodeService.addChild(workflowNodeRef, node, ContentModel.ASSOC_CONTAINS, QNAME_FOLDER );
workflowService =serviceRegistry.getWorkflowService();
List<WorkflowDefinition> workflows = workflowService.getAllDefinitionsByName("jbpm$wf:review");
        WorkflowDefinition workflow = workflows.get(0);
   
   
      Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
      
      properties.put(WorkflowModel.ASSOC_PACKAGE, workflowNodeRef);
      properties.put(WorkflowModel.ASPECT_WORKFLOW_PACKAGE,workflowNodeRef);
      properties.put(WorkflowModel.ASSOC_ASSIGNEE,personService.getPerson("admin"));
      properties.put(WorkflowModel.PROP_DESCRIPTION,"Review");
      properties.put(WorkflowModel.PROP_WORKFLOW_DESCRIPTION,"validation des documents");
      properties.put(WorkflowModel.PROP_SEND_EMAIL_NOTIFICATIONS,true );
      properties.put(WorkflowModel.PROP_PRIORITY,2 );
      
        WorkflowPath path = workflowService.startWorkflow(workflow.id, properties);
       
   I'm wondering if i had to add something else because when using javascript i did 
    var workflow = actions.create("start-workflow");
    workflow.parameters["bpm:workflowPackage"] = docNode;//
    workflow.parameters.workflowName = "jbpm$wf:review";//
    workflow.parameters["bpm:workflowPriority"] = "2";//
    workflow.parameters["bpm:sendEMailNotifications"] = true;//
    workflow.execute(document);
}
and it works so i'm wondering if there is something like workflow.execute for java backed webscript