EDUCAÇÃO E TECNOLOGIA

SAP Intelligent RPA – How to execute a package from another automation

“Dear Santa Bot,

As I was a really nice bot builder this year, I would like you to give me some explanation on some topic that has been bothering me lately. I wonder if it is possible to launch a job execution from another package”

– Oh I see. Let me guide you…

In some situations, it might be useful to know how to execute a specific automation (coming from a package that will be called P1 in this blog post article) during the execution of another automation P2.

First, I would like to say : “Yes, it is possible”. Then, I would add: “As always, there are multiple ways to do it, depending on your situation”.

Let’s dive into this !

Execute a Cloud package from another Cloud package

In this use case, let’s assume both of your packages were generated using the Cloud Studio. Again, there are 2 possible ways.

Using a direct dependency

This is the way we recommend as it is the easiest one to implement. To do so, all you need is follow this procedure :

  • Generate Package 1
  • In Cloud Factory, go to the Packages tab
  • Find your package, and share it

You need to share it with anyone using Read access rights, as shown below :

Ok, we are at half-way. Now open your project P2 in Cloud Studio. What you need to do now is to add Package 1 as a dependency :

Once you selected the package in the drop-down list, you need to select the version of it, just like you would do with any other standard modules from our SDK.

And voila ! Now you can execute your automation from Package 1 in your project, as it is available in the list of automations.

Note: another interesting thing about this method, is that you can decide if the execution of Automation 1 is synchronous or if it should be another job that will be executed later on some machine in your environment.

You can find additional information in this documentation.

Using an API trigger

This method is a bit more complex, as you need to create a specific trigger, and then perform a call to a web service so it can be executed. By using this method, you will only be able to add a new job to the queue in the Cloud Factory. So it will be executed later in your environment, and there is no way for you to make it synchronous. Once the job is added to the queue, the agent will continue the execution of the current package.

You can follow our documentation for more details on how to create an API trigger and how to execute it.

Execute a package from Desktop package

In this situation, it is quite simple : all you need to do is execute a call to an API trigger. I will let you see the paragraph above, as the procedure is the exact same.

You only need to call the web service from the Desktop Studio, and for that, there are plenty of documentation (portal, blog post articles, etc.) which are already available.

Conclusion

As you might already have understood, we definitely recommend to add a package as a direct dependency in your project, assuming you’re working with the Cloud Studio. It will help you A LOT to manage the execution (synchronous vs asynchronous) of an external package in your project.

Find more information on SAP Intelligent RPA:

Exchange knowledge: SAP Community | Q&A | Blog

Learn more: Webinars | Help Portal | openSAP

Explore: Product Information | Successful Use Cases

Try SAP Intelligent RPA for Free: Trial Version | Pre-built Bots

Follow us on: LinkedInTwitter and YouTube