Features
LightJ embedded workflow engine is a lightweight framework implemented in pure java with no more than 30 core classes, support the following features
- Persistent or transient state by choice (currently support mysql, oracle, and hsqldb)
- Persistent or transient execution context by choice
- Crash recovery
- Cluster safe (cluster implementation based on shoal/grizzly GMS)
- Built-in synchronous, asynchronous, split/merge, loop, schedule execution pattern support
- Built-in error handling, no error will “fall through the crack”
- Built-in logging and flow event handling
- Many built-in flow fine tune features by annotations.
- Nested flows or flow join support
- Standard flow control interface, start, stop, pause, resume, kill
- Flow validation at initialization, straightforward initialization and registration
- Spring compatible, flow can be initialized by spring DI
- Workflow logic and transition completely built by java, easy to learn, easy to use, easy to support
- Minimal external dependencies, no complicated XML workflow definition in XML
Key design
- Workflow implementation by extending FlowSession base class
- FlowDefinition annotation for flow information, and concurrent execution grouping
- FlowStep enum provide state definition of the flow
- Each enum value in FlowStep enum maps to a method in flow implementation using the same name, the method is responsible of building the execution logic for the step
- StepExecution contains execution logic for a flow step, there are 2 main flavors
- StepTransition is returned by a FlowStepExecution and provide information of state transition.
- FlowContext contains context information that can be persisted and accessed each step of the way
- FlowDrive drives the flow from start to end or to as far as it can be run.
- FlowProperty for flow specific properties eg. cluster, recovery, concurrency etc.
- FlowStepProperty annotation for step properties eg. weight
- FlowEvent enum defines flowevent generated by the framework at runtime
- FlowEventListener interface to handle flow event
To Learn More
For more details, check out LightJ source code package org.lightj.session.*, examples in lightj-examples.zip at download section