This content has been marked as final. Show 8 replies
Any inputs on this ??
IMHO you need to throw faults, catch them in every scope(B & C level in your case), rethrow them in the catch/catchall at level A again, then use Replay Activity.
The thing you are trying for is similar to throwing a ball to one side and expecting the ball to be coming from other side. . .
You are catching the fault at scope A and when catch block contains the replay activity then the fault is automatically thrown to the same block for which one you have kept the catch block. . . . .
SHARATH. . .
I m doing it in this way only.
Fault thrown by B & C are caught in the catch handler of these blocks and rethrown.
After this the outermost catch handler is catching it. From the fault payload, it is getting the information from which scope it is thrown (i.e b or c) and then replayScope activity is used to replay that scope
This is not working as of now.
@ Sharath ....
I could not get what you want to say in the below line posted by you
"You are catching the fault at scope A and when catch block contains the replay activity then the fault is automatically thrown to the same block for which one you have kept the catch block. . . . ."
Could you elaborate on this ...
A replay activity is actually a Throw fault.
When you hit a replay activity you are throwing a fault. So, when you use a replay activity, inside a scope (with a catch), it gets to the catch activity.
When you use a replay activity inside a scope (without a catch), and it's inside another scope, then you will get to the catch activity of the outer scope.
You can't achieve what you want in that way.
What you can do is: initial a variable in some points of your process (let's say before scopes b,c). When you will get an error, you will be thrown to the outer scope(a) to replay it. According to the variable, you will know which scopes to process with if conditions.
(or something like that...I don't know what should the process do)
"A replay activity is actually a Throw fault.
When you hit a replay activity you are throwing a fault. So, when you use a replay activity, inside a scope (with a catch), it gets to the catch activity"
Before I hit the above problem, I have tried keeping replayscope acitivity in the catch block of faulted scope and it replayed the scope without any issues.
Please note that i did not have any parent scope or any other catch handler at this time.
If your above statement is true, then replayscope activity should have thrown fault and in the absence of any parent fault handler my bpel process should have faulted out.
In fact from the time when I was in oracle , I still remember the bug in which we pointed out that to replay scopes we are using kind of while loops for scope and want to get rid of this coding..
and in the bug it was updated that the similar things will be taken care by replayscope activity in future releases.
So in my opinion, the replayscope activity should generate the code after compilation of bpel process which should be nothing else but a while loop kind of logic to replay the scopes ....
I'm really sorry as I did some mixing with the examples and explanations. If you put a Replay activty in a scope then yes, it will act as a while. But, if you will add a catch activty to the scope, it will change the replay activty behavior, and it will use to throw an exception. So, unless there is a bug, using inner and outer scopes to replay it will not work as wish. It will also make it harder to manage faults.