bpmn-visualization-R
bpmn-visualization-R copied to clipboard
[FEAT] Allow to retrieve BPMN elements and their semantic part
Is your feature request related to a problem? Please describe.
During the work on the integration with bupaR, I needed to update the style of a given activity name. To do so, I need to find the id of the activity that corresponds to the given name.
Describe the solution you'd like Be able to retrieve the semantic part of an element in the same way as it is done with the TypeScript library using either:
- getElementsByKinds and having the
bpmnSemanticproperty ofBpmnElement; OR - getModelElementsByKinds
@tbouffard @csouchet This is among the priority features needed for our demos
After what I found, we can only pass data from the html widget to R by using Shiny App. Or, we want to support the case where we don't use Shiny App. So, it's not possible to call JS function and return the result to R from a rendered HTML widget :slightly_frowning_face:
The ressources
- https://book.javascript-for-r.com/shiny-intro
- https://deanattali.com/blog/htmlwidgets-tips/#widget-to-r-data
Possible workaround
- provide a new R function to "import" or "load" the diagram and retain it into memory
- do the implementation directly in R or using other packages like
understandBPMN - in the display function, passing the diagram file is optional as it may already have been loaded with the "import" function. If it has not been previously loaded and it is not passed, throw an error
As we don't have a simple solution for now, we have decided with @csouchet to postpone the implementation.