Imixs-BPMN – Data Objects

With the latest version 4.2.5, the Imixs-Workflow Engine, is now supporting BPMN Data Objects. This kind of model element can be used to model more complex wokflows processing input data:

With this new feature any kind of data object – e.g. a XML or HTML templates – can be associated with a BPMN Task. As a result, the task element will provide these data objects in the new item ‘dataObject’. This item can be injected into a running process instance. See the following code example which is injecting a ‘Invoice HTML template’ into a workitem:

...
ItemCollection task = model.getTask(1000);
List<List<String>> dataObjects = task.getItemValue("dataObjects");
if (dataObjects.size()>0) {
    List<String> firstDataObject = (List<String>) dataObjects.get(0);
    String templateName = firstDataObject.get(0);
    String content = firstDataObject.get(1);
    logger.info("DataObject name=" + templateName);
    logger.info("DataObject content=" + content);
  }
  if ("Invoice Template".equals(templateName) {
    // inject data...
    workitem.repalceItemValue("htmldocument",content);
  }
}
....

DataObjects are part of Imixs-Office-Workflow Version 3.2  to provide an easy and flexible way to create documents and templates during a business process.

Leave a Reply

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