{"id":26630808,"url":"https://github.com/process-analytics/bpmn-visualization-r","last_synced_at":"2025-04-10T17:06:57.113Z","repository":{"id":37962968,"uuid":"398333318","full_name":"process-analytics/bpmn-visualization-R","owner":"process-analytics","description":"A R package for visualizing process execution data on BPMN diagrams","archived":false,"fork":false,"pushed_at":"2024-04-25T08:05:34.000Z","size":1271,"stargazers_count":15,"open_issues_count":29,"forks_count":4,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-25T22:59:37.376Z","etag":null,"topics":["bpmn","bpmn-visualization","hacktoberfest","process-analytics","r","visualization"],"latest_commit_sha":null,"homepage":"https://process-analytics.github.io/bpmn-visualization-R/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/process-analytics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-20T16:12:24.000Z","updated_at":"2024-04-25T08:05:38.000Z","dependencies_parsed_at":"2024-08-29T11:12:48.136Z","dependency_job_id":"ec9d4471-025c-49c8-a54e-af9c82ab2ceb","html_url":"https://github.com/process-analytics/bpmn-visualization-R","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/process-analytics%2Fbpmn-visualization-R","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/process-analytics%2Fbpmn-visualization-R/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/process-analytics%2Fbpmn-visualization-R/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/process-analytics%2Fbpmn-visualization-R/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/process-analytics","download_url":"https://codeload.github.com/process-analytics/bpmn-visualization-R/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248260614,"owners_count":21074214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bpmn","bpmn-visualization","hacktoberfest","process-analytics","r","visualization"],"created_at":"2025-03-24T14:21:21.659Z","updated_at":"2025-04-10T17:06:57.090Z","avatar_url":"https://github.com/process-analytics.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ebpmnVisualizationR\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cp align=\"center\"\u003e \u003cimg title=\"Email Voting BPMN Diagram with overlays\" src=\"doc/example_email_voting_with_overlays.svg\" alt=\"Email Voting BPMN Diagram with overlays\"\u003e\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n        \u003ca href=\"https://github.com/process-analytics/bpmn-visualization-R/releases\"\u003e\n          \u003cimg alt=\"GitHub release (latest by date including pre-releases)\" src=\"https://img.shields.io/github/v/release/process-analytics/bpmn-visualization-R?label=changelog\u0026include_prereleases\"\u003e \n        \u003c/a\u003e\n        \u003ca href=\"https://cran.r-project.org/package=bpmnVisualizationR\"\u003e\n          \u003cimg alt=\"CRAN release (latest by date)\" src=\"https://www.r-pkg.org/badges/version/bpmnVisualizationR\"\u003e \n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/process-analytics/bpmn-visualization-R/actions/workflows/R-CMD-check.yaml\"\u003e\n          \u003cimg alt=\"Build\" src=\"https://github.com/process-analytics/bpmn-visualization-R/workflows/R-CMD-check/badge.svg\"\u003e \n        \u003c/a\u003e\n        \u003cbr\u003e\n        \u003ca href=\"CONTRIBUTING.md\"\u003e\n          \u003cimg alt=\"PRs Welcome\" src=\"https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square\"\u003e \n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/process-analytics/.github/blob/main/CODE_OF_CONDUCT.md\"\u003e\n          \u003cimg alt=\"Contributor Covenant\" src=\"https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg\"\u003e \n        \u003c/a\u003e \n        \u003ca href=\"LICENSE\"\u003e\n          \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/process-analytics/bpmn-visualization-R?color=blue\"\u003e \n        \u003c/a\u003e\n    \u003c/p\u003e\n\u003c/div\u003e  \n\u003cbr\u003e\n\n\u003c!-- duplicated with index.md --\u003e\n`bpmnVisualizationR` is an R package for visualizing process execution data on BPMN diagrams, using overlays, style customization and interactions.\n\nIt is made possible by [htmlwidgets](http://www.htmlwidgets.org/), which provides an easy-to-use framework for bringing together R and the [bpmn-visualization](https://github.com/process-analytics/bpmn-visualization-js) TypeScript library.\n\u003c!-- END OF duplicated with index.md --\u003e\n\n## ♻️ Usage\n### Installation\n#### Install _devtools_  \n[Devtools](https://www.rdocumentation.org/packages/devtools) is an R package used to ease the installation and the development of other R packages.  \nIt can be installed from the R console: \n```r\ninstall.packages('devtools')\n```\n\n\u003c!-- duplicated with index.md --\u003e\n#### Install _bpmnVisualizationR_\n\n##### From CRAN\nThe latest stable version of the `bpmnVisualizationR` package can be obtained from [CRAN](https://cran.r-project.org/web/packages/bpmnVisualizationR/index.html) with the command:\n```\ninstall.packages(\"bpmnVisualizationR\")\n```\n\n##### From GitHub\n\nTo install a dedicated version (available versions can be found in the [GitHub releases page](https://github.com/process-analytics/bpmn-visualization-R/releases)), run:\n```r\ndevtools::install_github(\"process-analytics/bpmn-visualization-R@v0.5.0\")\n```\n\nOr install the development version:\n```r\ndevtools::install_github(\"process-analytics/bpmn-visualization-R\")\n```\n\nThen, make the library available to the current R project:\n```r\nlibrary(bpmnVisualizationR)\n```\n\u003c!-- END OF duplicated with index.md --\u003e\n\n### Load the BPMN file\n`bpmnVisualizationR` accepts a BPMN file (or an XML document):\n\n```r\n# File from the package\nbpmn_file \u003c- system.file(\"examples/Email_Voting.bpmn\", package = \"bpmnVisualizationR\")\n```\n\nOr\n```r\nbpmn_file \u003c- file.choose()\n```\n\nOr\n```r\nbpmn_file \u003c- \"path_to_bpmn_file\"\n```\n\nOr\n```r\nbpmn_file \u003c- \"\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e ...xml_content\"\n```\n\n💡 The package provides some [BPMN examples](./inst/examples). \\\nThey are taken from the [BPMN 2.0 examples non-normative machine-readable files](https://www.omg.org/spec/BPMN/2.0).\n- Email_Voting.bpmn\n- Nobel_Prize_Process.bpmn\n- Order_Management.bpmn\n- Order_Process_for_Pizza_V4.bpmn\n- Travel_Booking.bpmn\n\n### Display the BPMN diagram\n```r\nbpmnVisualizationR::display(bpmn_file)\n```\n\n\n### Display the BPMN diagram with overlays\n\n```r\noverlays \u003c- list(bpmnVisualizationR::create_overlay(\"bpmn_element_id_1\", \"42\"), \n                 bpmnVisualizationR::create_overlay(\"bpmn_element_id_2\", \"9\"))\nbpmnVisualizationR::display(bpmn_file, overlays)\n```\n\n### Style an overlay\n\n```r\nstyle \u003c- bpmnVisualizationR::create_overlay_style(\n  font_color = 'WhiteSmoke',\n  font_size = 19,\n  fill_color = 'Teal',\n  stroke_color = 'SpringGreen'\n)\n\noverlay \u003c- bpmnVisualizationR::create_overlay(\"bpmn_element_id_1\", \"42\", style, \"middle-right\")\n```\n\nℹ️ To see more information about the value of `position` in bpmn-visualization-js library, please visit https://process-analytics.github.io/bpmn-visualization-js/api/types/OverlayPosition.html.\n\n### Disable the default styles of the overlays\n\n```r\nbpmnVisualizationR::display(bpmn_file, overlays, enableDefaultOverlayStyle=FALSE)\n```\n\n### Style BPMN shapes\n\n```r\nbpmnElementStyles \u003c- list(\n  bpmnVisualizationR::create_shape_style(\n    elementIds = list(\"call_activity_1_1\"),\n    stroke_color = 'RoyalBlue',\n    font_color = 'DarkOrange',\n    font_family = 'Arial',\n    font_size = 12,\n    font_bold = TRUE,\n    font_italic = TRUE,\n    font_strike_through = TRUE,\n    font_underline = TRUE,\n    opacity = 75,\n    fill_color = 'Yellow',\n    fill_opacity = 50\n  ),\n  bpmnVisualizationR::create_edge_style(\n    elementIds = list(\"start_event_1_1\"),\n    stroke_color = 'DeepPink',\n    stroke_width = 3,\n    stroke_opacity = 70,\n    font_color = 'ForestGreen',\n    font_family = 'Courier New',\n    font_size = 14,\n    font_bold = TRUE,\n    font_italic = TRUE,\n    font_strike_through = FALSE,\n    font_underline = FALSE,\n    font_opacity = 80,\n    opacity = 80\n  )\n)\n\nbpmnVisualizationR::display(\n  bpmn_file,\n  bpmnElementStyles = bpmnElementStyles,\n  width='auto',\n  height='auto'\n)\n```\n\nℹ️ It is possible to apply styles to both BPMN edges and shapes simultaneously by adding them to the shared `bpmnElementStyles` list.\n\n### Style BPMN edges\n\n```r\nbpmnElementStyles \u003c- list(\n  bpmnVisualizationR::create_shape_style(\n    elementIds = list(\"message_flow_1_1\"),\n    stroke_color = 'RoyalBlue',\n    font_color = 'DarkOrange',\n    font_family = 'Arial',\n    font_size = 12,\n    font_bold = TRUE,\n    font_italic = TRUE,\n    font_strike_through = TRUE,\n    font_underline = TRUE,\n    opacity = 75,\n    fill_color = 'Yellow',\n    fill_opacity = 50\n  ),\n  bpmnVisualizationR::create_edge_style(\n    elementIds = list(\"sequence_flow_1_4\"),\n    stroke_color = 'DeepPink',\n    stroke_width = 3,\n    stroke_opacity = 70,\n    font_color = 'ForestGreen',\n    font_family = 'Courier New',\n    font_size = 14,\n    font_bold = TRUE,\n    font_italic = TRUE,\n    font_strike_through = FALSE,\n    font_underline = FALSE,\n    font_opacity = 80,\n    opacity = 80\n  )\n)\n\nbpmnVisualizationR::display(\n  bpmn_file,\n  bpmnElementStyles = bpmnElementStyles,\n  width='auto',\n  height='auto'\n)\n```\n\nℹ️ It is possible to apply styles to both BPMN edges and shapes simultaneously by adding them to the shared `bpmnElementStyles` list.\n\n### Integrate in Shiny Applications\n\nThe following displays a BPMN diagram provided as an example by the package with an overlay on top of a BPMN element.\n\n```r\n# Install and load the shiny package\ninstall.packages(\"shiny\")\nlibrary(shiny)\n\n\ndisplayBpmn \u003c- function() {\n    bpmn_file \u003c- system.file(\"examples/Travel_Booking.bpmn\", package = \"bpmnVisualizationR\")\n    style \u003c- bpmnVisualizationR::create_overlay_style(\n      font_color = 'Black',\n      font_size = 25,\n      fill_color = 'MediumSpringGreen',\n      stroke_color = 'MediumSpringGreen'\n    )\n    overlays \u003c- list(bpmnVisualizationR::create_overlay(\"_6-203\", \"9\", style, \"bottom-right\"))\n    bpmnVisualizationR::display(bpmn_file, overlays)\n}\n\nui \u003c- shinyUI(fluidPage(\n    titlePanel(\"Display bpmn diagrams with execution data\"),\n    bpmnVisualizationR::bpmnVisualizationROutput('bpmnContainer')\n  )\n)\n\nserver = function(input, output) {\n    # renderBpmnVisualization is the R bridge function to the html widgets\n    output$bpmnContainer \u003c- bpmnVisualizationR::renderBpmnVisualizationR({ displayBpmn() })\n}\n\nshinyApp(ui, server)\n```\n\n## 🔧 Contributing\n\nTo contribute to `bpmnVisualizationR`, fork and clone this repository locally and commit your code on a separate branch. \\\nPlease write tests for your code before opening a pull-request.\n\nYou can find more detail in our [Contributing guide](CONTRIBUTING.md). Participation in this open source project is subject to a [Code of Conduct](CODE_OF_CONDUCT.md).\n\n✨ A BIG thanks to all our contributors 🙂\n\n## 📃 License\n\n`bpmnVisualizationR` is released under the [Apache 2.0](LICENSE) license. \\\nCopyright \u0026copy; from 2021, Bonitasoft S.A.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprocess-analytics%2Fbpmn-visualization-r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprocess-analytics%2Fbpmn-visualization-r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprocess-analytics%2Fbpmn-visualization-r/lists"}