<img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=380018&amp;fmt=gif">
Technical consultation and sales

Contact Us

    _Success_icon About Us
    _Collaboration_icon Join Us
    Technical consultation and sales

    Contact Us

      3 min read

      Building automations with the step library

      Build automations in Avantra with the step library.

      With the release of Avantra 21.11.4, we’ve introduced a new step library feature to allow our Avantra Professional Edition customers to build complex and reusable automations faster. I think the best way to describe the benefits of a step is to create a simple implementation to guide you through the process.

      The step library allows users to create individual steps outside of a workflow that behave just as the standard, pre delivered steps do when creating a workflow. Customers can create new steps that can be used across different workflows to allow separation of logic from the specific systems and values that these steps should work on.

      The first step

      The step library can be found in a new tab within the automation menu item in the configuration menu. Here you’ll see a list of steps that have already been created, or if this is your first time here, you might see a blank list. But it’s easy to get started. Clicking the new button in the toolbar, you are asked to name the step, enter a namespace and optionally set a customer. These can all be changed later too.

      We have some restrictions around names and namespaces. Names can be alphanumeric with dashes and underscores but nothing else. In a namespace, we have the same restrictions but you can also use a dot/period/full stop to create sub namespaces like `automationidea.subpart` that will allow you to group steps and workflows together.

      We also restrict the use of any namespace beginning with `Avantra` which is reserved for future use in the product.

      Adding parameters

      Once these fields are filled, a new step is created and we can explore more in depth what’s available. In the parameters tab, you can define the values that you want your workflow to supply to this step and the values that you create in the step and send back to the workflow. Think of these as your function parameters and return values of your script. There are some restrictions in naming these parameters too. They should be alphanumeric (preferably not starting with a number) and can contain dashes and underscores. These parameter names are used in the JavaScript code so naming is important.

      Building logic and testing

      The left hand side of the screen offers an editor to write JavaScript coding using our built in APIs. For an even more immersive experience, pop out the details panel into a new tab. You can find more information about the APIs available in our new API documentation.

      Following the example in our API documentation, we will create a simple step that has two parameters, `sapClient` and `userName` (both mandatory input strings) and enter the example code from here to create a simple step that unlocks a given user.

      New call-to-action
      From the test tab, we can supply values to the parameters and select a system to run this step on. For the example code, we need to select an SAP system to get access to the RFC API. We can then simply execute this step to test its functionality with the results displayed below.

      Using a step in a workflow

      After developing a step in the library it can easily be used in a workflow. When adding a new step to a workflow the step library steps just appear in the list to be searched for and selected, just like any of our built in steps.

      When added to a workflow, the step should be configured. In our example, Avantra will display two additional fields for the parameters we created above. At this point, the workflow designer could choose to set these directly or set them to be the output of a previous step or set from the workflow inputs themselves. It really gives you this flexibility to define how it works based on your business needs.

      Get started building automations

      We’re quite excited about the possibilities our new automation step library brings to Avantra and can’t wait to see what our customers will build with this new feature. We are delighted when our customers tell us about their experiences. Let us know what you are looking for in Avantra by emailing us at support@avantra.com or speak to your customer success manager.

      Learn more about Avantra 21.11.4.