Failed to get Out Argument from workflow xaml if exception rAISED

Hi Team,

trying to get values from workflow through out argument if any exception created within my workflow.

but if any exception raised within the workflow, all the out argument values are ‘null’.

please suggest any option

2 Likes

Hi @saransr

just refer this thread ,

Hope this will help you

Regards
Sudharsan

Hi @saransr ,

This is expected as the workflow is unable to “finish or end gracefully”. This is where Try-Catch can help you. If you enclose your workflow within a Try-Catch block, it will give you an opportunity to handle the exception when it occurs and will be able to end your workflow gracefully. In effect, your out arguments (values before the exception occured) will stay intact. Furthermore, using a boolean out_IsSuccessful argument can help tell you if it did encounter an error or not. It should look something like this.

Try

  • out_IsSuccessful = FALSE
  • set out_arguments with default values
  • do processing…
  • set out_arguments as needed
  • do processing…
  • set out_arguments as needed
  • out_IsSuccessful = TRUE
    Catch
  • out_IsSuccessful = FALSE

Were you able to try it @saransr ?