Custom BPMN parser

Hi guys,

I need to show to user several elements in the flow as single one

Inspired by custom-elements example I am thinking to implement following logic:

  1. At ‘import.parse.start’ event : get input bpmn from event.xml
  2. Calculate how should be drawn single element, hiding several actual ones
  3. Save calculated graphic output at custom-elements.json.
  4. Once modeler.importXML completes : invoke CustomRender and draw elements from custom-elements.json on top of existing diagram.

Does it make sense?
Is there a better way?

Thanks a lot

I am new to BPMN topic. So I am learning.
After digging a bit I think I should :

  1. Implement the above as subprocess.
  2. Implement custom view of subprocess element using custom-elements example.

I will be glad to hear other thoughts regarding this approach.

What exactly would you like to achieve? From the BPMN perspective a collapsed sub process might represent what you’re aiming at.


To be sure however I’d need to understand a little bit more. Do you need to create that grouping on import? Should it be possible to ungroup? Can you provide mock-ups of the functionality you’re trying to achieve?

Because of the extensible nature of our toolkit there is many ways to tackle such an approach. Just to name one alternative you could replace the importer logic to group and combine elements on the fly.

Thank you so much for helping me.
We need to implement customized and simplified view of workflow for end user.

My requirements are as follows:
User is running a flow.
At each node is performed the following:

  1. Check data exists // script task
  2. If data does not exists go to backend server to bring the data // script task
  3. If data does not exists ask user to insert missing data // manual task

The end user should see all 3 above as single node.
From user point of view he is dragging and dropping node, which represents, for example ‘age’ and pulls arrows : age>5 and age<5 to other nodes.

So it should not be possible to ungroup for end user.
Probable for developers it might be usefull, but not necessary.

A custom renderer for the sub process makes sense then.

In addition you’d need to do the following:

  • Customize the palette to add the special sub-process
  • Scaffold the contents on sub-process creation
  • Customize the context-pad to disallow expanding of special sub-processes

You find examples for all of the above in our examples repository.

Thanks a lot for your help.
Is it legal to create such flow, when the subflow does not ends with end task?

How should an engine interpret such diagram? It is structurally legal but does not make much sense with regards to execution flow.