What is the difference between edit Arguments and Import Arguments

Hi All,

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?

Many Thanks,
Balakrishna Reddy

2 Likes

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.

Richard

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

Can you help me ?

Did you make sure to

  • 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.

1 Like

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 :wink: ), 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 :slight_smile:
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 :slight_smile:

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 :slight_smile:

This is pretty bad practice. Why would you have an Argument in a workflow that you didn’t want to reference?

I don’t think it is a bad practice. I sometimes try to make reusable modules(xaml) which can do multiple task based on the input which are provided.

2 Likes

I’ll let you off. :stuck_out_tongue:

1 Like

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

Just to clarify, I was saying that it is now redundant as Import does not overwrite existing arguments whereas in the past it did.

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.

Thanks.

Image is not visible. Can you attach it again?

Ok.

Here you are passing in_System1Credential variable to a xaml file which is returning out_Username and out_Password.

in_System1Credential should contain the name of credential.

To remove the the ! error , you will have to create local variables.

To understand the direction: The Arguments Panel

Actually, there in that workflow I didnot understand from where did they get those "Get Orchestrator Credential Activity

Basically, credentials can be stored in UiPath Orchestrator assets tab and they can be accessed using this activity.

Get Orchestrator Credential Activity can be found under Orchestrator → Assets in Activities Panel in UiPath Studio.

if it is missing in activity panel, install it from manage packages(Ctrl+P).

Ya okok…so I need to create asset in my orchestrator!! and pass here?using that get credential activity?