Data Scraping from SQL Developer

Hi, I am new to Ui Path. Currently I am trying to invoke a file named sequence-copy.xaml inside my main.xaml file.
The objective is to execute the sequence-copy.xaml file and get its output passed as argument to the main.xaml file.
But the sequence.xaml file is not getting executed. I have also tried Launch workflow activity but to no avail.
Kindly anyone help in this regard?
Any other way to execute a workflow file inside another workflow file will also be appreciated.

1 Like

Hi @mayank_sinha

Welcome to the Forum! :sun_with_face:

The objective is to execute the sequence-copy.xaml file and get its output passed as argument to the main.xaml file.

I attached a simple project to demonstrate the implementation of your objective.

But the sequence.xaml file is not getting executed.

How did you determine that it is not executed? Please let us know or provide a screenshot,etc.

  • Was there an error,
  • or your log was not reflected in the Output panel,
  • or your argument/variable was simply not set?

InvokeWorkflowActivityError.zip (2.4 KB)

1 Like

Hi @mayank_sinha

Did you try to use the debug mode or create a og file for you to see if the workflow being executed ?

cheers :smiley:

Happy learning :smiley:

1 Like

Hi, @marci080
In the sequence-copy.xaml file. I am using the data scrapping tool to scrap data from the table in the sql developer application. I have passed a write to csv activity to in the sequence-copy.xaml just below the data scrapping tool output and used it as input for the write to csv.

The reason I am saying that the file might not be executing(rather improperly executing) is because the CSV file is being created but there is no data in it. It’s just an empty file eventhough the query is excuted in the sql developer and a table is showing in the output box of the query.(from where I am extracting the data for the data scrapping tool)

Hi @pattyricarte,
I have used a data scrapping tool to extract a datatable from the sql developer application’s output panel. Then I have used a write to csv activity to check for the output. But all I am getting is a balnk csv file. Eventhough the data in the sql query application is displayed properly.
My mistake I should have told that the Sequnce-copy.xaml file is not executing properly. Sorry for that.

1 Like

Did you get any error in Sequnce-copy.xaml when being executed ? @mayank_sinha

1 Like

@pattyricarte
No I got no error. Only an empty csv file

1 Like

So from your statement here.

I have used a data scrapping tool to extract a datatable from the sql developer application’s output panel. Then I have used a write to csv activity to check for the output. But all I am getting is a balnk csv file

you already got an error wright. Can you share how did you do this activty ?

cheers :smiley:

Happy learning :smiley:

1 Like

Hi @mayank_sinha

Thank you for the clarification.

The reason I am saying that the file might not be executing(rather improperly executing) is because the CSV file is being created but there is no data in it.

  • The fact that the CSV file was created, means the Invoke Workflow activity did its job.

the CSV file is being created but there is no data in it. It’s just an empty file eventhough the query is excuted in the sql developer and a table is showing in the output box of the query.

  • Let’s find the root cause of why the CSV file is empty…

Please perform debug and observe the ff:

  1. Is your datatable being set after data scraping?
  2. Is the same datatable being passed to the Write to CSV activity?
1 Like

Hi @pattyricarte ,
The flow of the activity is as follows:
Main.xaml
Start->Takes input from user for date->Types this Date into SQL developer application in the form of the query-> Executes this query-> invokes the file sequence-copy.xaml->(sequence-copy.xaml)in this the output of the query is extracted in the form of the data table and printed in csv and also passed as argument to main.xaml.
The query is running fine and output is being displayed but still the data is not extracted in the sequence-copy.xaml file.


1 Like

Did you check if the ExctractDatatble has a value or not ? @mayank_sinha

1 Like

You are misleading the community here by invalid subject of your post :frowning: Root cause of your problem is likely not the Invoke Workflow activity.

Prior raising question you should validate - using DEBUG - if any data got scraped - which is likely not the case :frowning:

Cheers

1 Like

Hi @J0ska,

Thank you for reminding us of this FAQ and
guiding @mayank_sinha as she is new to the Forum.

For now, I change the Subject of the post to avoid confusion.

Hi, @J0ska
I would humbly like to apologize for my mistake. I am new to the forum and was not aware of it. Will keep the faq guidelines in mind from now on.

Hi @marci080,

  1. Is your datatable being set after data scraping?
  2. Is the same datatable being passed to the Write to CSV activity?

Answers:

  1. Yes
  2. Yes.

The issue is only happening when I am running the main.xaml file in which the Sequence-.copy.xaml file is invoked. But when I am manually executing only the Sequence-Copy.xaml file then it is running fine.

Hi @mayank_sinha
Please check that the Argument’s Scope is correct.
That is “Sequence - Copy.xaml” 's Datatable argument should be set in “Out” scope.

Hi @marci080,
Yes, I have checked that it is already in “Out” scope.

The Data scrapping part is only not working when I am invoking Sequence-Copy.xaml file in the main.xaml. If i run it independently by manually running the query in the sql developer, then Sequence-copy.xaml file runs fine and gives the output as expected.

Hi, @pattyricarte
Yes I have used the Rows.count activity for this. I am attaching a screenshot for this.

One update: The Sequence-copy.xaml file works fine when I run it independently after manually executing the query in sql developer. But when I am executing the main.xaml in which the sequence-Copy.xaml file is invoked then the datascrapping in Sequence-Copy.xaml is returning an empty table.

Hi @mayank_sinha

Excuse me for doublechecking

The Data scrapping part is only not working when I am invoking Sequence-Copy.xaml file in the main.xaml.

During the scenario above, the answer to the below questions are Yes?

  1. Is your datatable being set after data scraping?
  2. Is the same datatable being passed to the Write to CSV activity?

This time, could you provide the screenshot of the Local pane during Debug so we can help you look at the problem?

1 Like

Why datascrape from SQL Developer at all? Just set up a database connection and Invoke the SQL. Much more stable solution.

1 Like