While working on https://jira.jboss.org/jira/browse/RIFTSAW-125 I've realized that we have a general problem with process versioning:
ODE itself doesn't deal with versioning, apart from making sure that only one process is active at a time: http://ode.apache.org/user-guide.html#UserGuide-ProcessVersioninginOde
Riftsaw currently uses a separate deployment artifact for each version,
which exposes this problem:
There's still a last question left unsolved: what happens if you take your bundle and deploy it under a different name with the same content. If you know a bit about source version control (like CVS or Subversion), that's very close to branching, only you might be executing two branches at the same time. <b>As Ode can't find another bundle with the same, the processes will simply be deployed without retiring anything.</b> You will effectively have twice the same process deployed under different versions. In that scenario you're supposed to know what you're doing.
1.) What happens to the WS endpoint?
When ODE deploys a process, it identifies the service and port that should be exposed. What happens is that for each service it calls deactivateEndpoint() followed by activateEndpoint().
So, in the current versioning approach (same service in two different artifacts) one gets deactivated and the second one get's activated. That's basically correct apart from:
The previous version remains active (see quote above).
And it will be visible in the console
2.) What happens if I remove the artifact of a previous version?
In the example mentioned above, I would deploy helloworld-1.jar and helloworld-2.jar. Both containing a reference to the same WS endpoint (service+port). No problem, the procedure decribed in 1) kicks in, helloworld-1 will be deactivated and helloworld-2 activated. Fine. But if I now go and delete helloworld-1.jar, ODE will invoke deactivateEndpoint() for helloworld-1.jar, which results in the teardown of the associated WS endpoint.
Unfortunately, both artifacts declare the same service and only one can exist at a given time (see point 1). So the service will be removed, which basically leaves the helloworld-2.jar deployment without an endpoint.
3.) What's the conclusion?
Well, the bottom line is: As long as versioning is decoupled from the WS endpoint declaration (WSDL that is) riftsaw will not be able to gracefully handle these situations. ODE isn't designed to that, it only references service and port upon activation and deactivation of endpoints. The versioning information is not available at that stage to discriminate on that.