Level 3, Assignment 1, Tried everything, Please help


#1

I followed the walkthrough and double checked everything but still can’t find how to fix this error. Actually I am on it for a couple hours now. I don’t think I can solve this without your help.
I was able to find out two things:

  1. If I change NumOfResults at data scraping to < 10 I don’t get an error. Probably cuz I don’t have any transactions to do.
  2. The error is thrown at assign activity
    And of course error message itself: "System error at initialization: Object reference not set to an instance of an object. at Source: Anonymously Hosted "
    Attaching all relevant screenshots. Let me know if you need more information.
    Sequence itself:

Assign activity:
Screenshot_5

Arguments from extractWorkflowItems:
Screenshot_2

Full Variables list:


#2

Hello @Vlad_Yudashkin,
Please set the default value of dt_WIs to : New System.Data.DataTable

Regards,
Rishabh


#3

Hey @Rishabh_Lakhera,
It didn’t help. Error message is still the same.


#4

Try filtering the DataTable inside the ExtractWorkItems workflow itself and then only pass the WIList as an out argument something like this :
Also print the length in the workflow as well as in the sequence in the main file just to check if the argument is received correctly.

PS- out_WIList is received in a variable WIList in the calling sequence.


#5

@Rishabh_Lakhera
I followed your advice and noticed that I am getting that error at writeline wich tries to output row count. Screenshot attached.


#6

@Vlad_Yudashkin

There seems to be some issue with your data scraping.Try doing it again!
Also, make sure dt_WI has default value as New System.Data.DataTable here as well and the output of data scraping is set to dt_WI and maxResults to 0!


#7

@Rishabh_Lakhera

Unsuccessfull. Maybe that’s selectors but I checked them with UI Explorer and think they are legit.

Target: "<webctrl tag='TABLE' />"
NextLinkSelector: “<webctrl aaname='&gt;' tag='A' />

Attach Browser selector: “<html title='ACME System 1 - Work Items' />

Maybe extract metadata is wrong but I don’t know how to analyze this one yet.
ExtractMetadata: " <extract-table get_columns_name='1' get_empty_columns='1' />"


#8

Did you select the extract complete table option when prompted?

Is it still giving the same error, that is, Object reference not set to an instance of an object?
Could you please show me the properties panel of data scraping and the variables panel too


#9

I did select extract complete data table. And ye, the error is still the same.

Here are the screenshots.

Properties Panel:

Arguments:

Variables:


#10

The default value of dt_WI is still not New System.Data.DataTable !


#11

Oh, now it works. So I had to initialyze datatable as an object. I am already very greatfull to you for helping me resolve this, but I wanna understand my mistake so I won’t make it in the future. Could you answer my questions, sir?

  1. Why most of the times I can skip initialyze dataTable as an object and it will still work? (I mean another projects)
  2. I Still don’t understand why it didn’t work with dt_WI as extracted argument in main file cuz I did try initializing dataTable there too. Why filtering inside workflow helped?

#12

In other projects you must have got a ExtractDataTable object created by itself once you finish the extraction, if you look closely you’ll see that upon creation it gets initialized by itself!

You can filter it outside as well!
Now that you know that your problem was with the initialization of the DataTable object inside the workflow,you can take it out as an arguement, create a DT variable in the main(also initializing it at the same time) it’ll work :slight_smile:


#13

Hi all
Hi How were you able to get WI_List out onto the : "Init State ( by passing arguments) I tried to pass as Datarow[] , but i can’t display the count in a write line . so I can’t figure if any data has come out " ?

InitAllApplication Workflow

the data rows are fetched as DataRow[] and the count is being displayed while in that workflow.
Please see snapshot below

image

Invoke workflow of InitAllApplications

But when I try to get the DataRow[[ out through the invoke workflow I can get the value out onto the main page .

Please see snapshot below.

Main WorkFlow

Please see some more info . in the main workflow the DataRow is not getting displayed.