i am assigning a value 2 to res variable in try seq…
i want that res value in catch seq…
main sequence(exit on success)
{
try seq(exit on failure)
{
if a!=2 // i will give input other than 2
{
set res to 2 in a MAP
}
}
catch seq(exit on done)
{
// i want to get res value here…ie in results i want to see res=2
}
}
this flow doesn’t produce res=2 in result…bcoz…in try seq…exit on failure IS will roll back pipeline values before seq…!.
any alternative…any java service…! plz…help me…:sad:
we have to use that flow step in catch block…?i used that…but still no visible of res…i think once we get out of try block with exit on failure…all variables in try block can’t be accessed in catch block…any alternative…?any java services…?
The information Arnaud provided is the thing to do (exit and signal error isn’t the problem though). Call getLastError. It returns a document. One of the fields is “pipeline”, which is a document holding all pipeline vars as they were at the time of the error.
It won’t show you the pipeline contents within Developer. You’ll need to explicitly add and map variables that you want out of the pipeline document. That means, modify the “pipeline” document to add your “res” variable to it, then map it out to another var.
That’s not what the code is doing. The SEQUENCE is exit on failure. The code isn’t doing EXIT signal failure. At least that’s how I’m reading the pseudocode.