Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2867

the 'outcome-value' feature of sub-process does not work

XMLWordPrintable

    • 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="#

      {result}">
      <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~

              rebody HuiSheng Xu (Inactive)
              aoyi_jira Yao Yao (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified