Problem passing arguments to invoked workflow

studio
arguments

#1

Hi,

Newbie question maybe, but I’m unable to pass arguments into another workflow and cannot find any specific
answer as to why this shouldn’t work. I tried to create this workflow, exactly as instructed in:

The first workflow only passes an argument named “InputArgument” to the invoked workflow (Direction “In”). An argument named “InputArgument” is also declared in the second workflow as instructed. The SecondWorkflow only
has a messagebox that quotes the InputArgument variable. So, everything should be in order.

But I always get the same error:

Main has thrown an exception

Message: The values provided for the root activity’s arguments did not satisfy the root activity’s requirements:
‘SecondWorkflow’: The following keys from the input dictionary do not map to arguments and must be removed: InputArgument. Please note that argument names are case sensitive.
Parameter name: rootArgumentValues

Source: Invoke workflow file: UiPath.Core.Activities

Exception Type: ArgumentException

System.ArgumentException: The values provided for the root activity’s arguments did not satisfy the root activity’s requirements:
‘SecondWorkflow’: The following keys from the input dictionary do not map to arguments and must be removed: InputArgument. Please note that argument names are case sensitive.
Parameter name: rootArgumentValues
at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Can somebody tell me what I’m doing wrong?
I cannot see any clear errors in these workflows.


#2

Hi @RPA_tester,
ChildWorkFlow.xaml (5.6 KB)
parentWorkFlow.xaml (5.7 KB)

please refer my example.
It runs correctly.

Regards,
Hoang Anh.


Invoke workflow file でのパラメタ受け渡し
#3

Hi,

Your example runs correctly, but when I try to create the same from scratch, it doesn’t work. The reasons are the following (and I’m rather surprised about this, by the way):
I cannot even create the same kind of workflow as you did, since your ChildWorkFlow does not define the variable InputString, but I cannot create a childworkflow like this, as it demands that you declare a variable. But if I declare the variable, I just get the same error as before.

I’m kind of mystified, as according to the knowledgebase and all the online guides, this should work.
I’ve done this:

And it just gives me the same error. Here are my test files:

InvokedWorkflow.xaml (4.4 KB)
FirstWorkflow.xaml (4.5 KB)

I’m kind of annoyed that problems with this simple step are making it harder to build bigger automation processes :frowning:


#4

Hi,

Change the parameter from a variable to an in argument. The arguments tab is just right to the variables tab. Click save - go back to the FirstWorkflow - click import arguments on the invoke activity and type in whatever string you please inn the parameter argument.


#5

That works. Thanks!


#6

Hi,

Passing datatable from one work flow to another work flow is not working throwing the error given below,
Invoke workflow file: UiPath.Core.Activities : The values provided for the root activity’s arguments did not satisfy the root activity’s requirements:
‘Argument1’: The following keys from the input dictionary do not map to arguments and must be removed: Extractdt. Please note that argument names are case sensitive.
Parameter name: rootArgumentValues


#7

Check if the direction of argumenty and naming is matching.


#8

Thanks