Working with Scripts

Parent Previous Next

Aside from the Script task, many shapes allow you to assign Python code snippets to adjust process instance variables as desired.

If you have a lot of code and that in many shapes, this can quickly become confusing / difficult to maintain, the larger the process models become.

Then it will be more useful to centralize the code in one script and provide the code snippets as functions within the script.

In order to be able to do this, there is the Script as a separate file and the language extension "ImportModule" to bind the Script in the shape.



First add a Script to your BPI-Project:



Type in a name for the script. This sample uses "MyScript".


Edit the script and create your functions as desired:



To bind the script to the shape open the expression editor of the shape and type: