Skip to content

0.5.0

Latest
Compare
Choose a tag to compare
@tbouffard tbouffard released this 19 Sep 05:29
· 26 commits to refs/heads/main since this release

This new version allows you to style the BPMN elements of the displayed diagram.

CRAN: this version is available on CRAN.

The bpmnVisualizationR package now uses bpmn-visualization@0.40.0.

Thanks to all the contributors of this release 🌈: @csouchet and @tbouffard

See milestone 0.5.0 to get the list of issues covered by this release.

Highlights

Breaking changes

The way in which overlay styles are created has been simplified.

Previously, several functions had to be called to create the style elements:

taskStyle <- bpmnVisualizationR::create_style(
  fill = bpmnVisualizationR::create_fill(color = 'MistyRose'),
  font = bpmnVisualizationR::create_font(color = 'DarkSlateGray', size = 23),
  stroke = bpmnVisualizationR::create_stroke(color = 'Red')
),

These intermediate functions were removed (create_font, create_fill and create_stroke functions are now internal functions).
create_style has been renamed in create_overlay_style (for clarity and consistency with the new functions that let style BPMN elements), and now, you simply have to call this function to create the style of an overlay:

taskStyle <- bpmnVisualizationR::create_overlay_style(
  font_color = 'DarkSlateGray',
  font_size = 23,
  fill_color = 'MistyRose',
  stroke_color = 'Red'
)

ℹ️ For more details, see #245

New parameter to style BPMN Elements

The BPMN elements of the diagram can specificly be styled with the new create_shape_style and create_edge_style functions as shown below 👇🏿:

bpmnElementStyles <- list(
  bpmnVisualizationR::create_shape_style(
    elementIds = list("call_activity_1_1"),
    stroke_color = 'RoyalBlue',
    font_color = 'DarkOrange',
    font_family = 'Arial',
    font_size = 12,
    font_bold = TRUE,
    font_italic = TRUE,
    font_strike_through = TRUE,
    font_underline = TRUE,
    opacity = 75,
    fill_color = 'Yellow',
    fill_opacity = 50
  ),
  bpmnVisualizationR::create_edge_style(
    elementIds = list("sequence_flow_1_4"),
    stroke_color = 'DeepPink',
    stroke_width = 3,
    stroke_opacity = 70,
    font_color = 'ForestGreen',
    font_family = 'Courier New',
    font_size = 14,
    font_bold = TRUE,
    font_italic = TRUE,
    font_strike_through = FALSE,
    font_underline = FALSE,
    font_opacity = 80,
    opacity = 80
  )
)

bpmnVisualizationR::display(
  bpmn_file,
  bpmnElementStyles = bpmnElementStyles,
  width='auto',
  height='auto'
)

image

What's Changed

Full Changelog: v0.4.0...v0.5.0

🚀 Improvements

📝 Documentation

📦 Dependency updates

👻 Maintenance