QName serviceName = new QName("SignalProcess");
BPMExchangeHandler handler = new BPMExchangeHandler(bci_model, serviceDomain, serviceName);
Service signalService = serviceDomain.registerService(serviceName, JavaService.fromClass(SignalProcess.class), handler);
serviceDomain.registerServiceReference(signalService.getName(), signalService.getInterface(), signalService.getProviderHandler());
handler.start();
Invoker processInvoker = new Invoker(serviceDomain, serviceName);
Holder holderOne = new Holder();
holderOne.setValue("HolderOne");
Message processResponse = processInvoker.operation("process").sendInOut(holderOne);
Long processInstanceId = (Long)processResponse.getContext().getPropertyValue(PROCESSS_INSTANCE_ID_PROPERTY);
Invoker signalInvoker = new Invoker(serviceDomain, serviceName);
Holder holderTwo = new Holder();
holderTwo.setValue("HolderTwo");
Message signalResponse = signalInvoker.operation("signal").property(PROCESSS_INSTANCE_ID_PROPERTY, processInstanceId).sendInOut(holderTwo);
Holder holderResponse = signalResponse.getContent(Holder.class);
handler.stop();
Assert.assertEquals(holderOne.getValue(), testAssertionMap.get("ServiceOne"));
Assert.assertEquals(holderTwo.getValue(), testAssertionMap.get("ServiceTwo"));
Assert.assertEquals(holderTwo.getValue(), holderResponse.getValue());