Build an Automation for Orders Management
- How to create an automation in Cloud Studio
- How to use Excel activities in an automation
- How to set the columns for Order Number and Status in the Excel workbook
- How to get the order number and order status from the Browse Orders application
- How to close all open applications
Prerequisites
- Step 1
-
Check the dependencies by choosing the Menu
in the Project Explorer.Alternatively, you can choose the manage the project properties icon
. -
Select Dependencies from the dropdown list.
-
Choose Manage Dependencies icon.
.
-
From the Project Properties popup screen, choose Dependencies to manage your project dependencies.
By default, SDK
irpa_core
and SDKirpa_excel
are automatically added to the project on creation of automation.Now that you checked the dependencies, you can create your automation.
Which SAP Intelligent RPA SDK packages are added by default when a project is created?
Log in to complete tutorial -
- Step 2
-
Choose
, then hover over Create and select Automation from the artifact dropdown. -
From the Configure agent version popup, select the Desktop Agent version installed on your machine and choose Confirm.
-
In the Create Automation popup, enter the following information:
Field Name Value Name Collect Order Details
Description An automation to collect order number and status
The Identifier field value is populated automatically.
-
Choose Create.
The automation workflow opens in a new tab in Cloud Studio.
The automation designer opens and you can drag and drop activities, data types, controls, applications and other automations from the side panel into the workflow.
Log in to complete tutorial -
- Step 3
-
Search for the Open Excel Instance activity from the list of tools available in the Automation Information panel.
-
Drag-and-drop the activity in the workflow, where they become a step in the automation.
Each step has its associated properties.
-
Search for the Add Workbook activity and drag-and-drop it below the Open Excel Instance activity.
-
Drag-and-drop a Set Values (Cells) and select the activity to open its properties to make the following changes:
-
Step name : Set Order Number
-
Range Definition:
A1
-
Values:
Order Number
-
-
Similarly, drag-and-drop a Set Values (Cells) activity and make the following changes to its properties:
-
Step name : Set Order Status
-
Range Definition:
B1
-
Values:
Order Status
-
-
Save your work.
After completing the above steps, your automation should look like this.
Log in to complete tutorial -
- Step 4
-
From the Tools panel, expand the Screens node and drag-and-drop the previously captured screen Browse Orders into the workflow.
-
Choose Browse Orders and choose Define Screen Activities to view the activities related to screen.
Drag-and-drop the Set Navigator activity into the Browse Orders screen and click the step to set the following properties:
-
Target : Browse Orders
-
Navigator :
Chrome
Setting the navigator to Chrome will ensure that it opens using the Chrome browser if the application does not open with another navigator.
-
-
To allow the web page to fully load, drag-and-drop the Wait (Screen) activity inside the application. Set the Target as
Browse Orders
.The automations looks like:
Log in to complete tutorial -
- Step 5
-
Choose Browse Orders in the workflow and from the Parameters panel, choose Define Screen Activities.
-
A screen preview is shown. The elements declared appear in a green box.
-
From the list of activities, search for Get Element activity. Drag-and-drop the activity in the screen preview on Order 7991. The box will turn from green to blue.
What’s going on?
Here, you are defining activities on the screen elements. The Order 7991 has been declared earlier as Order Number. The element is a Collection, thus, any activity applied to this element will be automatically applied to other instances of the same element. So, a For loop will be generated automatically in the workflow.
-
Select Get Element activity to edit the following properties.
-
Step Name : Get Order Number
-
Target :
currentMember
-
Output Parameters :
orderNumber
-
-
From the Tools panel, search number. Select the
Number
data type within the Data node. -
Drag-and-drop the Number data type within the For Each loop below the Get Order Number activity.
-
Select and edit the activity Create Number Variable.
-
Choose Open the Expression editor to open the Expression Editor.
-
In the Expression Editor, enter this text below and click Save Expression:
ExpressionCopyStep7.index + 3
-
Rename the Output Parameters as
myExcelRow
. The step will now look like this: -
Drag-and-drop Set Values (Cells) activity in the For loop below Create Number Variable activity.
Edit the properties as shown below. Use the Expression Editor to edit
rangeDefinition
. -
Repeat Steps 4-11 for the element Order Status using the following information:
Step Step Name Input Parameters Output Parameters Get Element Get Order Status
target : currentMember
orderStatus
Create Number Variable Create Number Variable - 2
value: Step11.index + 3
myExcelRow
Set Values (Cells) Set orderStatus
range Definition : "B" + Step13.myExcelRow
values:orderStatus
Log in to complete tutorial -
- Step 6
You will now close the Browse Orders application, saving the worksheet and releasing the Excel instance.
-
Search for Close Screen activity and drag and drop it in the Browse Orders application outside the For loop.
-
Search for Save as Workbook, drag-and-drop into the workflow outside the Browse Orders application.
-
In the activity’s properties, provide an appropriate
filePath
(for example,C:\some Path\myOrdersExcel.xlsx
) to store the Excel file.The resulting Excel is stored in this path:
-
At last, drag-and-drop the Release Excel Instance activity into the workflow.
-
Choose Save.
You have completed building the automation and it should look like this.
Which activity is used to fetch the information from web application Browse Orders?
Log in to complete tutorial -
- Step 7
You will now test the automation. Result of this automation should be the saved Excel file with all the order numbers and their order status.
To test the automation, choose
.Here’s the Excel:
Congratulations! You have successfully completed the tutorial for automating Order Management.
Log in to complete tutorial