OpenWFEru developer documentation

getting into OpenWFEru

A good starting point is studying the quotereporter.rb example.

There are other examples worth looking at.

Among them is a “flow tracing” example. You can run it from your OpenWFEru tree with

    ruby -I lib examples/flowtracing.rb

It will output to the std a trace for each participant reached.

The next step would be to browse the unit tests, especially those that are prefixed with “ft_”. They show all the aspects of the process engine.

If you get lost in the terminology, you can consult the glossary

running the unit tests

Note : OpenWFEru is developed and tested on MacOSX (ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.3], this environment was built following the fine instructions from Dan Benjamin at Hivelogic)

Following the Rake tradition, you can run the unit tests from your openwfe-ruby tree with


    rake test

At each rake test run, a brand new engine.log is produced and contains the complete debug log of the test run. It’s your best friend while testing and debugging.

As OpenWFEru is a workflow / BPM engine, the persistence aspect is very important (the average business process lasts long, it has to survive a restart).

To run all the tests in rake_qtest.rb in persisted mode, do


    rake ptest

Note that this test persistence mode uses no cache, it’s not meant for production but for testing, it is meant to display immediately any error in the persistence rythm of the expressions being tested. By running ‘ptest’, every ‘ft_’ test is run in this raw persistence mode.

You can run tests one at a time with


    rake test TEST=test/ft_2_concurrence.rb

You can run that same test in persistence mode (provided it extends FlowTestBase) with


    rake ptest TEST=test/ft_2_concurrence.rb

just changing ‘test’ to ‘ptest’.

There is also the set of tests for the “CachedFilePersistenceEngine”, an engine almost as fast as the in-memory one but with the persistence turned on.

You can test it with


    rake ctest

engine template

There is now a template showing how to configure an OpenWFEru engine. It’s extensively commented.

One should be able to copy this template and modify it to get a complete OpenWFEru engine setting.

(to be continued)