As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
PvmProcessDefinition processDefinition = ProcessDefinitionBuilder …; ExecutionImpl processInstance = (ExecutionImpl) processDefinition.createProcessInstance(); System.out.println(processInstance.getId());
protected InterpretableExecution newProcessInstance() { return new ExecutionImpl(); }
In the PVM API, the ids are indeed null, because the PVM is non-persistent environment. So ids have no or little use there.You'll see that the real entities used by the Activiti BPMN 2.0 layer do override the id methods (look for PersistentObject).
If you are already adding your own language on top of the PVM, why not simple extend the execution classes with your own stuff, that is how we do it for the BPMN 2.0 layer after all.
Well, it is true that the PVM is used as basis, but with Activiti our goal has always been BPMN 2.0 (not multi languages, as we did in the past).
Why would BPMN 2.0 be not good enough for machine-machine communication? You could always extract a subset of the constructs or even write a simple language on top of it if you really want to …
I will create a new branch shortly with a changed implementation of the job scheduler ( syncing my current branch seems to fail). I'll also include a version of async support in there. We already used it locally, it is not that hard to implement if you know the internals, but writign the testcases, documentation and examples is what makes it more work. If someone would volunteer for this, that would be great (currently to busy during the day with paid projects and tennis/golf in my free time). Maybe I'll create a different branch for that so I can easier keep things separated and they can be more easily merged into trunk if the core team likes it.And afaics, this 'new' job scheduler could be used to create a way where 'multi-threading' parallel execution would be possible without using persistence for the jobs, but I'm not fully sure about this. So instead of an async attribute with a value of true or false (or async) it could be something different like 'execute' with values 'async' (transaction demarcation) or 'parallel' which makes it multi-threaded but running in the same transaction. But I'm no expert in passing on transactions between threads etc, so maybe I'm nonsense here (or talk out of your neck as we say in the lowlands)