AnsweredAssumed Answered

Changes in ExportMarshallers in upcoming Designer release

Question asked by tiesebarrell on Aug 8, 2013
Latest reply on Sep 25, 2014 by liujidong
In the next release of Activiti Designer, we are re-introducing the ExportMarshaller extension functionality. The description below describes the changes made. If you currently have extensions and are planning to upgrade to the next version of Designer, please take note of these changes. Your existing extensions will not be able to run in the new version. However, the most essential changes are the extension point id change and a reshuffling of the utility methods in the abstract base class. Those should be easily fitted to the new release.

In general, these changes aim to make things simpler and make use of Designer's recently introduced usage of the shared Activiti BPMN pojo model. The implementation in the base class AbstractExportMarshaller and AbstractDiagramWorker has been changed significantly. Some of the implementation there was speculative on its use and you'll now find utilities that are meant to be neutral. It's now focussed on getting you to the information and context you need and then letting you do the work required. For instance, we no longer offer a map of node types and nodes from the model. Since we now support subprocesses and other kinds of complex process constructs, how such a structure is populated likely renders it useless to most developers since they'll need a different view anyway for their particular marshaller. You can get a hold of the entire pojo model and traverse it precisely the way you need to.

The extension hierarchy and the context for marshalling diagrams has changed. There is now an interface DiagramWorkerContext available which provides access to the model and the ProgressMonitor to be used. If you extend the base class AbstractExportMarshaller, you will see you can now also access the file resource more easily. There are various new methods and the interface of some existing ones has changed, aimed to make using them more generally applicable. See the javadocs which explain what each method does.

We still support the replacement of placeholders when creating resources.

There is now an example extension available for an ExportMarshaller. This demonstrates how to use the base classes' utilities and how to generate a text resource with some information about the diagram. We hope this helps to get you started.

The extensionpoint for ExportMarshallers has changed. So has the one for ProcessValidators, to keep them consistent. See the updated documentation for the details.

We'd love to get feedback if you use this functionality. We're planning to improve the process validator extension functionality in an upcoming release, so if you use that too, let us know if you have feedback for that.

Outcomes