Microservice
The Imixs-Microservice project encapsulates the Imixs-Workflow Engine into a RESTful web service interface. The Imixs-Microservice can be bound to any business application, independent from the technology behind. In this architectural style the business logic can be changed without changing a single line of code.
After you have setup the Imixs-Workfow Microservice you can deploy
a workflow Model. A workflow model can be created using the Imixs-BPMN eclipse Plugin. A workflow Model
can be deployed into the Imixs-Workflow using the 'Model-REST
service' interface. You can deploy the default 'Ticket Workflow'
using the curl command:
curl --user admin:adminadmin --request POST -Tticket.bpmn http://localhost:8080/api/model/bpmn
You will find the example model in the Imixs-Microservice project located at: /src/main/resources/ticket.bpmn
To verify if the model was deployed successfully you can check the deployed model version with the Rest API: http://[YOURSERVER]/api/model
To create a new process instance you can POST a JSON Object to the Imixs-Microservice in the following way:
curl --user admin:adminadmin -H "Accept: Application/json" -H "Content-Type: application/json" -d \
'{"item":[ \
{"name":"type","value":{"@type":"xs:string","$":"workitem"}}, \
{"name":"$modelversion","value":{"@type":"xs:string","$":"1.0.0"}}, \
{"name":"txtworkflowgroup","value":{"@type":"xs:string","$":"Ticket"}}, \
{"name":"$processid","value":{"@type":"xs:int","$":"1000"}}, \
{"name":"$activityid","value":{"@type":"xs:int","$":"10"}}, \
{"name":"txtname","value":{"@type":"xs:string","$":"test-json"}}\
]}' \
http://localhost:8080/api/workflow/workitem.json
The result can be verified by the following GET URI:
http://[YOURSERVER]/api/tasklist/creator/adminSee the Imixs-Microservice Project on GitHub for further Information.