bpmn-io / extract-process-variables

An util for bpmn-js to extract Camunda BPM process variables from a BPMN 2.0 diagram.
MIT License
0 stars 2 forks source link

feat: allow asynchronous extractors #24

Closed marstamm closed 1 year ago

marstamm commented 1 year ago

related to https://github.com/bpmn-io/internal-docs/issues/680

nikku commented 1 year ago

What is the impact of this change downstream? In which context do we use it, as of today. Do we introduce an "endless chain of async"? If so then there may be other ways to support asynchronous modes.

Asking to evaluate if we're building the right thing here.

marstamm commented 1 year ago

We use this library in the properties panel and the modeler as of today. The use cases are slightly different:

All places are either already async or can be adjusted to be async within the scope of their Preact component. We always use this library directly and not nested within another lib

marstamm commented 1 year ago

Correction on the C7 properties panel entry:

It is not used in a Component but in a synchronous props function, so integration there would not be straight forward. It currently needs to be synchronous so we can show/hide the group during rendering depending on available variables.

However, I believe with a small change in behavior this can be resolved.

This way, variables can be fetched in a Component and don't need to be available before render.

nikku commented 1 year ago

Thanks for the details @marstamm. Good to go from my birds eye view them :rocket:

[C7 properties panel] This way, variables can be fetched in a Component and don't need to be available before render.

I suggest that we make the utility async on all ends (also C7) and add improve the C7 properties panel to make it work, too.