HOW TO RETRIEVE "EXECUTION PROPERTIES"​ THROUGH "GROOVY SCRIPT"​

HOW TO RETRIEVE "EXECUTION PROPERTIES" THROUGH "GROOVY SCRIPT"

Execution properties contain run-time information related to a specific execution of an integration process. You can use execution properties in a process to support built-in testing logic, generate dynamic email notifications, or create custom reports. Properties such as account ID and execution ID can also be useful for logging process activity and for troubleshooting

Execution properties can be retrieved from the parameter value list for the following shapes:

  • Decision shape
  • Exception shape
  • Message shape
  • Notify shape
  • Process Route shape
  • Program Command shape
  • Set Properties shape

You can also retrieve execution properties within custom scripting by using the getRuntimeExecutionProperty () method available within the ExecutionUtil class

What is Groovy Script?

Apache Groovy is an Object-oriented programming language used for Java platform. This dynamic language has many features which are similar to Python, Ruby, Smalltalk, and Pero. It can be used as a scripting language for the Java platform. It is almost like a super version of Java which offers Java's enterprise capabilities. It also offers many productivity features like DSL support, closures, and dynamic typing. Unlike some other languages, it is designed as a companion, not a replacement for Java. Groovy source code gets compiled in Java Bytecode so it can run on any platform if JRE is installed on that operating system. Groovy also performs a lot of tasks behind the scene that makes it more agile and dynamic. Custom scripting allows you to perform custom manipulations and logic within a process to accomplish unique and advanced requirements that fall outside the native functionality of Boomi Integration. Custom scripting is available within a custom scripting step of a Data Process shape or a custom scripting map function.

You can implement custom scripting in one of two ways:

  • Insert an inline script for one-time use.
  • Reference a Scripting component that is available for reuse

Select New Component from the Drop-down list

No alt text provided for this image

Provide the required Component Name and keep the type as process

No alt text provided for this image

Select the start shape connector with type as no data and click on OK

No alt text provided for this image

Select message connector from pallete

No alt text provided for this image

Provide a sample message to perform the required process

No alt text provided for this image

Select Map connector from the pallete

No alt text provided for this image

Import the suitable required profiles to the mapper and map the required fields

No alt text provided for this image

Click on OK

No alt text provided for this image

Select program command connector from pallete

No alt text provided for this image

Type the required SQL Query to perform the operation

No alt text provided for this image

For the variables, add the dynamic process property fields from the mapper output profile

No alt text provided for this image

Select the branch connector from pallete

No alt text provided for this image

Select data process connector from pallete

No alt text provided for this image

Choose process type as “Custom Scripting”

No alt text provided for this image

Under script field click on edit to write the own groovy script

No alt text provided for this image

Write the required groovy script, for execution properties

No alt text provided for this image

Select message connector from the pallete

No alt text provided for this image

Write the required message in the message box by allotting the variable numbers

No alt text provided for this image

Call the DPP with the names given in the groovy script

No alt text provided for this image

Connect the branch connector to the start connector

No alt text provided for this image

Select mail connector from the pallete

No alt text provided for this image

Provide the suitable connections and operations by choosing the action type as Send

No alt text provided for this image

Fill the essential fields for the mail operation

No alt text provided for this image

At last the final process flow is as shown in the below figure

No alt text provided for this image

The mail received may contains the following list of execution properties mentioned above

No alt text provided for this image


To view or add a comment, sign in

Others also viewed

Explore content categories