Sunday, August 31, 2008

How to replay a scope in Oracle BPEL

An other useful tip is to know how to replay a scope from its begining.

There is an unknown bpel fault in Oracle which is the {http://schemas.oracle.com/bpel/extension}replay.
Generally, the http://schemas.oracle.com/bpel/extension namespace is called by the bpelx prefix. Then you can simply use the fault with :
<throw name="myReplayThrow" faultName="bpelx:replay"/>
You'll find the jdeveloper bpel process which shows how to use the replay fault here : ReplayFault.zip

The fault makes your current scope returns to its begining as you can see on this shot :



It can really helps the bpel design avoiding to have to much complexity in a process.
Be careful since the replay fault is a bpel fault as shown in its name ! Therefore, it will be catched by a catchall on the current scope

Note : You can also use this fault with the faults policy manager in the 10.1.3.3, but you don't have to implement the retry logic since this is implicit.

I know you are several to follow this blog, and I'd like to thank you for your support.
Talk you soon guys !

2 comments:

sap upgrade issues said...

I don't know how to replay scope in oracle before reading your post. This tip is very useful when you get fault message and you want to go back to the the beginning.In this post you get exact code to replay a scope in Oracle BPEL.

Anonymous said...

Where exactly can we use this replay activity . Only when we encounter fault. Or what will be the business scenario where we do use this acitivity.