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

creating new process instance from console fails to set process variables properly

XMLWordPrintable

      When creating a new ProcessInstance from the jbpm-console, the integration code fails to set process variables (eg. from form template for start activity) properly.

      The offending code is:

      ,-- ProcessManagementImpl.java, 265, 266 –

      Execution exec = execService.startProcessInstanceById (definitionId);
      execService.setVariables(exec.getId(), processVars);

      `--------------------

      Setting the variables after startProcessInstanceById() is pointless, as this starts and runs the instance.
      Easily fixed by supplying the variables to startProcessInstanceById():

      ,-- fix –

      Execution exec = execService.startProcessInstanceById (definitionId, processVars);

      `-------------

      regards,
      Marko

              jbarrez Joram Barrez (Inactive)
              sny_jira Marko Friedemann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: