This library wraps the bpmn-layout-generator java library
bpmnLayoutGeneratoR
depends on rJava.
You must install a JDK to make rJava
work. For the JDK installation, you can use for instance
-
your OS package installer
-
Adoptium: https://adoptium.net/installation/
Once the JDK is installed, don’t forget to run R CMD javareconf
. See https://cran.r-project.org/doc/manuals/R-admin.html#Java-support
For more details, please refer to the rJava documentation and the rJava GitHub README.
Install the package. bpmnLayoutGeneratoR-x.y.z
is the version you want to install, see the available branches on GitHub
# install the package
devtools::install_github("process-analytics/bpmn-layout-generators", ref="bpmnLayoutGeneratoR-x.y.z", subdir="R/bpmnLayoutGeneratoR")
Then load data and generate the layout
# example source sequence_flow and flow_node
flow_node <- data.frame(id=c(1,2),node=c("task1","task2"),type=c("task","task"))
sequence_flow <- data.frame(id=1,from_id=1,to_id=2)
# Call the library and generate the diagram using "ASCII", "BPMN" or "SVG". Defaults to "BPMN".
diagram <- bpmnLayoutGeneratoR::generateBpmnLayout(flow_node, sequence_flow, "BPMN")
If you want to display the BPMN diagram, you can install the bpmnVisualization package and then run
bpmnVisualization::display(diagram)
The preview displays something like
Note
|
Generally, the R release follow the Java release and is fully automated, so there is nothing to do. For more details, see the overall release process. In this case, the branch mentioned here must be created from the related tag. Otherwise, it has to be created from the |
The following is for a manual release:
-
create a branch named
bpmnLayoutGeneratoR-x.y.z
(replace with version) -
execute
make install
in the directoryR/bpmnLayoutGeneratoR
-
commit and push everything with title
release: bpmnLayoutGeneratoR-x.y.z