Object reference not set to an instance in Invoke workflow variables


#1

Hi ,

I am a beginner in UIPath. I am trying to get a variable from Invoke one workflow to another flow viewer workflow and i have set the arguments as below

But when i try accessing this variable in the other workflow then i am getting error as “Object Reference not set to an instance of an object”.
Also in the workflow where I am accessing the variables i have imported the arguments with the direction as “In”

Please help…


#2

For the Out arguments,
In the main workflow create an variable of OUT argument data type and in the Invoke workflow, assign the OUT argument to the variable created in the main workflow.

Arguments scope only inside the invoked workflow. It can’t be accessible in the main workflow.

Regards,
Karthik Byggari


#3

Object Reference not set to an instance of an object–>coming because it is either null or blank.

Can you please check if the parameter is defined correctly or passed in the workflow correctly ? basically check the place where you are invoking the workflow, make sure it does have some value passed in the “In” arguments!

Also make sure that scope is correctly defined.

Hope it helps :slight_smile:


#4

I tried applying your solution but the same error persist. Can you please elaborate.
Below is my workflow and the link of the workflow.


I need the value from serverLauncher.xaml to INDDViewerPath.xaml


#5

Hi @Sheshrocks
Below is the serverLauncher.xaml arguments

In order to get the value i have used ServerPath variable as an “In” argument in my invoke workflow


#6

Create one variable in main workflow and write that variable in the value field marked in red below -

image


#7

Once you are getting the “OUT” from ServerLauncher, where are you assigning it to the input to INDDViewerPath workflow ? you have to define or assign it also to pass it to the next workflow


#8

This is how the ServerPath variable is used in Edit Arguments and the value column which has ServerPath is defined in Main workflow


#9

Not sure, if it is a scope conflict as both argument value and assigned name seems same.
can you attach your workflow here?


#10

I am unable to upload the document as there is a message displayed while uploading as “Sorry! New users cannot upload documents”


#11

I have tried this as well. But i am actually not that aware about the concept of Arguments that are used while invoking a workflow. I am still facing the issue


#12

Hi,
Maybe you should start here - https://studio.uipath.com/docs/using-arguments

Simple speaking: You have to declare “ServerPath” VARIABLE in the Main.xaml (calling workflow) to receive the value of “ServerPath” OUT ARGUMENT declared in “serverLauncher.xaml” (called workflow). Then in “Invoked wworkflow’s arguments” dialog you will link the ARGUMENT and VARIABLE

Cheers