With instance replayer, you are able to upgrade long running process instance to the newest version.
There's an ongoing discussion on apache.org in a feature request:
https://issues.apache.org/jira/browse/ODE-483.
Attached are example service assembly replayer-example-sa.zip and SoapUI project replayer-example-soapui-project.xml.
The basic use cases for replayer are:
Replayer extends management api by 2 operations: replay and getCommunication (see pmapi.wsdl from ODE distribution).
In order to do 1, you invoke:
<pmap:replay xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/"> <replay> <ns:upgradeInstance>1234</ns:upgradeInstance> </replay> </pmap:replay>
To do 2, you need to retrieve exchanges from instance (or instances) by:
<pmap:getCommunication xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/"> <getCommunication> <ns:iid>1234</ns:iid> </getCommunication> </pmap:getCommunication> <ns:restoreInstance> <ns:processType xmlns:p="http://sample.bpel.org/bpel/sample">p:OnEventCorrelation</ns:processType> <exchange xmlns="http://www.apache.org/ode/pmapi/types/2006/08/02/"> <type>M</type> <createTime>2009-04-01T16:41:29.873+02:00</createTime> <service xmlns:sam="http://sample.bpel.org/bpel/sample">sam:OnEventCorrelationInit</service> <operation>initiate</operation> <in> <initiate xmlns:sam="http://sample.bpel.org/bpel/sample" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns=""> <payload>abc7</payload> <payload2>abc8</payload2> </initiate> </in> <out> <message xmlns=""> <payload>test1</payload> <payload2/> </message> </out> </exchange> <exchange xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/" xmlns="http://www.apache.org/ode/pmapi/types/2006/08/02/"> <type>P</type> <createTime>2009-04-01T16:41:32.998+02:00</createTime> <service xmlns:sam="http://sample.bpel.org/bpel/sample">sam:OnEventCorrelation</service> <operation>initiate</operation> <in> <initiate xmlns:sam="http://sample.bpel.org/bpel/sample" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns=""> <payload>abc7</payload> <payload2>abc8</payload2> </initiate> </in> <out> <message xmlns=""> <payload>test5</payload> <payload2/> </message> </out> </exchange> </ns:restoreInstance>
Then, you execute replay on the other ODE installation to replicate instance:
<pmap:replay xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/"> <replay> <ns:restoreInstance> <ns:processType xmlns:p="http://sample.bpel.org/bpel/sample">p:OnEventCorrelation</ns:processType> ... exchanges </ns:restoreInstance> </replay> </pmap:replay>
To have control over time in bpel process, there is a new variable introduced, $ode:currentEventDateTime. It's equivalent to $fn:current-dateTime() during live session and it's set to corresponding time in past during replaying.