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

Null Pointer Exception trying to modify process variable value from Rule

XMLWordPrintable

    • Hide

      Create a simple process flow with the following nodes:
      1. start
      2. script task that contain this script
      kcontext.getKnowledgeRuntime().insert(kcontext.getProcessInstance());

      3. business rule task that execute the following rule flow group
      import org.drools.runtime.process.WorkflowProcessInstance

      rule AlterName
      ruleflow-group "ProcessName"
      when
      processInstance : WorkflowProcessInstance()
      eval(1 < 18);
      then
      processInstance.setVariable("name",
      "NewName");
      end

      4. add any other task nodes after that, can be human task, script task, whatever.

      5. end task

      6. generate the task forms.

      7. start the process from jbpm-console

      8. get null pointer exception

      Show
      Create a simple process flow with the following nodes: 1. start 2. script task that contain this script kcontext.getKnowledgeRuntime().insert(kcontext.getProcessInstance()); 3. business rule task that execute the following rule flow group import org.drools.runtime.process.WorkflowProcessInstance rule AlterName ruleflow-group "ProcessName" when processInstance : WorkflowProcessInstance() eval(1 < 18); then processInstance.setVariable("name", "NewName"); end 4. add any other task nodes after that, can be human task, script task, whatever. 5. end task 6. generate the task forms. 7. start the process from jbpm-console 8. get null pointer exception

      Use a business rule task node, inside the rule, modify the value of a process variable results in null pointer exception when starting process from jbpm console.

        1. AlterName.drl
          0.2 kB
          Thomas Setiabudi
        2. PostAlterName.drl
          0.2 kB
          Thomas Setiabudi
        3. server.log
          22 kB
          Thomas Setiabudi
        4. test.RuleDemo.v4.bpmn2
          25 kB
          Thomas Setiabudi

              swiderski.maciej Maciej Swiderski (Inactive)
              thomas.setiabudi Thomas Setiabudi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: