Boosting Business Processes With Automation

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Explain the benefits you gain with automations in processes
  • Create an automation and test it on your own
  • Simplify the Start Form of the business process
  • Release and deploy a new version of your project
  • Verify your settings and register your Desktop Agent
  • Run your business process with a full monitoring of the workflow instances and automation jobs

Automations in Processes

You’ve created the first iteration in building your business process – congratulations! You defined several forms, released, deployed, and ran the process – amazing! Hopefully, you are feeling empowered and eager to learn more. Now, it’s time to simplify your trigger form and add an automation to extract data from an excel file.

In this lesson you will learn why and how you could do this with SAP Process Automation. First, you start with the design and test of the automation to extract data from an excel file that contains the details of the sales order. Then, you will learn how to simplify the Start Form reducing the number of input fields needed for the user to trigger the process. You will also learn how to map the inputs and outputs of the different artifacts according to the changes of the process. Last but not least, you will Learn how to verify setting, register your Desktop Agent and run you’re the process.

What are automations and why use them

Automate repetitive tasks and focus on added value tasks.

When we look at the process we have developed so far, we can quickly see the first improvements that we can make further simplify the experience for the user.

Many tasks assigned to users require repetitive activities that involve interacting with applications by way of clicks, as well as handling data through copy-paste actions.

Let’s imagine the user of your process only has to select the Order Number with Customer Name and – like magic – the process retrieves the remaining details from the data source and displays it in your process without any further effort

How can you do this? By extracting data with an Automation!

Using automation can really speed up your process and reduce potential errors that the user of the process might make when entering the details. When we imagine a full business process, we often think about a broad task that is complicated, complex, and lasts a significant amount of time.

But what about all the tasks that are not so complex or complicated?

Users tend to forget about the simple tasks – ones that are hidden and repetitive – which can cause mistakes.

They are prone to human errors that can often happen with unpredictable activity peaks for so many reasons.

On one hand, you can focus on the tedious process. On the other hand, you could consider working on the short tasks which last a few minutes, but several times.

Well, for example five minutes by 40 times a day, is more than three hours for just one person.

Automating all tedious actions to free up human workers for more high-value tasks. At the end of the day, you've got something, because small steps can make big changes.

Robotic process automation (RPA) as part of SAP Process Automation can take care of these tasks of the process. RPA services are delivered in two ways:

Unattended Mode
The unattended mode, in which the bots are working autonomously with human supervision only – there is no human intervention.
Attended Mode
The attended mode, in which bots will work with humans to assist them, to help them.

Automation as part of SAP Process Automation helps citizen developers to deliver business value by improving operations, and by mobilizing resources for a greater number of high value tasks at lower cost. It increases the service quality by reducing processing times for workflows with financial impact, such as revenue-generating transactions like sales orders management.

To design an automation in the Process Builder, we need to use the automation editor, so let's look at that in detail.

The Automation Editor

The automation editor is composed of four main parts:

The Toolbar

The first part, at the top, is called the toolbar. It’s composed of very simple actions such as undo, redo, delete a step, save your automation, or even test it.

The Workflow

The most important part of this automation editor is called the workflow of the automation at the center of the screen. This workflow shows you the list of the steps inside your automation.

When executed, the automation will be executed, one by one, each step from the top to the bottom.

The Right-Side Panel

To add steps to your automation, you need to use the right-side panel. You can pick automations, activities, data or different controls to add to your workflow.

The Console

At the bottom of the automation editor, you have the console.

In the console you can access the design and test console that allows you to see the different errors, warnings and info of your automation while designing it or while testing it. You have also access to the variables of the automation.

From the right-side panel, you can add multiple things.

First, you can add an automation that has already been built. This automation could come from you, if you already built one, from colleagues, or even from the STORE or an external project to your landscape.

Second, you can also use captures of applications you captured on your computer. So, let's say you have an application, and you want to automate it. You create a capture of it with its screens and elements like buttons, fields, controls and then interact with the different entities inside the main flow of the automation.

