Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 2.28 KB

File metadata and controls

69 lines (45 loc) · 2.28 KB

bpmnLayoutGeneratoR

This library wraps the bpmn-layout-generator java library

Prerequisites

bpmnLayoutGeneratoR depends on rJava.

You must install a JDK to make rJava work. For the JDK installation, you can use for instance

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.

Usage

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

BPMN display in R preview

Build and release new version

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 master branch.

The following is for a manual release:

  • create a branch named bpmnLayoutGeneratoR-x.y.z (replace with version)

  • execute make install in the directory R/bpmnLayoutGeneratoR

  • commit and push everything with title release: bpmnLayoutGeneratoR-x.y.z