cancel
Showing results for 
Search instead for 
Did you mean: 

SignalBoundaryEvent is not working

fg80
Champ in-the-making
Champ in-the-making
Hi All,

I have a problem testing the SignalBoundaryEvent in Java. I've created a very simpel Bpmn file with two script tasks and a signal boundary event on the first script task. In Java I initiate the process but I can't make the process go on to the second script task.

Please find attached the xml file of the process.

The deployment seems to be OK, the first Script Task is executed (Groovy "out.println("Scipt Task 1");") is shown.



main:

mProcessEngine = ProcessEngineConfiguration
              .createStandaloneInMemProcessEngineConfiguration().buildProcessEngine();
         
String ip = "127.0.0.1";
String AutomationProcessId = "scriptProcess";
String fileName = "ScriptProcess.bpmn20.xml";

ProcessInstance processInstance = startProcessInstance( AutomationProcessId, fileName, ip);
mProcessEngine.getRuntimeService().signalEventReceived("signalDone");


public static ProcessInstance startProcessInstance( String processId, String processFile, String clientIp) {

      String deploymentId = deployProcessOnEngine(processFile);
      
      Map<String, Object> variableMap = initializeVarMap();
      variableMap.put("map_clientIp", clientIp);
       ProcessInstance processInstance = mProcessEngine.getRuntimeService().startProcessInstanceByKey( processId, variableMap);
      
       return processInstance;
}
   
private static String deployProcessOnEngine(String processFilePath){

      RepositoryService repositoryService = mProcessEngine.getRepositoryService();

      Deployment d = repositoryService.createDeployment()
          .addClasspathResource( processFilePath)
          .deploy();
      
      return d.getId();
}
   
private static Map<String,Object> initializeVarMap() {
      Map<String, Object> variableMap = new HashMap<String, Object>();
      return variableMap;
}




I've tried the signal-ID, the signal-Name and the signal-ref…nothing works Smiley Sad

Your help is highly appreciated Smiley Happy

Thanks,

Florian
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi Florian,

When you start a new process instance for this BPMN file it will completed when you get the ProcessInstance instance back. So the boundary signal event is not active any more as the process instance has ended.

Best regards,

fg80
Champ in-the-making
Champ in-the-making
Hi Tijs,

many thanks Smiley Happy

Best Regards,
Florian