Third, you have access also to what we call the activities. These activities come from the SDK packages from SAP. These activities are simple actions that you can do in your automation. It can be from using the file system, using an Excel file, or piloting an application.

We see that in detail in the exercise.

Fourth, you also have access to data types if you want to structure data or reuse variables.

And last, you can use the Controls. With that, you can use condition loops inside your automation. You can even write your own JavaScript code if the activities provided by SAP are not enough.

To Create an Automation to Extract Order Details from the Excel File

To design our automation, we need to ensure we have the functional prerequisites: an excel file filled with the Sales Orders data. At the moment, you have to create such an excel by yourself: use the data from the table below. Ensure, that you use the correct format of the cells in the columns, these are:

Cell Formats

ColumnFormat
Order NumberText
Order AmountNumber
Order DateDate
Shipping CountryText
Expected Delivery DateDate
Order StatusText

Sales Orders Data

Order NumberOrder AmountOrder DateShipping CountryExpected Delivery DateOrder Status
PO7991410418.221/21/2022United States of America1/29/2022In Time
PO7918150935.131/22/2022United Kingdom1/27/2022Urgent
PO7375313977.821/23/2022United Kingdom2/20/2022In Time
PO7311755055.41/24/2022United Kingdom3/30/2022In Time
PO6858429358.41/25/2022United Kingdom2/20/2022In Time
PO636843739.821/26/2022United Kingdom3/25/2022In Time
PO6189483574.121/27/2022Germany2/5/2022In Time
PO3115273993.561/28/2022Germany3/10/2022In Time
PO2686220887.561/29/2022Germany3/5/2022In Time
PO8282436955.641/30/2022United States of America3/30/2022In Time

So now, let’s first create the automation. For that, you open the process in process builder and add a new automation between the Trigger form and the Approval Form!

