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

Null Pointer Exception trying to modify process variable value from Rule

    XMLWordPrintable

Details

    • 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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated: