nFlow

A Java framework for managing workflows



Microservices Orchestration

Trending REST-based microservice architecture does not provide standardized solutions for composing services into reliable business processes.

nFlow fills this gap by providing a framework for implementing workflows based on ideas like idempotent retry and finite state machine.


Highly Modular

You can cherry-pick the modules that are relevant for your use case.

The minimum pre-requirements for embedding nFlow engine to your application are Spring Framework core and a relational database (PostgreSQL, MySQL, Oracle, H2).


Fault Tolerant

You can deploy nFlow engine to multiple servers that share the same workflow instances.

Workflow instances are recovered by the other nodes, if a server crashes in the middle of workflow processing. Workflow states are retried automatically if an unexpected error occurs.


Order Management

Order management workflows for a big media company are managed by nFlow. For example, the order delivery workflow contains 10+ integrations that are modeled as workflow states. Workflow execution can be monitored through nFlow Explorer and each state is automatically retried until the desired outcome is reached.


Customer Feedback

Each new customer feedback starts a workflow that orchestrates machine learning-based feedback analysis, notification sending and other preprocessing tasks. New customer feedback can submitted regardless of the status of the backend systems.


Distributed Batch Processes

Modeling batch processes (e.g. organizational data synchronization, email-box polling) as workflows enabled their scheduling within a pool of servers instead of single point of failure.

The following fully working example illustrates how a workflow is defined. The definition contains both the workflow structure and the workflow implementation. nFlow Explorer uses the structure for visualizing the workflow. nFlow engine uses the implementation for executing workflow instances.

public class DemoWorkflow extends WorkflowDefinition {

  public static enum State implements WorkflowState {
    begin(start), process(normal),  done(end), error(manual);

    private WorkflowStateType type;

    private State(WorkflowStateType type) {
      this.type = type;
    }

    public WorkflowStateType getType() {
      return type;
    }

    public String getDescription() {
      return name();
    }
  }

  public DemoWorkflow() {
    super("demo", State.begin, State.error);
    permit(State.begin, State.process);
    permit(State.process, State.done);
  }

  public NextAction begin(StateExecution execution) {
    return moveToState(State.process, "To process state");
  }

  public NextAction process(StateExecution execution) {
    return stopInState(State.done, "To done state");
  }
}
                    
					

Post a question to Google groups

Submit an issue to Github

For commercial support, contact Nitor sales