rkrug / plantuml

R package to build UML graphs using plantuml
https://rkrug.github.io/plantuml/index.html
GNU General Public License v3.0
76 stars 8 forks source link

diagram type "wbs" not supported? #8

Closed sebastiansauer closed 5 years ago

sebastiansauer commented 5 years ago

This code (source) appears not to be supported. Apparently, it is no genuine UML grammar.

@startwbs
* Business Process Modelling WBS
** Launch the project
*** Part 1-1
*** Paret 1-2
** Design phase
*** Part 2-1
**** Part 2-1-1
**** Part 2-1-2
*** Part 2-2
*** Part 2-3
** Part 3
@endwbs

Renderring this image:

image

x <- '
@startwbs
* Business Process Modelling WBS
** Launch the project
*** Complete Stakeholder Research
*** Initial Implementation Plan
** Design phase
*** Model of AsIs Processes Completed
**** Model of AsIs Processes Completed1
**** Model of AsIs Processes Completed2
*** Measure AsIs performance metrics
*** Identify Quick Wins
** Complete innovate phase
@endwbs
'
x <- plantuml( 
  x
)

plot( 
  x = x
  # vector = TRUE
)

Error code:

ERROR
1
Empty description
Some diagram description contains errors
Error in polypath(trans(pathX, pathY), rule = switch(p@rule, nonzero = "winding",  : 
  unable to allocate memory (in GPath)
rkrug commented 5 years ago

Thanks for reporting this and sorry for coming back so late.

The problem is the empty line at the end. I have no idea why, but if you use

x <- '
@startwbs
* Business Process Modelling WBS
** Launch the project
*** Complete Stakeholder Research
*** Initial Implementation Plan
** Design phase
*** Model of AsIs Processes Completed
**** Model of AsIs Processes Completed1
**** Model of AsIs Processes Completed2
*** Measure AsIs performance metrics
*** Identify Quick Wins
** Complete innovate phase
@endwbs' .  ## <- 

x <- plantuml( 
  x
)

plot( 
  x = x
  # vector = TRUE
)

it works.

This might be a problem in plantuml, so please leaver this issue open.

rkrug commented 5 years ago

Fixed in 6813ee34f6f7c33788aa04fd06558498bb7df988 specifically R/plantuml.R