Hi Jan,
you can plug in a custom org.camunda.bpm.engine.impl.cfg.IdGenerator implementation. There are two default implementations
1. a database backed sequence generator
2. a UUID generator-based implementation.
The IdGenerator is set on the process engine configuration class.
Cheers,
Daniel Meyer
Hi Jan,
currently it would be difficult to exchange Id-Generation for process instances only (but feel free to submit a pull request adding a second method to the IdGenerator Interface.)
What about the business key? Maybe you could use the business key for providing a “uman-digestable” identifier for a process instance?
Cheers,
Daniel Meyer
--
You received this message because you are subscribed to the Google Groups "camunda BPM users & process application developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
Hi Jan.
adding a listener to the start event will work prefectly, but if I remember it right the businessKey will not be added to the history in this case (as this is already too late). If that is OK I think that is a good solution. If you need the history you have to make sure to generate the businessKey yourself and add it to "startProcessInstanceByX".
Cheers
Bernd
Von: camunda-...@googlegroups.com [mailto:camunda-...@googlegroups.com] Im Auftrag von Jan Hiemer
Gesendet: Dienstag, 10. September 2013 08:02
An: camunda-...@googlegroups.com
Cc: 'Jan Hiemer'
Betreff: Re: How is the PROC_INST_ID generated?
Good Morning Daniel,
--
Hi Guys,
As Bernd already suggested, changing the business key at runtime of a process instance is not really supported and should be avoided if possible. This is why it is not exposed in public API. The semantics are unclear, what if it is used in correlation? What about sub process instances which are already started etc and have been propagated the same business key. We figured that it would be complicated to implement it properly for all cases.
The business key should be set before the process instance starts (ie. passed to startProcessInstanceByX).
Getting back to the IdGenerator:
What we could easily do is add a second method to the IdGenerator interface:
public interface IdGenerator {
String getNextId();
String getNextProcessInstanceId();
}
@Jan: chances of CAM-1248 being done would be greatly increased by a pull request ;)
Cheers,
Daniel Meyer
Hi Jan,
what I had in mind was that maybe you could give it a try adding the method yourself and if you succeed provide the code using a pull request on github J
https://help.github.com/articles/using-pull-requests
I fear that this feature would not be a high priority for us, this is want I meant with „A pull request could improve the chances of this being done” J
7.1 will be released before End of March 2014.
Cheers,
Daniel Meyer