Imixs-Microservice

A Workflow Architecture for Business Applications.

Robust

Extend your business application with a scalable, transactional and robust workflow engine based on a simple deployable microservice architecture.

Simple

You can run this service independent from your application and control the state of your business objects based on a simple REST API with JSON or XML.

Clean

Design your business process without changing a single line of code. Separate your business logic into a workflow model and keep your code clean.

Why Imixs-Microservice?


When you are developing a business application you typical need also to track the state of your business objects. In an easy case you will try to flag your objects with a custom state. But this does not take into account the complexity which can be achieved by your business application. With a workflow engine you can not only define different states of a business object, but also route information to several actors, send notifications by E-Mail and log the life-cycle of your business process.

The Imixs-Microservice project provides a Workflow-Engine encapsulated into a microservice architecture. This service can be bound to any business application, independent from the technology behind. This allows you to change the business logic without changing a single line of your code. You can control the state of your business process based on a workflow model. Imixs-Microservice sends notifications, logs business transactions and secures your business data.



Imixs-Microservice runs with Docker!

Back to top

How Imixs-Microservice works


Imixs-Microsvervice is a service architecture based on the Imixs-Workflow-Project. Imixs Workflow provides a full featured Workflow Management System (WFMS) based on the Java EE specification. It fulfills all requirements of a scalable, transactional, robust and simple deployable BPM Engine.

Imixs-Microservice encapsulate the Imixs-Workflow Engine into a REST Service which can be deployed independent from your business application. You can access the service through a REST Service API with JSON or XML Objects. You can start a new process instance based on a workflow model or request the state of an already started process instance. Imixs-Workflow controls the flow of your business process based on a workflow model. You can define the state and routing information, the access level and the lifecycle for each business object. Imixs-Microservice enables you to build enterprise applications faster than ever before.

How to access Imixs-Microservice

Imixs-Microservice provides an easy to use REST API. Once deployed you can define a new Workflow Model using the Eclipse based Imixs-Workflow Modeller. You can either start a new business process by posting a JSON or XML based process instance, your you can get the current status in various ways.

POST = http://localhost/workflow/rest-service/workflow/workitem.json
 {"item":[
     {"name":"type","value":{"@type":"xs:string","$":"workitem"}},
     {"name":"$modelversion","value":{"@type":"xs:string","$":"1.0.0"}},
     {"name":"$processid","value":{"@type":"xs:int","$":"10"}}, 
     {"name":"$activityid","value":{"@type":"xs:int","$":"10"}}, 
     {"name":"_subject","value":{"@type":"xs:string","$":"Some usefull data.."}}
   ]} 
   .... 
GET = http://localhost/workflow/rest-service/workflow/worklist.json

To find more information about the Imixs-Rest Service API follow the project on imixs.org.

Docker

Imixs-Microservice provides a docker image. This makes is easy to run Imixs-Microservice in a Docker container. To build the docker file follow these steps:

To find more information about how to use Imixs-Microservice and Docker in the project page on github.

Back to top

What is Imixs-Microservice?


Imixs-Microservice is based on the Java Enterprise Edition and provides a REST Service API which can be used from any platform (Java, .Net, PHP, ...). You can deploy Imixs-Microservice on a JEE6 Web Server like GlassFish or JBoss/Wildfly. Once deployed you can define your workflow Model within the Eclipse based Imixs-Workflow-Modelling Tool. The Workflow Model defines the behaviour of your business process and the states of your business objects.

Defining a Business Model

Workflow modelling means describing a business process independent form a application specific implementation. A workflow model describes the state a business object can take and how actors can interact within various situations. Beside the general flow of a business process there are a lot of technical aspects which are typical to a workflow management system. For example: Tasks are distributed automatically by email and users can access there tasks from a personal task list - like from an email in-box. The workflow engine takes care about routing, transactions, the resubmission and the documentation of each step. All these things are described in a technical workflow model.

The Imixs-Workflow-Modeller

The Imixs-Workflow-Modeller allows you to control your business process without changing one line of application code. You can describe what should happen in a specific workflow step and you can configure the behaviour of your workflow application. For example you can configure an email notification which will be sent by the workflow system after the process is completed. Also you can create a process documentation for each process step. This is called a 'workflow history'. Additional the Imixs Modeller allows you to configure the access control for each process instance processed by the workflow system. This is a powerful feature to manage the information flow inside your application.
Learn more about how to create a workflow model with the Imixs-Workflow-Modeller.

The REST API

Imixs-Microservice provides a WebService Interface which is used to interact with the Imixs-Workflow-Engine. You can submit and request process instances of your business objects based on a JSON or XML structure.

To create a new process instance you can POST a JSON Object to the Imixs-Microservice in the following way

POST = http://localhost/workflow/rest-service/workflow/workitem.json

To create a valid workitem the following attributes are mandatory:

See the following Example:

 {"item":[
     {"name":"type","value":{"@type":"xs:string","$":"workitem"}},
     {"name":"$modelversion","value":{"@type":"xs:string","$":"1.0.0"}},
     {"name":"$processid","value":{"@type":"xs:int","$":"10"}}, 
     {"name":"$activityid","value":{"@type":"xs:int","$":"10"}}, 
     {"name":"_subject","value":{"@type":"xs:string","$":"Some usefull data.."}}
   ]}  

Once you created a new process instance based on a predefined model you got a set of data back form the workflow engine describing the state of your new business object which is now controlled by the workflow engine. This is called the workitem:

{"item":[
   {"name":"$uniqueid","value":{"@type":"xs:string","$":"141cb98aecc-18544f1b"}},
   {"name":"$modelversion","value":{"@type":"xs:string","$":"my-model-definition-0.0.2"}},
   {"name":"$processid","value":{"@type":"xs:int","$":"2000"}},
   {"name":"namcreator","value":{"@type":"xs:string","$":"admin"}}, 
   {"name":"namcurrenteditor","value":{"@type":"xs:string","$":"admin"}}, 
   {"name":"namowner","value":{"@type":"xs:string","$":"admin"}}, 
   {"name":"$isauthor","value":{"@type":"xs:boolean","$":"true"}},
   {"name":"_subject","value":{"@type":"xs:string","$":"JUnit Test-6476"}}, 
   {"name":"txtworkflowstatus","value":{"@type":"xs:string","$":"Vorlauf"}}, 
   {"name":"txtworkflowresultmessage","value":{"@type":"xs:string","$":""}}
  ]}

The workitem includes the attribute '$uniqueid' wich is used ot identify the process instance later. Also workflow information like the current status or the owner is returned by the service.

There are several Resource URIs to request the state of a process instance. Using the $uniqueid returned by the POST method you can request the current status of a single process instance:

GET = http://localhost/workflow/rest-service/workflow/workitem/[UNIQUEID]
MEDIA_TYPE=application/json

or you can also request a list of all process instances assigend to the current user:

GET = http://localhost/workflow/rest-service/workflow/workitem/worklist.json

To change the status of a process instance you simply post the $uniqueid together with the next workflow activity defined by your workflow model.

POST = http://localhost/workflow/rest-service/workflow/workitem.json
 {"item":[
     {"name":"$uniqueid","value":{"@type":"xs:string","$":"141cb98aecc-18544f1b"}},
     {"name":"$activityid","value":{"@type":"xs:int","$":"1"}}, 
     {"name":"_subject","value":{"@type":"xs:string","$":"Some usefull data.."}}
     {"name":"_customdata","value":{"@type":"xs:string","$":"Some more data.."}}
   ]}  

Within the object you can define any kind of data to be stored together with the process instance.

To find more information about the Imixs-Microservice follow the project on GitHub.

Back to top