BpelExecution constructor is doing :
super(process)
That's OK. The problem is that Execution(Process) constructor launches the execution...
So I have problems setting properties on my BpelExecution before launching it...
My case is :
bpelExecution = new BpelExecution(bpelProcess);
bpelExecution.setContext(context);
bpelExecution.addMessageToConsume(matchingStartActivity, incomingMessage);
When I am in an execute method and I get the context, it is null as I hadn't time to set it before launching the execution...
I made some workaround to do that (by modifying BpelExecution constrcutor) but I think it is not a correct use...
Can you explain me what is the correct way to create an execution and launch it after ?
I remember the business code of ServiceInvocationHandler :
bpelExecution = correlator.getNewBpelExecutionStartNode(bpelProcess, incomingMessage, portType, operation, partnerLink, context);
if (bpelExecution != null) {
bpelExecution.proceed();
} else {
correlator.storeIncomingMessage(incomingMessage, portType, operation, partnerLink, context);
}
so I think, the proceed in big characters shoiuld launch the execution (not launched before).
correlator code :
bpelExecution = new BpelExecution(bpelProcess);
bpelExecution.setContext(context);
bpelExecution.addMessageToConsume(matchingStartActivity, incomingMessage);