can anyone clarify me the below things
1).what is the difference between edit Arguments and Import Arguments of Invoke Workflow file Activity?
2).what is the difference between edit Arguments and Import Arguments of Launch Workflow interactive Activity?
Import Arguments is what you select when you first invoke the workflow and want to get all of the arguments that are available to it. Edit arguments is what you would use when you want to make a change to arguments that you have already imported.
We need both because if for example, you make a change to that workflow to add new arguments you can select Import Arguments which will import any new arguments created.
Previously Import Arguments would overwrite any default values but it no longer does this which means that the difference between Edit and Import Arguments is perhaps not as clear as it was.
I have problems using the invoke workflow file, I have 2 workflows where at the first I get data from excel and I use a object variable to storage the information.
I need to pass to the second workflow this object but when at the second I trying writing obj.count.tostring ( to validate if the data all right) It is shown me an message error that tells me I need to initialize my object argument but if I do that the count number is 0
Create an Out argument in the first workflow and import this from the Invoke activity into a variable?
Create an In (or In/Out) argument in the second workflow, import it and put the same variable there?
Make sure there are no variables with the same name as arguments in either workflow?
This should successfully pass the data around, however it would still be illegal to call obj.Count.ToString if obj is of type Object. This is called late binding and is not allowed in UiPath.
Since you’re getting data from Excel as a DataTable, you should make the workflow arguments have the same type and instead use excelData.Rows.Count property to check whether it holds data.
Richard, in above post you explain the reason for why import arguments is needed, but i would like to know why EDIT is needed.
Is there a usecase for ever using edit arguments instead of import?
I actually think this is redundant now. In the older version Import would import all arguments and wipe the variables, this was annoying. Now this has been changed, edit is the only option.
@qateam we probably only need one button in future called Import/Edit Arguments to avoid confusion.
Edit Argument can be used to avoid adding unnecessary arguments.
Lets say B XAML file has a generic logic which returns 5 argument as Out. Now each time you press Import Argument of Invoke Workflow Activity of A XAML file, you will get all the 5 out argument in A. But if A XAML require only 2 out of those 5 arguments, then you’ll need to press Edit Argument next time to avoid including other arguments for further edit.
Similarly, if C XAML file requires other 3 out of 5 arguments of B XAML. We’ll need to follow same approach ie Import Argument to get all arguments and Edit Arguments to do the further Edit.
Can’t i just use import and leave the once i don’t need empty then?
Of cause this would be a problem if it has like 50+ arguments (but then i think you have a design problem instead ), but as long as you have < 10 arguments, it’s it just better to import all and leave empty?
Some thoughts on improving this:
With a ‘minor’ change this could be used for something else:
Import all
Import only required
I hope these are self-explanatory
I wrote about this in another post, and it shows that this is not a ‘minor’ change, but quite a large one, but i’ll leave the idea here anyways
And another note:
If you decide to remove Edit, and only leave 1 button, then you should consider that you might as well press it automatically every time i finished editing the “path” field. Just to lighten my click burden
Just to clarify, this is NOT bad practice, but quite well known as best practice in regular programming.
It’s called Overloading, and more info can be found here: Function overloading - Wikipedia
HI @palindrome, have doubt in the arguments…in the example of the ADVANCED LEARNING, CLIENT SECURITY HASH…! OF UIPATH ACADEMY TRAINING,Capture5|690x210
…Can you explain me once!! regarding those arguments.