Steps

  1. Add a New Automation to the process with any given name and description.

    So, when creating an automation inside the process builder, you will be asked to configure the Desktop Agent version you’ve installed in your Windows machine.

    Set the required information and create it.

    Business project usually need to use parameters and variable at runtime. These variables are usually saved in their runtime landscapes, Dev, Test or Production environments for example. In our case, we need to maintain an environment variable that will contain the file full path of the excel file used in the automation.

  2. Set the Environment Variables of the project.

    1. Click Manage the project properties.

    2. Select Environment Variables and click on Create.

    3. Set the properties of your variable, Identifier and Type of the variable and click Create.

    4. Close the project properties.

  3. Design the automation in the Automation Editor by simply dragging-and-dropping activities onto the workflow of the automation. Configure the inputs and outputs of each activity.

    We will need activities to interact with Microsoft Excel application. These activities will open Excel application, open the workbook that contains the sales orders details and map them into a data type that will be created during the design. Last, after extracting and mapping the data, the Excel application will be closed.

    1. Search for excel activities, select Open Excel Instance, drag and drop it into the automation workflow.

    2. Excel Cloud Link.

      1. Browse to the excel file.
      2. Use Environment variable as input: OrdersFilepath.
      3. Map the data into a new Data Type: Sales Order.
      4. Set the output of the activity as orders.
    3. Close the Excel Instance.

    4. Search for Sales Order data Type, create Sales Order variable. Set the output as selected Order and leave the value empty.

    5. Search for For Each activity and Add it, set the looping list to the cloud link output activity: orders.

    6. Before adding a condition to the For Each iteration that compares the OrderNumber as an input of the automation with the OrderNumber of the current record, we need to declare the Automation Inputs and Outputs. Follow the step below under Automation Details.

    7. Search for Condition activity, Add it and Edit Formula.

    8. Select the OrderNumber from the variables, type ‘===’ and select orderNumber under currentMember.

    9. Test and Save Expression.

    10. Search for Set Variable Value activity and add it. Set the variable to: selectedOrderand value to currentMember.

    11. Search for Loop End activity and Add it under the Set Variable Value activity.

    12. Search for Log Message activity and Add it, Set the message to: selectedOrder.

    13. Select the End Automation activity, set the Output Parameter to: selectedOrder and click Save.

    14. Go back to the process, select the automation in the flow to set the required input: Order Number and click Save.

  4. Test the automation.

    1. In the automation editor, click on the test button from the toolbar.

    2. First, fill in the required Input Parameter OrderNumber with a value of a Sales Order from the Excel file used for the exercise. Second, set the Environment Variable OrdersFilepath with the full file path of the Excel file. Click on Test to start the automation.

    3. The result of the test should look similar to the screenshot

  5. Simply Start form

    After the design of the automation that retrieves the data form the excel file, simplify the start form by deleting the not needed fields

    1. Open the Start Form in the Editor.

    2. Delete the following fields from the form: Order Amount, Order Date, Expected Delivery Date and Shipping Country. You can achieve that by selecting the contextual menu of each filed like for Order Amount field below.

    3. Save the Form, close the Form Editor and go back to the Process.

    4. The Different Forms of the process will need Inputs Mapping from the Automation Outputs.

    5. Select the Approval Form and go to the Inputs.

    6. Select the Order Delivery date and choose the expectedDeliveryDate from the Automation outputs.

    7. Select the Order Amount input and choose the Order Amount from the Automation outputs.

    8. Do the same for the Confirmation Notification form.

    9. The last mapping for the Rejection Form.

    10. Save the Process.

  6. Release and Deploy.

    You’ve learned how to Release, Deploy and Run the process in the previous lesson. Let us do a new Release and Deploy with the major changes that we achieved by adding the automation and simplifying the Start from.

    1. Ensure that the process is saved without errors showing in the Design Console and Releasethe project.

    2. Choose the version that contains significant changes which may impact dependent projects.

    3. Deploy the project.

    4. Set the OrdersFilepath environmentvariable with the file full path where you saved the Excel file downloaded as a prerequisite. Click Confirm.

    5. Finalize the Deployment.

    6. Congratulation, your project is deployed and ready for Run.

      Before running the project, we need to ensure that your Desktop Agent is registered in your tenant with Unattended Mode.

  7. Desktop Agent Settings and Registration.

    1. In windows programs, search for the Desktop Agent and start it.

    2. Once the desktop Agent started, click on it and choose the About… icon.

    3. Ensure the Agent is Idle, waiting to start a Project and go back to the main panel.

    4. Open the Project panel and check the Agent Mode.

    5. Verify that your Desktop Agent mode is Background (unattended). If it’s not the case, switch it and confirm to restart your Desktop Agent with this needed mode.

    6. Navigate to the Agents List in the Settings Area and search for your Agent using your windows login or with the hostname of your windows machine. In the agent information we can verify again that the agent is Idle in Unattended mode.

    7. Navigate to the Agent Management and add your Agent. This registration of the Agent will allow the Agent to run Automation Jobs.

    8. Search for your Agent with your Windows Login or your Windows machine hostname and add it.

    9. The Desktop Agent settings and registration are complete now, we can Run the process.

  8. Run the process.

    Now that you have successfully deployed your project and registered your desktop Agent, it’s time to run the process and see the results.

    1. Open the process builder of the deployed version and click Order Processing Form to see the form URL that you can directly open in the web browser.

    2. Fill the Submit the Form with the Customer Name and Order Number values.

    3. The process will execute the Automation on your Desktop Agent and wait for the manual approval of the Form Approval Task.

    4. In your Inbox, Select the Approval Form, complete it and Click on Approve.

    5. A second manual acknowledgment of the successful approval is needed to complete the process.

    6. In the Inbox, Refresh and Submit the form to complete the process.

    7. The process is completed successfully.

Result

Boosting Business Processes With Automation: Lesson Recap

You’ve done it! In this lesson, you’ve learned how to design and test an automation to extract data from an excel file. You successfully integrated the automation in your business process, simplifying the Start Form and mapping the inputs and outputs of your artifacts. You’ve learned how to verify the settings of the Desktop Agent and also register it in your tenant. You’ve released and deployed the project again and run the full process with a full monitoring of the workflow instances and automation jobs.

Save progress to your learning plan by logging in or creating an account