17

Pre-warning: There are some other questions similar to this but don't quite answer the question (these include: Alternatives to Windows Workflow Foundation?, 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.

3
  • 1
    In what way did the other questions not answer yours? Jul 5, 2009 at 16:45
  • duplicate stackoverflow.com/questions/932924/…
    – Sadegh
    Jul 5, 2009 at 16:46
  • I am not tying my question to Windows Workflow or .Net, and that is why I don't think they didn't answer my question. And it is not a duplicate of the other questions. I need to find a set of Statemachine/Workflow services that are out there regardless of platform that are "open".
    – Kinlan
    Jul 5, 2009 at 22:02

9 Answers 9

23

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.

2
  • 2
    I am amazed how tight the code and how much it does. It really stands in stark contrast to Workflow Foundation. Jul 10, 2009 at 21:25
  • 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
    Jul 12, 2009 at 7:16
9
+100

"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 :-)

3
  • @Kinlan - I am curious about your prototype with Stateless. What shortcomings did it have? Jul 12, 2009 at 11:49
  • @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
    Jul 12, 2009 at 17:01
  • @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
    Jul 12, 2009 at 17:02
8

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.

1
  • @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. Jul 10, 2009 at 21:33
5

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.

1
  • 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
    Jul 12, 2009 at 7:17
4

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.

3

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

2

JBoss JBPM

0

Consider Workflow Engine, a lightweight all-in-one component that enables you to add custom executable workflows of any complexity to any .NET or Java software, be it your own creation or a third-party solution, with minimal changes to existing code. It supports custom actions and commands, has timers and supports parallel workflows. And there's a free version.

0

You can take a look at Imixs-Workflow, which is an event driven approach of a state machine based on bpmn 2.0. It specially focuses on human-centric long running tasks.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.