Maciej Swiderski [
http://community.jboss.org/people/swiderski.maciej] replied to the
discussion
"JBPM-2772 retrieve business key from sub-process"
To view the discussion, visit:
http://community.jboss.org/message/557018#557018
--------------------------------------------------------------
Correct, I mixed parent and super/subprocess usage in jBPM. Parent is used for executions
that are derived from origin such as when using fork and super/sub are used to reflect
relationship between processes. My mistake.
Back to the issue, I was suggesting to allow users to provide their business key for
subprocess that will be used when executing it. Please consider very simple definition
that consists of subprocess:
<process name="SubProcessDocument"
xmlns="http://jbpm.org/4.4/jpdl">
<start g="20,20,48,48">
<transition to="review" />
</start>
<sub-process name="review" key="#{mySubProcessBusinessKey}"
sub-process-key="SubProcessReview"
g="96,16,127,52">
<parameter-in var="document" subvar="document" />
<parameter-out var="reviewResult" subvar="result" />
<transition to="wait" />
</sub-process>
<state name="wait" g="255,16,88,52"/>
</process>
Then when subprocess is created it will assign value of mySubProcessBusinessKey to key of
the execution. Of course it can in some situations cause uniqueness problems but since it
is designed to be externally provided (within scope of the process definition) I would say
that it is a known risk.
Does it make sense to you or am I completely lost?
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/557018#557018]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]