Ok, i want to separate the jobExecutor ("server" Activiti Engine) and the API ("client" Activiti Engine) to distribute calculations. Only the "server" Activiti Engine must execute job.
i want an API which is responsible to push event to the Activiti Database and a server which is responsible to interpret this event and execute it.
An other advantages is when we want to put in production the code. If i edit a BPMN only the "server" Activiti Engine is to update.
My problem is more global than the sub process. All task is asynchronous because when a task is synchronous the "client" Activiti Engine try to execute the job even if i disable the jobexecutor. When i set a task asynchronous, the "client" don't try to execute the job and it is the "server" Activiti Engine which do it as i want. To have all task asynchronous is not a for a modeling reason but to force the "client" Activiti Engine to not execute jobs and just push a message in the database.
For example :
- API : someone want start workflow X
- SERVER : someone want start workflow X so i instantiate it and launch the first task
- API : someone want complete the task "task123"
- SERVER : someone want complete the task with id "task123" so i complete it and instantiate the next task.
i don't know if i'm clear, don't hesitate to ask more information.
Thanks.