views:

813

answers:

7

Pre-warning: There are some other questions similar to this but don't quite answer the question (these include: http://stackoverflow.com/questions/19314/alternatives-to-windows-workflow-foundation, http://stackoverflow.com/questions/932924/can-anyone-recommend-a-net-open-source-alternative-to-windows-workflow)

We are developing a system that is an event based state machine, currently we are investigating windows workflow, our system needs to be low latency in its response to events from a multitude of sources (xmpp, http, sms, phone call, email etc etc) coming into the system, scalable and resilient and most importantly customisable. For a variety of reasons (and due diligence) I am looking for open workflow engines that support functions similar to Windows Workflow Foundation (and more - if possible), mainly (but it doesn't matter too much if there are engines that don't support some features):

  1. Persistence of long running tasks, and resumption of tasks on external events
  2. High performance, low latency
  3. Ability to develop custom actions
  4. The ability to specify workflows dynamically
  5. Tracking and tracing

I am not constrained to platform or language, and I would love some help and tips from you guys so that I can start to investigate the engines more closely and any experiences you had with the engines.

Paul.

+4  A: 

You might consider implementing your flow as an actual state machine. Tools like State Machine Compiler and Ragel can help with this. State machines, in many circumstances, are just what you need to implement insanely complex behavior that is testable, and rock-solid. I don't claim to be a Windows work flow expert, but from what I have seen, I question its superiority over coding your own state machine, either by hand or using a tool.

Todd Stout
thats pretty cool.
Kinlan
Incredibly cool. I've always used any excuse to go to a state machine. Never thought of looking for a generator.
Nosredna
For sure the persistence of Widows Workflow I am very keen on - I just to know similar solutions that people can recommend too.
Kinlan
@Todd - I echo your view regarding WWF. Getting data in and out of the workflow is hugely complex, requiring multiple projects to support interfaces and data exchange. I gave it up for using simple state machine where I am in complete control.
David Robbins
+3  A: 

"Java side":

Apache ODE (Orchestration Director Engine) executes business processes written following the WS-BPEL standard. It talks to web services, sending and receiving messages, handling data manipulation and error recovery as described by your process definition. It supports both long and short living process executions to orchestrate all the services that are part of your application.

http://ode.apache.org/

OSWorkflow can be considered a "low level" workflow implementation. Situations like "loops" and "conditions" that might be represented by a graphical icon in other workflow systems must be "coded" in OSWorkflow.

http://www.opensymphony.com/osworkflow/

Shark is an extendable workflow engine framework including a standard implementation completely based on WfMC specifications using XPDL (without any proprietary extensions !) as its native workflow process definition format and the WfMC "ToolAgents" API for serverside execution of system activitie

http://www.enhydra.org/workflow/shark/index.html

Python side: http://bika.sourceforge.net/ http://www.vivtek.com/wftk/ I this will help you :-)

expEng
thanks, very interesting. wftk looks promising. Thanks for the descriptions of the services too.
Kinlan
I am going to mark this as the answer because it provided me with a good list of alternatives that I could investigate. Thanks
Kinlan
@Kinlan - I am curious about your prototype with Stateless. What shortcomings did it have?
David Robbins
@David - if you want control (which I do) and speed then Stateless seems like an ideal solution - there is not much too it, it does almost everything from a theory point of view that you learn about state machines, as long as you are comfortable with writing your own persistence and creation logic it seems like a very strong solution. I suppose they might be it short comings for some people... I haven't found anything else yet really to say "man... I wish it did xyz", and I can at least code it to do it if I really need a feature.
Kinlan
@David, the one thing I did find was that the OnEnter event didn't fire for the start state, but I can't tell if that is correct or wrong :)
Kinlan
+1  A: 

Try Drools for JAVA, I personally have never tried it but I know several commercial applications are based on drools.

http://www.jboss.org/drools/

You could also upgrade to .NET 4.0 there are major improvements in the Workflow in the new framework. I know if I was writing a new workflow application I would jump to 4.0.

Good Luck

Khalid Abuhakmeh
A: 

JBoss JBPM

gbegley
+7  A: 

I invite you to examine Stateless further, as suggested in the answer to my SO question can-anyone-recommend-a-net-open-source-alternative-to-windows-workflow. to achieve the goal of a long running state machine is very simple in that you can store the current state of your state in a database and re-sync the state machine when needed. Consider the following code from the stateless site:

Stateless has been designed with encapsulation within an ORM-ed domain model in mind. Some ORMs place requirements upon where mapped data may be stored. To this end, the StateMachine constructor can accept function arguments that will be used to read and write the state values:

var stateMachine = new StateMachine<State, Trigger>(
    () => myState.Value,
    s => myState.Value = s);

With very little effort you can persist your state, then retrieve that state easily later on.


In respect updating the workflow dynamically, if you configure a state machine such as

var stateMachine = new StateMachine<string, int>();

and maintain a separate file of states and triggers in XML, you can perform a configuration at runtime by looping through the string int value pairs.

David Robbins
I have a prototype running stateless now :)
Kinlan
I am amazed how tight the code and how much it does. It really stands in stark contrast to Workflow Foundation.
David Robbins
I am actually using Stateless right now because of its simplicity - although I didn't mark it as the answer (another question provided a good list of alternatives), I would encourage everyone to also mark this up to give David some more rep Thanks.
Kinlan
Thanks Kinlan. Really Nicholas Blumhardt deserves the accolades, as he created Stateless.
David Robbins
+3  A: 

You might want to check out Simple State Machine.

If you feel like you want to have more control over things and want to roll your own it might be helpful to check out the Saga support that projects like NServiceBus and MassTransit use. Sagas look to be very similar to WF workflows but are POCO objects and I believe both projects just use NHibernate for Saga persistence.

Jeremy Wiebe
Excellent, thank you I will look into both
Kinlan
I was also looking into Rhino Queueues (not for the statemachine - but for queuing data in and out of the machine) can't see to get it working though.
Kinlan
+2  A: 

I'm going to recommend you take a few hours to look at the book Open-Source ESBs in Action. "Orchestration" and "Choreography" are the key buzzwords to look at when dealing with "enterprise service busses." The systems for .NET are quite expensive (BizTalk is in the price range of a decent car, the price of Tibco is in the price range of a decent house).

Other links:

Open ESB project

Comparison of OpenESB and ServiceMix (both of which are the subject of the "In Action" book above.

Tangurena