Object not set to reference of an object

I am getting an error as object reference not set to instance of an object while processing invoices using action center in orchestrator for each loop activity.


Can Anyone please help me with this error?

@Cloud_Compute

“Object Not Set to reference of an Object” Usually this exception comes if you are passing null value to For Each

So check the value is not null, Also check you have set the correct Foreach Type Arguments from Properties

Hope this helps

Thanks

I have ste the properties as object for for each activity
image and I am passing default value to it

@Cloud_Compute

Check as below

I am getting correct results, Check if there are files in Folder you have mentioned

Hope this helps

Thanks

@Srini84 yes there are files in my folder and i am trying to process each file using for each activity but i am able to process only one file not the other files

can u please help me with this issue?

@Cloud_Compute

Can you try by passing full file path and check

Hope this helps

Thanks

Also I am using orchestrator template to create the workflow as I am trying to get those files in orchestrator in action center

full file path as in?

@Cloud_Compute

Full folder path

Thanks

no this did not help

@Srini84 no this did not help

I have seen that happen in following situations:

  1. You are using an object that has not been initialized
  2. It has been initialized but the type does not match your use. For example, your object definition is

String,Object

but your usage is

int32 or String,String

etc.

In your case, it appears to be #2.

I’ve seen this happen when using the action center. If you are using “Create Document Validation Action” and “Wait For Document Validation Action And Resume,” this error will occur. The reason is that when UiPath suspends while waiting for the user to take the action, UiPath effectively ends the process and clears all of the variables (including the loop variables). When it starts up, the loop variables are null hence the error.

To resolve, try a “parallel for each” instead of the standard “for each.”

1 Like

ok thanks I tried and now my workflow has no error But now i am able to process only one invoice . In the action center the task gets created only for one invoice and not the other one can u please help me with this issue?

I’m happy to take a look at the workflow if you can attach it. There are a lot of variables that may be in play.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.