Code
Native C# code
For the code monkeys among us, there is native C# code. All Metastorm code is now generated C# code, or Metastorm functions called from this code. You can also create as much of your own C# code as you wish, and import any DLL files you may wish to use, of course.
graphic
You have a full C# editor here
graphic
And many useful editing tools, including the all-important Script Validation.
Intellisense
You also have Intellisense, as you would expect.
graphic
graphic
What may not be expected, however, is the same facility in all areas where you can edit Metastorm code.
graphic
In the Expression Builder you can use Intellisense at any time by pressing Ctrl-Space.
graphic
Or it is automatically invoked at appropriate points.
graphic
It is even available in the properties box fields where appropriate, making editing very swift indeed.
Easier code reuse
One of the hindrances to code reuse has been the awkward scripting calls that are required in version 7 and before. This is now a thing of the past.
graphic
all C# scripts can be promoted to the Expression Builder and Visual Scripts Toolbox.
graphic
graphic
You can even add descriptive names for functions and parameters, as well as helpful hints for the Expression Builder.
graphic
And in the Visual Script Toolbox
graphic
Visual Scripts can also be promoted to the Visual Scripts Toolbox.
graphic
And then used in any Visual Script.
Visual scripting
Visual Scripts are a very nice way to write Metastorm code. Effectively they generate C# code by building the statements from Drag and Drop components.
graphicgraphic
Here you can see the available components.
graphic
And these are a set of components built into a script. You can see that certain components allow the nesting of others.
graphic
You can even collapse containers of other activities to keep clutter to a minimum.
graphic
And you can zoom in and out just like the Process Maps.
graphic
When descriptive comments are added to the activities, the code is very nicely documented.
Conditionals & Looping
As shown above, we now have looping within Metastorm code. This used to have to be handled by writing a script, or by means of conditional loopback actions.
graphic
Looping if a basic do while loop.
graphic
For each allows you to perform activities on a property of any Business Object. Although a list is accepted, it does not work with lists as far as we can tell, however.
graphic
Conditional execution is an If – else if ... else format.
graphic
Any Activity or container of Activities may be disabled by un- checking the ‘enabled’ checkbox. This is a neat way to disable code during development.
Go to:
Data (next topic)