I have 2 workflows, Main flow and a Subflow that is invoked in Main flow, initially a boolean value is False in the Main flow. Then subflow is invoked and a exception is thrown and now the flow is in the Catch part of Subflow, here the boolean value is changed to true and a rethrow happens here, now the flow is in the Catch part of the Main flow, now i am printing that boolean value here, it is printing as False. As per the logic it should print True and thats the requirement but it is printing only False. Can anyone please help me on this?
Fine let’s do like this
—in MAIN xaml we are using TRY CATCH activity and place the sub xaml in TRY Block
—in MAin xaml create a variable named bool_input of type Boolean
—in sun xaml create a argument named in_out_boolinput of type Boolean and of direction IN/OUT
—now in Main xaml first use a assign activity
bool_input = False
—now use INVOKE WORKFLOW file activity and call the sub xaml and pass the above variable as input to IN/OUT argument in_out_boolinput
—then inside that sub xaml using TRY CATCH and if exception is thrown it goes to Catch Block where use the assign activity in_out_boolinput = True and followed by this Throw activity is used so that now it goes to CATCH Block of Main xaml where use a writeline activity as bool_input.ToString
This will now hold the latest value of the argument and will print as True
Hi @hacky , thanks for your response
In the Main it is “IN” and in the subflow it is “In/Out”, also i tried other combinations but nothing worked.
Hi
I saw the code
It looks fine
Let’s try like this
Instead of IN/out argument let’s define a separate OUT argument that takes he value from CATCH block of inner workflow which can be obtained as a value in the CATCH block of main workflow
Hi @Palaniyappan Just tried that, didnt work, when i try to print the same in try block of the main flow , then the value is true, only in Catch block it is not coming.