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

JbpmJUnitBaseTestCase.assertNodeActive() throws "java.lang.RuntimeException: Process instance XXX is disconnected." in sessionPersistence test

    Details

      Description

      JbpmJUnitBaseTestCase.assertNodeActive() throws "java.lang.RuntimeException: Process instance XXX is disconnected." in sessionPersistence=true test.

      We can workaround it by using Command:

      https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/java/org/jbpm/bpmn2/IntermediateEventTest.java#L2508-L2525

          class AssertNodeActiveCommand implements GenericCommand<Void> {
      
              private long piId;
              private String[] nodes;
              public AssertNodeActiveCommand(long piId, String... nodes) {
                  this.piId = piId;
                  this.nodes = nodes;
              }
              
              @Override
              public Void execute(Context context) {
                  
                  KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();
                  assertNodeActive(piId, ksession, nodes);
                  
                  return null;
              }
          }
      

      But I think it's better to fix JbpmJUnitBaseTestCase itself.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swiderski.maciej Maciej Swiderski
                Reporter:
                tkobayashi Toshiya Kobayashi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: