Design patterns in camunda platform open source code

Hello everyone,

could you please give me some examples of design patterns like Factory, Observer, Iterator… in open source code of Camunda platform 7 written in java?

Hi Peter,

What do you need to know this for? I may be able to share some code pointers.

Cheers,
Thorben

Hi,

I need it just for educational purposes. My topic is Camunda platform 7 and look for some design patterns in code. If you have something, could you please share it to me?

Thank you,
Peter

Okay, here are three examples:

  • The public Java API uses the Command pattern, example. This helps us implement cross-cutting aspects like transactions or logging consistently in a single place.
  • The process engine configuration uses the Factory pattern in many places, example. This helps users replace parts of the process engine implementation easily.
  • The process engine uses the Visitor pattern to extract data from a hierarchy of Execution objects. For example, to map executions to the BPMN activities that they represent. Example visitor class, see also the other classes in the package for how the visitors are invoked.

Cheers,
Thorben

1 Like