What Happens When You Create a Replay Activity

The following example shows the .bpel file after design is complete for a replay activity in a BPEL project that supports BPEL version 2.0. In BPEL 2.0, the replay activity is wrapped in an extensionActivity element.

<scope name="scope2">
     <sequence>
       <assign>
         <copy>
           <from>$counter2 + 1</from>
           <to>$counter2</to>
         </copy>
       </assign>
       <scope name="scope3">
         <sequence>
           <assign>
             <copy>
               <from>$counter + 1</from>
               <to>$counter</to>
             </copy>
           </assign>
           <if>
             <condition>$counter = 3</condition>
             <empty/>
             <else>
               <extensionActivity>
                 <bpelx:replay name="ReplayScope" scope="Scope_RetrieveOrder"/>
               </extensionActivity>
             </else>
           </if>
         </sequence>
       </scope> 
     </sequence>
   </scope>

In BPEL 1.1, the replay activity is coded as a bpelx extension.

<bpelx:replay name="ReplayScope" scope="Scope2"/>