Archive for the ‘openwfe’ Category
I’ve started to produce a “template” at engine_template.rb, it’s a piece of Ruby code, but you can think of it as a configuration file.
It shows how to configure an OpenWFEru workflow engine, it should gather all the variants and options in a single place. I’ll make sure to keep it complete and well commented.
The full “press release” is available from Rubyforge.org.
You can get OpenWFEru via “gem install openwferu” or by direct download.
Thanks to Patrice Cappelaere for the ‘parameter’ feature suggestion and the excellent feedback he gave.
I’m working hard on the journaling feature for the next release, I’m also trying to improve the documentation on each of the expressions available in the OpenWFE[ru] process definition language.
Each time the OpenWFE engine interprets a process definition and launches a process instance (workflow instance), it attributes a brand new and unique (locally) workflow instance id (to make it unique in space, other info are included beyond this workflow instance id, such as the engine id and the process definition name and revision).
Up until now, OpenWFE and OpenWFEru were both relying on a simple clock based mechanism for generating integer ids, vulnerable to ‘clock back’ issues.
In the past, I’ve had to deal with broken processes where we had to roam through a large number of processes all designated by their integer (long) workflow instance id. As I wanted to make it easier to grasp instance ids, I implemented Kotoba.
The KotobaWfidGenerator which uses the Kotoba library is now the default OpenWFEru wfid generator. It produces ids like 20070322-bobupogigu, 20070322-bodahegowa or 20070322-bodatewari.
If you don’t like it, you can override this ‘default’, the old integer wfid style is still available and I have added a UUID based wfid generator for the purists.
require 'openwfe/engine/file_persisted_engine' class MyEngine < OpenWFE::FilePersistedEngine def build_wfid_generator init_service(S_WFID_GENERATOR, UuidWfidGenerator) end end engine = MyEngine.new ...
This current UuidWfidGenerator uses any underlying “uuidgen” unix command and tries to enforce time-based UUIDs and not random-based ones. I’ll certainly soon add a workflow instance id generator based on a pure Ruby generator. My favourite for now is the one found within the reliable messaging project.
This new generator system will be available in the 0.9.7 OpenWFEru release. The generators in this system have been tightened against “back clock” issues.
I just released OpenWFEru 0.9.6.
The main addition is a bunch of Participants and Listeners. Participants ‘participate’ to business processes and listeners ‘listen’ to workitems as they come back from participants (some of those workitems may be LaunchItems, requesting the launch of a new Process instance).
OpenWFEru 0.9.6 features FileParticipant (+FileListener), SocketParticipant (+SocketListener) and SqsParticipant (+SqsListener). SQS stands for “Amazon Simple Queue Service”. In my next blog post, I’ll detail what stands behind this.
I’ve written a new quickstart for OpenWFEru.
In one file, it shows a minimum of OpenWFEru : enumerating the participants in an organization (by registering them in the workflow engine), establishing a process definition and launching it (via a LaunchItem).
The participants demonstrated are simple block participants, very easily understandable by Ruby developers.
The process is just launched once, that doesn’t do much justice to the process execution engine which is meant to track more than one of those.
Persistency is not demonstrated within this quickstart example. If you need a further example using a persistent engine and persistent participants, have a look at Mano’s tracker.
I’ll soon expand that quickstart page with details about what is going in this openwferu.rb source file.
Feedback is welcome on the users mailing list.
Until now, you had to do
class IssueTracking2 < OpenWFE::ProcessDefinition def make process_definition :name => "IssueTracking", :revision => "2" do cursor do participant :qa_team participant :dev_team participant :customer_team end end end end engine.launch(IssueTracking2) #...
With the upcoming OpenWFEru 0.9.6, you’ll simply do
class IssueTracking2 < OpenWFE::ProcessDefinition def make cursor do participant :qa_team participant :dev_team participant :customer_team end end end engine.launch(IssueTracking2) #...