Variable value not returned to parent XAML if any exception occured

I have created 2 XAML files called A.xaml and B.xaml.

  • Included Try catch only in A.xaml, and invoked B.xaml
  • Created a string variable called “StrVal” and while invoking B.xaml, i am passing that as a In/OUT argument
  • In B.xaml, I am assigning value to that variable, and next step i am throwing an exception
  • It Calls A.xaml catch block, in that catch i am trying to access the IN/OUT argument value, But it always showing empty.

Please suggest any ways too retrieve the variable value.

Please suggest me, if any workaround for this.

Now that’s an interesting question.

From what I can tell, workflow Outputs is set on instance completion, so if the invoked workflow ends with any other state, the output is not provided (which makes sense, at least in WF context).

Only solution I’d have at this moment is don’t let it end in an exception.

Hi andrezej.kniola,
There couple of instances where we need to write the status if it fails to complete and I have return the status in catch block and I want the xaml to return the argument value present in catch block