render_bpmn {bpmnR}R Documentation

Render BPMN diagram.

Description

This renders a BPMN diagram based on a BPMN object.

Usage

render_bpmn(
  bpmn,
  viewer.suppress = FALSE,
  width = NULL,
  height = NULL,
  elementId = NULL,
  xml_version_number = "1.0",
  xml_encoding_declaration = "UTF-8",
  ...
)

## S3 method for class 'bpmn'
render_bpmn(
  bpmn,
  viewer.suppress = FALSE,
  width = NULL,
  height = NULL,
  elementId = NULL,
  xml_version_number = "1.0",
  xml_encoding_declaration = "UTF-8",
  ...
)

Arguments

bpmn

A BPMN object as a list of data.frames for the BPMN elements and an XML document for the XML-based interchange format for the BPMN process.

viewer.suppress

Never display the widget within the RStudio Viewer (useful for widgets that require a large amount of space for rendering). Defaults to FALSE.

width

Fixed width for widget (in css units). The default is NULL, which results in intelligent automatic sizing based on the widget's container.

height

Fixed height for widget (in css units). The default is NULL, which results in intelligent automatic sizing based on the widget's container.

elementId

Use an explicit element ID for the widget (rather than an automatically generated one). Useful if you have other JavaScript that needs to explicitly discover and interact with a specific widget instance.

xml_version_number

The version of the XML standard used.

xml_encoding_declaration

The character encoding used in the XML declaration. ‘UTF-8’ is the default encoding used.

...

Additional arguments passed to methods.

Value

Rendered BPMN model in htmlwidget.

Author(s)

Alessio Nigro

Examples


library(dplyr)
nodes <- tibble(id = "task", name = "Task name",
objectType = "task", gatewayDirection = NA)
events <- tibble(id = c("start","end"), name = c("Start event","End event"),
objectType = c("startEvent","endEvent"))
flows <- tibble(id = c("flow1","flow2"), name = c("flow1","flow2"),
sourceRef = c("start","task"), targetRef = c("task","end"),
objectType = c("sequenceFlow","sequenceFlow"))
model <- create_bpmn(nodes, flows, events)
render_bpmn(model)


[Package bpmnR version 0.1.1 Index]