-
1. Re: How to call reusable subprocess without linking projects?
swiderski.maciej Aug 6, 2014 1:36 AM (in response to badtea)1 of 1 people found this helpfulto be able to start subprocess via call activity then both parent and child process much be in the same knowledge base. This is why you need to deploy only the parent kjar that includes another kjar with subprocess definition.
To be able to select any subprocess then you would need to do it with different constructs like send and receive tasks that remotely interact with the kie-wb to start a process and the wait for some signal to continue.
HTH
-
2. Re: How to call reusable subprocess without linking projects?
badtea Aug 6, 2014 1:26 PM (in response to swiderski.maciej)It sounds like I need to create some custom tasks or use some kind of messaging to start my subprocesses. Now I am thinking I could create a custom task, like I read about in the docs (Chapter 21. Domain-specific Processes). The custom task's job would be to initiate other business processes in the workbench.
Alternatively, maybe I could create web services that invoke business processes in the workbench. Then I could use a Service Task in the parent process to call the web service to start the child process.
Am I understanding correctly?
Thanks!
-
3. Re: How to call reusable subprocess without linking projects?
swiderski.maciej Aug 7, 2014 4:53 AM (in response to badtea)correct, use of Service task or custom task is perfectly valid approach.
HTH
-
4. Re: How to call reusable subprocess without linking projects?
badtea Aug 11, 2014 12:49 PM (in response to swiderski.maciej)I was able to get this to work in eclipse. I created a custom task with a custom WorkItemHandler. The task initiated the subprocess by using the existing REST API. In particular, I used this call:
/runtime/{deploymentId}/process/{processDefId}/start
I could not get this to work in the web console, because I cannot get custom work item handlers to work in the web console yet. I will have to keep troubleshooting that problem. But at least I have proven the concept of using a web service to call a subprocess.
Thanks for the help.