In my Process i need to out one value from xaml - so I have created out_arugument. Out_argument outs values when everything is fine. but unfortunately if any error happens in the xaml am not getting the value in Out.
Eg: Xaml contains for 5 steps where am doing the out value in 1st step and error occurs in 3 steps of the process… Still am not able to get the value
So I have planned to Add the value in queue after the step 1 completed. So that can able to get the value from Queue from out of the xaml.
Note: The error position might occur in any step inside the xaml and my purpose is need to get the value out from the xaml even any error occurs
Any suggestion to overcome this pls - Thanks in advance
You can instead try with an easy step by adding a try catch block inside the workflow for bypassing any type of exceptions. So it won’t affect your workflow and you can get Out_argument value too.
But could you please help me some Xaml file for reference. Because i tried the same as you both were addressing (Proper error handling ) - Its unfortunate that i cant attach my Xaml here. but i will try to share some verbos of my code structure
Try - block
–sequence ( contains of 3 steps)
1) Assign Out1 = “Test1”
2)Click some element in browser
3) Assign Out2=“Test2”
Exception block
Nothing
Finally block
Nothing
So i Purposefully closed the browser to induce the error on 2nd step in try block.
even the error is captured in exception block am getting null value outside of the sequence for the Out1 argument
@rahulsharma - Thanks for your information , Yes that was my plan also, however the value which am expecting to out is critical and replacing that with default value will have to do some kind of manual work by user when they look the final report.
So ly thinking of to other ways to get the value as out
My intention of request is to get the valid value which out during the process.
Assigning the default value will be static one and neither its valid nor proper information…
so obviously user need to do some manual work when look default value in the report.
eg : If am taking the account number as out which is not static through out the process and any error occurs we are updating with the default value like “Default account” .When they got the summary report or they manually need to look out for Account number for that transaction.
Hope am clear
Would be great if you can share the ways to get the out value - Thanks.
you are expecting that a value should be there and that should be a correct value? that is possible only when there is no failure in that workflow.
You mentioned of there’s any exception, you need the out values. that will be there if you use default value and try catch inside that workflow.
But if there’s an error, there will be no value fetched for that variable that gets updated on that workflow. right?
So what you can do. If you have multiple value extraction activities, check the checkbox from property that says ‘Continue on error’. This will continue the existing execution of one oh the value extraction activity fails and will continue with further extraction and update the variable.
and yes, in cas e of genuine exception if there’s any default value in the report → you can either not show the report ans her or rectified by someone and then send OR you can mention the error, Error in extracting this data and then user can check it manually.
You csn manage in multiple ways. Just try to be realistic, getting correct values from a workflow even if there’s an error in between inside that workflow isn’t a realistic statement.
If there’s an error → you can try to fix something to avoid exception and make it more stable.
From 1st paragraph of you comments I understood it’s not possible to get the output if the xaml has any error.Which even am aware and that was my initial thoughts.
Am really grateful to this forum which solved many of problem where I initially I thought there is no solution .
My thought was the assign is happening in the first step where the value is assigned to out argument and after which only error happens. So why the value is not able to get from outside of the xaml where the value is already assigned. I felt that is something realistic. Which might be wrong as well…
Just wanted to know is there any other ways to get the value and that’s reason of seeking help here
Either way i already used that alternative approach of assigning the default value.
yes this is possible. If the value is extracted, just assign directly to the out_Argument in the flow. If the error happens after this, there is try catch that will take care of error but the out_Argument will hold your value.