6 Replies Latest reply on Apr 15, 2010 8:42 PM by HuiSheng Xu

    getImageResourceName returns null

    Jas Lam Newbie

      I modify one of the example unit test case --- org.jbpm.examples.eventlistener testEventListener() as follow:

       

      I keep getting null value for image resource Name. Can anyone else reproduce this error? or i am missing something...

       

      Thanks

       

      public void testEventListener() {
          ProcessInstance processInstance = executionService.startProcessInstanceByKey("EventListener");
           //START INSERTED CODE
          ProcessDefinitionQuery pdq = repositoryService.createProcessDefinitionQuery();
          
          List<ProcessDefinition> processList = pdq.list();
       
          String retVal;
          for (ProcessDefinition def: processList)
          {
             retVal = def.getImageResourceName();
             System.out.println("IMAGE RESOURCE: " + retVal);
          }
          // END INSERTED CODE
          Execution execution = processInstance.findActiveExecutionIn("wait");
          executionService.signalExecutionById(execution.getId());
          List<String> expectedLogs = new ArrayList<String>();
          expectedLogs.add("start on process definition");
          expectedLogs.add("start on activity wait");
          expectedLogs.add("end on activity wait");
          expectedLogs.add("take transition");
          List<String> logs = (List<String>) executionService.getVariable(processInstance.getId(), "logs");
          assertEquals(expectedLogs, logs);
        }