Error getting transaction data for Transaction Number: 1. Value cannot be null.\r\nParameter name: source at Source: If

Hello! I’m receiving this error and am unable to solve it. I’ve looked at other issues similar to this but have been unable to nail down exactly what is causing this issue.

In my init state, I have an invoke workflow activity which extracts the data from the ACME system. These are the arguments for that activity:
arguments

Within that workflow, I have these activities and arguments with no variables:

This is the expanded Assign activity:
Assign

Unless I am mistaken, I do not believe anything else should occur in the Init state here. Moving on to the Get Transaction Data State, the first thing that gets involved is invoking the ‘GetTransactionData’ workflow Here are my arguments for that:

and my variables:

Opening my GetTransactionData workflow (no variables):

Here is the assign activity expanded:
gtd%20assign

Again, the full error I’m receiving is:
“message”: “Error getting transaction data for Transaction Number: 1. Value cannot be null.\r\nParameter name: source at Source: If”

Thanks for help in advance!

Here did you bind your variables?

image
Click on edit and set the variable names.
There in_WIList = out_WIList

Thank you very much for the response!

Do you mean to set those as arguments for that workflow? Here are the arguments I currently have for that workflow, apologies for not including earlier, I thought I had everything!

You are good but i missed this:


Why data table? i think it should be DataRow as its filtered rows of the datatable
You will need to change that.

Also
image
this would be in_WlList(in_TransactionNumber)

Try and let me know

1 Like

I made the updates and am still received the same error:
message": "Error getting transaction data for Transaction Number: 1. Value cannot be null.\r\nParameter name: source at Source: If

With the updates, that arguments for that workflow and page now look like this:

I also made the update to remote the ‘-1’ from the Assign activity

Ok then one thing you need to check.
In the System1_GetWorkItems workflow have you checked if the extraction is happening correctly?
And that the variable binding is correct?

image
Add a logger to see the data result

Well I believe we found my problem. I tried to align it to your screenshots but our variables are so different I’m having difficulty. Here are my arguments for my workflow that data scrapes from the ACME website:

Opening up that workflow, I’ve done some work to it but still have an error (the error reads: ExtractDataTable.Select(“Type=‘WI5’ AND Status=‘Open’”). Value of type "1-dimensional array of System.Data.DataRow cannot be converted to 'System.Data.DataTable). I can’t seem to resolve on my assign variable now. Also, this shows ExtractDataTable listed as a variable in this workflow, not an argument:

And here is the argument I have for this workflow:

I’m a little confused on how to handle this. Does my ExtractDataTable need to be become an argument as opposed to a variable?

Here also WIList should be DataRow and not datatable
Once changed you should be good

Well that fixed that error but now my program isn’t scraping data properly. It will login to the ACME website, click on work items, but once it goes to the page of data, it won’t go to the next page. I popped a message box within the workflow Extract ACME Data Table file workflow to see if that work flow is entered, but it doesn’t pop up. I’m also received this error message:
System error at initialization: The values provided for the root activity’s arguments did not satisfy the root activity’s requirements:\r\n’Main’: The following keys from the input dictionary do not map to arguments and must be removed: out_WIList. Please note that argument names are case sensitive.\r\nParameter name: rootArgumentValues at Source: UiPath.Core.Activities

Here is an image of the arguments for that page and that work flow:

Here is a shot of the new Extract ACME Data Table workflow:

And a screenshot to include the variable for that workflow:

Furthermore, I have tried data scraping the site again a few times to no avail

1 Like

in your main can you show me the list of variables and arguments that you have
you have mapped something in wrong type

I had a few mains so I renamed them to find the correct one - that’s why the name might look different. I just named them to match the workflow they are in.

Here are the variables for the workflow:

Here are the arguments:

Thanks again for looking into this…

In the case you had multiple main files and now that you have renamed them, can you run your process and tell me what the error is?

The current error:
System error at initialization: The values provided for the root activity’s arguments did not satisfy the root activity’s requirements:\r\n’WI5’: The following keys from the input dictionary do not map to arguments and must be removed: out_WIList. Please note that argument names are case sensitive.\r\nParameter name: rootArgumentValues at Source: UiPath.Core.Activities

As soon as it reaches the place where it used to go page to page and read the data, the program auto closes. I also just redid the data scraping in case that was causing an issue with multiple places being named ‘main’ but it’s still auto closing.

ok WI5 is where you have not done the correct mapping.
Can you show me the invoke of WI5 arguments mapping
Also inside workflow, please show the arguments and variables scrrenshots

Here is the invoke of the WI5 arguments mapping:
wi5%20invoke

In the workflow, the variables (please note that this is only set to the data scraping sequence, if it goes “sequence” sequence it disappears. not sure if this is important). Note, that message box doesn’t pop up when I run my workflow, so it doesn’t seem like my program ever gets in here

In the workflow, the arguments:

I’m not opposed to uploading my init main if that is helpful

Ok, the issue is due to a small step that you missed doing.
In your workflow you have IN/OUT argument WIList of type DataRow (this you updated recently)
Then once you change the arguments of the workflow the additional step that you need to do is In the invoke go and click on Import Arguments
This will update the arguments and the types.

Then you do the assignment to out_WiList = WIList of type DataRow

Where exactly do I do the assignment of out_WiList = WIList of type DataRow ?

Here is what the new invoke of the WI5 arguments mapping looks like:
new%20wi5

This looks fine now.

So what is your local variable? or the variable that you are getting this value into?
You will use that here on the right side.

I believe it is ExtractDataTable. It is outputted by the data scrapping of the ACME site. Here it can be seen originating in the workflow as a datatable type variable:

Then once out of the workflow and back into main, here it is as the local (I believe this is what you mean by local) variable for this sequence:

The blue exclamation mark is occurring because I tried to input ExtractDataTable in the value slot of WIList as mentioned above and received error: "Value of type System.Data.Datatable cannot be converted to 1-dimensional array of System.Data.DataRow. Here is a screenshot of that invoke workflow argument:
newest%20invoke

You will have to change this local type to DataRow type and it should fix your problem
And i would suggest to rename it to WIIDList or something you want.