Question

We are developing an application that involves a lot of different tests where each test lead the users to a number of steps. We are thinking of using a state machine framework to capture the states/transitions out of the code. We are also thinking of using rule engine to supplement on the rules. Anyone has experience with any state machine framework that would work with JBoss and/or Java? Thanks in advance.

-nguyen

Was it helpful?

Solution

jbpm does this and integrates well with jboss. In my experience, it's pretty easy to use and is powerful.

OTHER TIPS

You might want to look at StatefulJ. It is built off of Spring Data for Persistence support and the State Model itself is defined using Annotations. This approach makes it easier to set up and maintain vs. XML. Regarding rules - I've used Drools in the past and seems very well supported.

Disclaimer: I am the author of StatefulJ

if you are building some screen to screen transition - based system, then you should definately check out Spring WebFlow http://springframework.org/webflow

I have had very good experiences with using ragel to build easily maintainable state machines. The resulting java code is of very high quality. However, it is purely a state machine generator with no specific usage intended, so you might find other solutions that will more seamlessly work in a web related problem domain.

Maybe you can take a look at JBoss PVM. It is still in alpha, but can be used to model any type of state machine. We are also looking into it for gui transitions.

http://www.jboss.org/jbossjbpm/pvm

Try Activiti, seems a lot of people are using it. http://activiti.org

For the rules engine part you could use Drools, of course.

Have a look at StateBuilderJava, a state machine code generator that transforms an XML description of a state machine into an extended version of the Java state pattern. It supports all UML semantics: state machine can be hierarchical, concurrent and asynchronous.

Each test scenario can be modelled with a state machine Xml description, the code generator writes the state pattern of your behalf, which is tedious and error prone if done by hand.

The other advantage is to visualize and edit the test scenario with a graphical tool. This allows to quickly implement and document a set of test scenarios. In the examples, a test suite of an XMPP client has be written to illustrate how state machine code generators can be used to write complex test scenarios easily and quickly.

Disclaimer: I'm the author of these software.

I've used activiti. It is the best framework. It is a light-weight workflow and Business Process Management (BPM) Platform. Open Source and works on any Java Platform or cloud. All one needs to have is the knowledge of BPMN , Maven , Spring and Activiti.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top