The service I have built has some nested Sequences, It looks like this
Sequence(Main){exit on success}
—Sequence(TRY){exit on failure}
-----invoke service 1 (service1 o/p in the pipeline)
-----Branch based onthe service1 o/p
-------SequenceA{exit on failure}
------------invoke service 2 (service 1 o/p and service 2 o/p in pipe)
-------SequenceB{exit on failure}
------------invoke service 3 (service 1 o/p and service 3 o/p in pipe)
------invoke service 4
—Sequence (Catch) {Exit on Done}
-----get.lasterror
-----smtp.service(send error mail)
The problem that I’m facing now is, suppose if the service 2 errors out, it goes to the Catch block with only the i/p and o/p variables that are specific to the Sequence A. The remaining pipeline values say service 1 o/p gets vanished.
Is there any way that I can maintain the pipeline values inthe Catch block also? Using the Scope option didnt help me much.
There must be more here than meets the eye. I just modeled your flow and stepped through it in Developer and all of the pipeline contents, including variables initialized outside sequence A, were in the lastError/pipeline document after I caused service 2 to throw an exception. Is your service 2 doing anything that would affect the pipeline contents?
I’m not using any drop values or clearpipeline service.
Even I could get the values when I modeled the code i mentioned earlier.
But in the original service(for a PIP) that I’m facing this problem is something like this
Sequence(try)
----Sequence1
there are services here
----Sequence 2
there are some services here
----Sequence 3
Loop
Sequence 3A
Dateformat change service (it errors out here)
some more services
Sequence(Catch)
getLastError
The datefield in the PIP is not yet mapped, so its coming null, its there that the service failed,(I can overcome this null date issue, but wat if some other service fails?) and when I looked into the lasterror/pipeline there was only variables that were set in Sequence 3A i.e currentDatePattern and NewDatePattern.
Did your other sub services has Exit step (onfailure)?? or it has also try/catch sequences?? If yes remove that and make fail in those services for testing.
As Tim mentioned it should work for you also unless your subservices are dont messup the pipeline.
Pls search this forum,i think this procedure was discussed before in other threads.