- [Instructor] In array row, I need three variables.
I need first one is the name.
So again, I will type in Unicorn.SpecificContentName comma
and I need the month.
Again, I will type here,
but instead of name, this time I will type month.
And the last one is unicornName.
Save it.
And here it is new
because now I noticed that UiPath don't care about
how the word is written,
if it is capital letter or small letter.
So here in variables, I defined it as unicornname.
And here, I defined it as unicornName in capital.
Previous version, it will not accept this
and it will give me an error that this isn't identified,
but this version actually accept it.
But I will name it as it is, save it.
And where it is, data table io_unicornDt.
This is the data table I want to save.
And one last thing I want to do is if I did all this,
I want to set the status to be successful.
And we have activity, here set status,
set transaction status.
I will add here
and I will specify again the folder,
specify transaction item, it is in unicornItem.
And the status is successful.
So great.
And in case
there is any exception,
I will add this exception, system.exception.
And in case there is any exception,
I will set the transaction to be failed.
Again, I will pacify the folder path, a transaction item,
it's called in_unicornItem, and it'll be failed.
And the reason I will put exception.message,
I know what went wrong
and make this item to be failed.
Great.
We have all the steps here.
I will open the browser, type the name, type the month,
get the unicorn name and add it to the array row,
set the transaction successful if all go well
and set the transaction to failed if I catch any exception.
Great.
Let's save it and go back to our main.
And here in folder,
I will invoke this workflow.
I will use invoke,
invoke workflow file.
And here, I will choose the process
and we have some arguments.
I will specify the arguments.
I need the unicornItem.
I will pass it.
I have it here.
And I need the unicornDt.
I will output_DT.
I will pass it
and save it.
Okay.
Great.
Let's connect it together.
Okay, so first, it will build the data table,
get transaction item,
and it will check if this item is nothing,
it means that I don't have any data anymore.
If it's true, it will tell me this is the end.
If it is false, it will start the processing
and go to process the items.
I need to loop again and again
till I finish all this transaction item.
Now in this case, after I process,
I will go back again to get transactional item,
and loop again, get the transaction item.
Check if it is nothing.
I will end.
If it is not nothing, I will go here and the process.
And one last step, if I already end of the items,
let's save back all this data table
back to an Excel file.
So I will put here activity write range,
write range workbook here
to end our process
and specify the sheet name, Sheet1.
The path, I will say unicorn.xlsx.
Add headers.
And the data table, it is output_data table.
Okay.
Great.
And here we go, make sure that all connected,
all the nodes connected together.
Before run, there is a small change I want to do.
Here in the browser,
we want to make sure that it will not close
because if we leave it close after each item,
it will open again and close again.
So no need for this.
Let's make the browser open
and do all the transactions in one go.
So make sure that in close, you select Never
and save it.
Let's go to main and run our file.
Start and open our unicorn website.
Start to put the name, the month,
and get the unicorn name,
and to do this for all our 10 transactions
that we have in our queue.
Okay, perfect.
We have here it start the process
and did all the 10 transactions.
And once it has no transaction data,
it end of the items.
Let's go to Orchestrator
and see how it looks like inside the Orchestrator.
Inside our Orchestrator, you will have each status.
And because all of them are successful,
you will have successful.
You will have also when it is started, when it is ended,
and all the details.
If there is failure,
it will write for you the exception we have.
Okay, great. So all done.
Let's go back to our folder
and see the file, Excel file generated.
We have the Excel file generated for us Unicorn
and it has all the details.
It has the name, the month,
and the unicorn name we get from the website.
So it is just a fun example to understand the queue
and how it works.