CMMN and BMMN - inheritance of variables

Hi,

I’ve noticed there is currently no way to specify the inheritance of variables from BPMN to CMMN and vice versa.

We have processes with a lot a variables and some of them are injected dynamically, which means we can’t specify all of them through in-out parameters.

Is this something you would consider adding in the engine? Is there any workaround for this ?

1 Like

Does anyone have anything to say about this ?

In the commercial product, we use some extensions to map root and parent variables to create “Hierarchical Entities”. If you need to access a parent’s variables in the open source engines, you’d need to use the appropriate services to lookup and query for the variables on the parent process/case. Personally, I avoid referencing parent variables in this way if I can help it because it tends to violate the encapsulation and abstraction principles of good design (requires the child to understand the internal variables of the parent).

On adding the “inherit variables” option when calling a process from a case or when calling a case from a process, it seems like it would add some consistency. I’m not sure what kind of priority we would place on this, however. If you are considering contributing this feature, it would be better to have one of the other devs weigh in before you start work.

Hi @wwitt,

Have you talked with the team about this ?

@wwitt 's comments are correct.

Adding a ‘inherit all variables’ isn’t something on our roadmap, but we always accept PR’s in this area of course.