workflow execution
Hi,
i need to execute a custom workflow that contains the default step plus a Process Step.
The Process Step links to:
public class MyProcess implements JavaProcessExt { /** Default log. */ protected final Logger log = LoggerFactory.getLogger(MyProcess.class); public void execute(WorkItem item, WorkflowSession session, String args[]) throws Exception { WorkflowData workflowData = item.getWorkflowData(); log.info("ok!!!"); } public void execute(WorkItem item, WorkflowSession session) throws Exception { String[] args = new String[]{"true"}; execute(item, session, args); } }If i launch the workflow with the sidekick:
[img]93020c6a.png[/img]
This is my log:
[img]Untitled.png[/img]
The final step is completed but the workflow still remains in running. Why?
Now i need to call this workflow inside java code:
log.info("payload "+payload+" workflow_path "+workflow_path); session= this.repository.loginAdministrative(null); WorkflowSession wfSession = workflowService.getWorkflowSession(session); WorkflowModel wfModel = wfSession.getModel(workflow_path); WorkflowData wfData = wfSession.newWorkflowData("JCR_PATH", payload); log.info(wfModel+" "+wfData);When i print the variables the wfData is a correct object but the wfModel is null. The workflow_path variable is "/etc/workflow/models/test" and is correct (you can see this on the first attached image).
Where is the mistake?
Thanks