Make the 2nd process as a subprocess and call the same from the main process(call ativity).
As per our requirement two processes are not on same mechine .Both should be separate from each other and should communicate using some Restfull api.So my qustion is how to communicate b/w two processes using Restful interface.If you can provide some example code.It would be great help.
If those processes are not int he same machine you will need to create a WorkItemHandler implementation that uses a transport (REST, JMS, SOAP, or whatever you want) to contact the other machine and continue the process. You can create that service as any other service that you may have in your infrastructure.
You mean I have to create custommized service task in Processes 1 In its WorkItemHandler class I have to call RESTFul link of Processes 2 (on other Machine).As jbpm already exposes Some gwt_console restful links for Processes can i use that link to start Processes 2 from WorkItemHandler class or I have to create my own Restful links Because I also want output result of Processes2 into Processes 1.If I use RESTFul link in WorkItemHandler to call 2nd Processes ,Is Processes 1 will wait untill Process 2 complete ?
Could you please provide some sample WorkItemHandler that uses Restful link to start Process on remote machine.Because i try it but don't get succes.
I created WorkItemHandler and call Restful link "http://localhost:8080/gwt-console-server/rs/process/definition/SPMProcess/new_instance" to instancate