cancel
Showing results for 
Search instead for 
Did you mean: 

Customizable State machine implementation

vgaur
Confirmed Champ
Confirmed Champ
Hi,
I am trying to build a finite state transition machine. User can create the transition from one state to another based on named action and can also apply conditions and rules.

System user can use a custom screen to create these definitions. I want to convert their definition into activiti process definition dynamically.
and then the process flow will follow those definitions.

The state could be human task or simple service task (an intermidiate step which will advance on condition or externa signal).

Is Activiti a good choice in this case ? If yes can someone help me how can I generate dynamic process definition.
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
It might be, but it also might be too complex for your use case. Ie. do you need persistence? Are those two states the only two possible ones? Whay do you mean with dynamic process definition.

vgaur
Confirmed Champ
Confirmed Champ
Thanks Joram for your comment. Yes I need to store the state information and also the data flowing along with the workflow.
The states can be added by users after that they can alter the workflow definition to include that step.

An example could be :

State New (with List<T>) -> to - > State Assign -> on Action ( Assigned) - > condition (if assignable) - > rule ( Assign one from the list)
The assigned state can be looped for the initial list of data  and at later stage we need to merge the list back into one.

From Assign -> To - > Verify - > on Edited -> rule (Merge list).

User can change the definition at any time that's why I call it dynamic. I assume version is the only option in this case.

I am not sure how can I convert this into activit BPD.

vgaur
Confirmed Champ
Confirmed Champ
I am evaluation pure state transition frameworks but they seem to lack the persistence and they have immature data flow support. If I go by activiti I see complexity will grow multi fold as we keep on adding functionalities on top of this.
Any thoughts ?

jbarrez
Star Contributor
Star Contributor
Well, what you are going through is typical for what we see at many customers: they start out with something home-grown, very simple just a few states. But over time it grows and grows … and then it becomes an unmaintainable mess which is almost a process engine but never of the same quality as Activiti.

So you can probably guess my opinion (bit it's a biased one) … If you need persistence, i would go Activiti