-
Bug
-
Resolution: Done
-
Minor
-
jBPM 4.3
-
None
-
Documentation (Ref Guide, User Guide, etc.), Interactive Demo/Tutorial
Hi, guys.
I'm doing some translating work of 《jBPM User Guide》, and I mentioned that in Table 6.21, Section 6.2.7, there are some descriptions about the 'outcome-value'.
Table 6.21. Extra transition elements in case of outcome variable mappings:
=======================================================
Element: outcome-value
Multiplicity: 0..1
Description: If the outcome matches the value, this transition is taken after the sub-process ended. The value is specified with one child element.
=======================================================
But there's no example provided indeed.
Section 6.2.7.2 of 《jBPM User Guide》 shows an example about the outcome variable:
===============================================================
<sub-process name="review" sub-process-key="SubProcessReview" outcome="#
<transition name="ok" to="next step" />
<transition name="nok" to="update" />
<transition name="reject" to="close" />
</sub-process>
===============================================================
I tried to midify it to:
==============
<sub-process name="review" outcome="#{result}
" sub-process-key="SubProcessReview">
<transition name="ok" to="next step">
<outcome-value>
<int value="3"/>
</outcome-value>
</transition>
<transition name="nok" to="update"/>
<transition name="reject" to="close"/>
</sub-process>
==============
But I got org.hibernate.exception.ConstraintViolationException and java.sql.SQLException after:
======================================================================
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("result", 3);
taskService.setVariables(task.getId(), variables);
taskService.completeTask(task.getId());
======================================================================
I don't know whether it's a bug or just I do it a wrong way.
Please tell me the usage of the 'outcome-value' of sub-process. Examples better.
Thanks. Regards from China~