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 {

  private static final State BEGIN = new State("begin", WorkflowStateType.start);
  private static final State PROCESS = new State("process");
  private static final State DONE = new State("done", WorkflowStateType.end);
  private static final State ERROR = new State("error", WorkflowStateType.manual);

  public DemoWorkflow() {
    super("demo", BEGIN, ERROR);
    permit(BEGIN, PROCESS);
    permit(PROCESS, DONE);
  }

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

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

Post a question to Google groups

Submit an issue to Github

For commercial support, contact Nitor sales