Skip to main content

Work with Automation Process project

Work with Automation Process project

Using easyrpa launcher functionality

Launching process from from Control Server

See Automation Process Details for the details on how lunch process from Control Server


Launching process from IDE

When you develop a business process you would like to test it right in your IDE without the need of building a JAR. To make use of easyrpa launcher, dependency injection and other features in the debugging stage import ApModuleRunner. Create main class and use aforementioned runner to execute a process.

import eu.ibagroup.easyrpa.engine.boot.ApModuleRunner;

public static void main(String[] args) {		 
	ApModuleRunner.localLaunch(ExampleProcess.class);
}

There are 2 possible Automation Process run configurations available for development:

  • TestConfigurationModule
  • DevelopmentConfigurationModule

TestConfigurationModule

This is default test configuration provided in easy-rpa-engine test-jar artefact. 

Its main features:

  • task history is stored on file system

  • local configuration, is stored in apm_run.properties
  • local logs only
  • Ho Human tasks support
  • No ML tasks Support
  • No OCR tasks support
  • local vault storage from vault.properties file

  • (warning) Datastore is emulated in memory and does not support SQL query
  • No CS API client
  • No Notifications

DevelopmentConfigurationModule 

This configuration is intended to make AP runs in the same environment that ControlServer provides. Its main features are:

  • task history are stored in CS
  • local configuration, is stored in apm_run.properties
  • logs are stored in CS
  • OCR, ML, HT support
  • Vault is on CS
  • datastore is hosted on Control Server
  • CS API
  • Notifications

In preparation to run we need to link our run target to a ControlServer instance first. 

Download development configuration JSON file, put it into run working directory. Note that users can only download the Development configuration if they are members of the Group with Development-ACTION permission.


Rename file to cs.json and put it into module working directory:


Finally add DevelopmentConfigurationModule  to the localLaunch:

ApModuleRunner.localLaunch(ExampleProcess.class, new DevelopmentConfigurationModule(args));

Launching your process

Don't forget to add apm_run.properties file to your working directory!

After launching your process for the first time, run configuration will be created. You can configure it by going to Run→Edit Configurations. You can change your working directory there.

Unable to render {include} The included page could not be found.

If everything is correct you should be getting "Hello World" message printed out in console window.

The object_store folder will created under you project structure after first run.  UUID subfolder in the object_store contains the history of the ExampleProcess run, where "UUID" is process id, specified in the runner.launch() method. EasyRPA will check if this "UUID" folder is exist before run and will skip process run if folder is found. You should delete this folder to run ExampleProcess process again. 

You can change the id string "UUID" to the random generated value by UUID.randomUUID().toString() to avoid skipping of class HelloStep.

Using easyrpa ApModuleRunner functionality

Launching process from Standalone Executable Jar

Once uber jar with AP(s) generated it can be run with the command line like below.

java -jar sample-1.0-SNAPSHOT-standalone.jar

If not provided in launch dir, jar's apm_run.properties and vault.properties will be used.

By default first found jar's AP module will be launched.

Following additional command line parameters accepted:

  •  "-u", "-uuid" : Run uuid
  •  "-m", "-module" : Module Class to launch
  •   "-i", "-input" : JSON file with Task input map of key-value
  •  "-c", "-config" : List of configuration classes

Please see  Invoice Plane Automation Demo for an example.

Limitations:

  • local logs only
  • Ho Human tasks support
  • No ML tasks Support
  • No OCR tasks support
  • local vault storage from property file
  • No notifications support
  • No real S3 Object Storage Service - only local file emulation
  • No real DataStorage - only simplest in-memory emulation 

Change Task run JVM options

In JDK 17 you often need to change security rights. For example allows introspection API to call private method, the error like the following:

Caused by: com.cedarsoftware.util.io.JsonIoException: Class listed in @type [java.time.LocalDate] is not found
	at com.cedarsoftware.util.io.ObjectResolver.readIfMatching(ObjectResolver.java:663)
	at com.cedarsoftware.util.io.ObjectResolver.assignField(ObjectResolver.java:176)
	... 28 common frames omitted
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private java.time.LocalDate(int,int,int) accessible: module java.base does not "opens java.time" to unnamed module @78a2da20

Requires the following JVM parameter:

--add-opens java.base/java.time=ALL-UNNAMED

You should specify it in the AP JAVA_OPTS parameter:



dsd