Simulating Workflows

With the new project Imixs-Mock  you can now simulate your Imixs-Workflow BPMN models in an easy way. The project provides a full mock of the Imixs-Workflow engine and allows to test and simulate different workflow scenarios. Imixs-Mock simulates the full processing life-cycle including all workflow plug-ins. You can specify also a subset of plug-ins to test specific business logic in your workflow project.

To add the mock into your own workflow project just add the following dependencies:

<!-- JUnit Tests -->

Now you can write your jUnit test class to verify your BPMN model. See the following example code:

public void testSimple() {
  workitem = new ItemCollection();
  workitem.replaceItemValue("_subject", "Hello World");
  try {
    workitem = workflowMockEnvironment.getWorkflowService().processWorkItem(workitem);
    Assert.assertEquals(1100, workitem.getTaskID());
    Assert.assertEquals("manfred", workitem.getItemValue("namowner", String.class));
  } catch (AccessDeniedException | ProcessingErrorException | PluginException | ModelException e) {

The Imixs-Mock allows you to simulate different users processing a process instance. In this way you can verify the Access Control List (ACL) of a process instance and the assignment of process owners in complex workflow scenarios.

You will find the full example on Github.

Leave a Reply

Your email address will not be published. Required fields are marked *