Community

working with executions

reply from Claus Straube in jBPM - View the full discussion

Hi Maciej,

 

I think that's it. The following test worked:

 

 

@Test
    public void oneReceiveNode(){
        //deploy process
        repositoryService.createDeployment().addResourceFromClasspath("one_receive_node.bpmn.xml").deploy();
        
        //start instance
        ProcessInstance instance = executionService.startProcessInstanceByKey("bar");
        Assert.assertNotNull(instance);
        
        //signal first execution
        Execution e1 = instance.findActiveExecutionIn("r1");
        Assert.assertNotNull(e1);
        ProcessInstance instance2 = executionService.signalExecutionById(e1.getId());
        
        Assert.assertTrue(instance2.isEnded());
    }

 

That means a process instance will be "refreshed", if I do a execution on it? I don't find that intuitive... But okay -it works :) Thank you!

 

Best regards - Claus

Reply to this message by going to Community

Start a new discussion in jBPM at Community