Expression Editor

Parent Previous Next

The Expression Editor


Use the Expression Editor to specify an Expression within a Workflow.

As an example you may define a Script Expression if you drag a Script Task onto the Workspace and select the Expression Property.


Expressions can be easy formulas as well as complex program code. To archive these different requirements IYOPRO provides a language selector

to choose the best expression type.


Language

Currently IYOPRO provides the following languages:

F(x) - The expression consists out of a simple formula

Python - The Expression is based on Python Program code


F(x) Formula Expressions



If you choose F(x) formula expressions you may enter a simple formula into the text box.

As an Example enter


   100*5


and press "Compile & Run". IYOPRO will open an output window with the result 500 shown.

If your Formula contains errors, the translation process will fail and an error will be shown:



You may safely ignore the "Line 2" position of the error message. This is because IYOPRO will generate a python script out of your formula which inserts your formula at line 2.


There are many functions and constants available to let you specify more complex formulas. Please refer to the Python Math Documentation to get a detailed description of all available functions.


Python Script Expressions



If you choose Python script expressions you may enter your program code into the text box.

As an Example enter


   print 100*5


and press "Compile & Run". IYOPRO will open an output window with the result 500 shown.

If your Formula contains errors, the translation process will fail and an error will be shown as described in the f(x) section.


Please beware, that Workflow Expression will be executed on the Server where as others may be executed on your local PC.

If you do not specify anything else, the Compile & Run button will execute the python script on your local PC.


Both environments are sandboxed, what means that your scripts run in a controlled environment and cannot damage anything.

But keep in mind, that the server sandbox and the silverlight client sandbox have different security levels.


Where the server sandbox allows access to web services, the client sandbox doesn't. Therefore if you may want to test python scripts

for workflows you should test them also using the "Compile & Run (on server)" method.

You can access this method through the small arrow right to the Compile & Run Button.


Please refer to the Python documentation for more information