cancel
Showing results for 
Search instead for 
Did you mean: 

Why not allowing sub-classing of BpmnParse?

iravanchi
Champ in-the-making
Champ in-the-making
Hi,

The constructor of BpmnParse class is defined as package level.
Thus, extending isn't possible because the sub-class can't call the constructor of the parent.

Here's the constructor from Activiti code:

  /**
   * Constructor to be called by the {@link BpmnParser}.
   *
   * Note the package modifier here: only the {@link BpmnParser} is allowed to create instances.
   */
  BpmnParse(BpmnParser parser) {
    super(parser);
    …..
    …..
  }

Is this intentional (to disallow extensions)? Why?
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
I remember that I implemented it specifically that way, thinking that extensions to the parser should be done through other extension points.
But indeed, there is actually very little reason to do so. Could you elaborate which kind of extension you would like to do?

iravanchi
Champ in-the-making
Champ in-the-making
We've been through why I'm extending the parser before, check this thread:
http://forums.activiti.org/en/viewtopic.php?f=4&t=371

What I want to have, is similar to "activiti:" extensions to the BPMN, related to my own domain of usage.
Actually I proposed to refactor the BPMN parser in a better designed way (object-oriented design) rather than the current, straight and function-call-based, so that the parser code in the Activiti project can become somewhat cleaner, and "activiti:" extensions (and other extensions) can be treated the same way, and allow other users (like me) to add their own extensions. The ParseListener class does not provide the type of extensibility I need, as specified in the comments of ACT-178.

Anyway, I filled the contributor agreement form so that I can provide patches for you guys to look at, and tell me if my refactoring is something you like or not. I followed it up several times, and got no answer. Not even a "No, we don't want you to contribute" answer.

As a result, I am re-writing the whole parser class every time I upgrade my version of Activiti. For the sake of minimizing my re-coding, I wanted to extend the BpmnParse class instead of re-writing it to replace some method by overriding them, which I found out that this is not possible either.

-Hamed
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.