Hi,

I've been trying to use the beanflow component to build a workflow, but I seem not to be able to get it right. My goal is to use the beanflow component to register a state (and then persist it into a database) and to allow to do transitions between states (based on permissions granted to the user, but this is another matter). So, so far I do not need my workflow to change steps by itself since each change of state should be triggered by an external event.

I took a look at the Javadoc, the source code and the examples, but I did not understand where to put the business code. According to the doc, I guess I'm supposed to write my own workflow, which subclasses the class Workflow<T>, parametrizing it with an enum which holds the different states my workflow can be in. Then the transitions between the different states would be managed by additional methods I would write myself.
Though:
- if my enum is <startStep, middleStep, endStep>, what use is there for the methods startStep(), middleStep() and endStep()? Are they automatically called by the introspector when the state of the workflow changes? - what is the difference between "return Step.myNextStep" and "setNextStep(myNextStep)" ? - could anyone provide me with a basic example which actually does something like what I'm looking for, or even a hint to the solution?

Thanks in advance,
Florent Robineau

Reply via email to