Unable to resolve Object reference error at startup

Okay thank you that does make sense actually! Am I understanding it correctly that I cannot pass an empty argument via invoke? In that case I might have to do some serious re-structuring and editing of my variables and arguments which I’m fully aware should probably been done in the first place anyhow.
That a fair understanding?

If you mean empty as in “nothing in the Values column of the Invoke Workflow arguments window” then I don’t even know, I’ve never tried that.

If you mean empty as in “one of the variables being passed in is empty” then no, you can’t do that. By empty, I mean “Nothing”. For example, if you have a variable myDT as System.Data.DataTable and try to pass it in without initializing it, you’ll get the Object Reference exception. You would initialize it with “New System.Data.DataTable” in the Default of your variables pane. This doesn’t populate the datatable it just initializes it. You don’t have to populate it, you just have to initialize it to avoid the Object Reference exception.

I’m talking about “one of the variables being passed in is empty”, the second one you talk about.
For example, I’m currently trying to pass a String “logFileExcel” that does not have a default value, am I wrong to then try to pass it as a argument in my invoke? Could that cause the NullReference?

It should be populated by your automation before it gets to the invoke. If it’s never going to be populated, why have it as an argument?

That’s very fair actually!

If it’s a situation where it will be populated sometimes but not always, then just put “” into the default so it gets initialized as an empty string.