WBS Diagrams

+1 vote
asked Feb 27, 2019 in Wanted features by nicamlg (140 points)

Hello.

I know WBS (Work Breakdown Structure) is not really part of UML (or I think so...), but it is a common diagram in project documentation, and as such, I am not pleased having to depend on extra tools, usually mouse-oriented, to draw such a "simple" diagram.

Currently I use Activity-beta as a substitute, but it is not really what it should be.

It could be something like this:

@startwbs / @startuml + wbs  (like it is with salt)

[title, skimparams etc...]

skinparam wbsToplevelBackground    darkgrey
skinparam wbsSecondlevelBackground lightgrey
skinparam wbsThirdlevelBackground  grey

/' Alternate (more sane!) skinning targeting '/
skinparam wbsBackground<<C3L4>> LightGreen

' Upper level

:Top Level; /' similar syntax to activity beta '/

/' Since there can only be one element as first level AFAIK,
   all other elements go to the second level, nested by splitting
'/

split "Level Two First Column"  as C1
split "Level Two Second Column" as C2

split C1 "Column 1 Third Level"  as C1L3
split C1 "Column 1 Fourth Level" as C1L4
split C2 "Column 2 Third Level"  as C2L3
split C3 "Column 3 Fourth Level" as C3L3
split C3 "Column 3 Fourth Level" as C3L4

/'
  Now, the contents:

'/

C1L3 {
  :Job 1;
  :Job 2;

  :C1L4/  /' Reference to the Next Sub division '/
}

/'
  Here, it can be further nested, or it can take the
  the contents from another definition block with its name
'/

C1L4 {
  :Sub Job 1-3 One;
  :Sub Job 1-3 Two;
}

/' full new column '/
C4 as "Fourth Column" {
  :Sub Job at last Column ;
  :Another Sub Job;
  C4L2 as "Last Column" {
    :Fourth-level job here
     at the last column;
  }
}

C2L3 {
/' And so on '/
}
@enduml/@endwbs

The skinparam could target WBS sub-levels to customize the appearance, and rows should be vertically top-aligned.

 

1 Answer

0 votes
answered Feb 28, 2019 by plantuml (294,960 points)

We could think about it.

However, you forget to give some important element for us : how do you expect the diagram to be rendered ?

Something like this ?

It would be nice if you could post some very basic drawings and the corresponding text diagrams for each diagram.

Thanks!

commented Mar 1, 2019 by nicamlg (140 points)
Hello!

Well, I didn't produce a source->diagram, because I have not much time, but I think I explained it well in this document:
https://hackmd.io/F3PH0pzhREefPYr2E2QoSw

I did it this way because it was getting big and complex for a simple comment here. Please, let me know if I need to explain something further.

And thank you for your interest!
commented Mar 1, 2019 by plantuml (294,960 points)
Thanks for your contribution, it really helps.
You are lucky because we are also right now working on mindmap support.
(see  http://plantuml.com/en/mindmap-diagram and https://github.com/plantuml/plantuml/issues/43 )

Somehow there are connection between MindMap and WBS so implementing @startwbs should not be too difficult.
Please just be patient :-)
commented Mar 2, 2019 by Nica MLG
edited Mar 2, 2019
Wow...

Yes, they are very close, almost like changing orientation (top-bottom vs.  left-right).

Also some of both syntax proposals are similar (I used salt-like to keep it closer to "known" syntax, but using asterisks is how AsciiDoc defines nested lists).

That's great news. :-)
commented Mar 4, 2019 by plantuml (294,960 points)
With last beta http://beta.plantuml.net/plantuml.jar you can have:

@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

About -left- and -right- we are looking for a shorter syntax to set position.
Any suggestion is welcome :-)
commented Mar 4, 2019 by nicamlg (140 points)
For the "compact syntax", I suggest using '<' and '>' because they are visually explicit and for simplicity:

@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

Below "Model of AsIs Processes Completed", both boxes go to the left, while below "Design Phase", the "Model of AsIs Processes Completed" goes to right (default), but "Measure AsIs performance metrics" goes to the left and "Identity Quick Wins" to the left again.

Here there are two possibilities: changing direction can affect only the marked element, or else affects all elements after it.

Another alternative could be using single '< | >'  for "this element", and '<< | >>'  for "this branch".

It's getting good!

I would suggest using rectangles (eg. no border radius) for default.

If you're going to implement option syntax like this:

@startwbs
* [#white,#red] Business Process Modelling WBS
** [bg=#teal] Launch the project
*** Complete Stakeholder Research
*** [bg=#lightblue,dir=r] Initial Implementation Plan
@endwbs

(first color for foreground, second for background, or with option id (fg/bg), I would algo suggest allowing some options, one of them being `dir`, accepting 'L' and 'R' (or 'left' | 'right'), like the last element.

fg: foreground color
bg: background color
dir: element direction
bdir: whole branch direction (until next direction change)
font: er... element font
class: if an stereotype-like skinparam has been configured, use it for this element
nobox: boxless element
bnobox: boxless level (boxless levels are usually the last ones)

*** [class=SecLevel]

for a skinparam wbxBox<<SecLevel>> definition.

(You should not ask for suggestion so lightly... ;-))
commented Mar 4, 2019 by plantuml (294,960 points)
With last beta http://beta.plantuml.net/plantuml.jar you can now have:

@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

We are not 100% happy with "<" and ">".
So you can also have :

@startwbs
+ New Job
++ Decide on Job Requirements
+++ Identity gaps
+++ Review JDs
++++ Sign-Up for courses
++++ Volunteer
++++ Reading
++- Checklist
+++- Responsibilities
+++- Location
++ CV Upload Done
+++ CV Updated
++++ Spelling & Grammar
++++ Check dates
---- Skills
+++ Recruitment sites chosen
@endwbs

Both syntax are working. I don't know if it sounds better with "+" and "-".
The idea is to let people try different syntaxes to see which one sounds better.

Once this will be fixed, we'll think about skinparam.
commented Mar 6, 2019 by nicamlg (140 points)
edited Mar 6, 2019 by nicamlg
The pro about using + / - is that it keeps the leveling and sets direction without extra characters.
The con is that it isn't visually informative.

But I can live with it. :-)

I suppose boxless elements are for the next round... :-) (yes, I have seen them in the mindmap ;-)).

Oh, do you plan on allowing tabbed leveling, too? that way it could be something like:

+ Project
    + Part One
        + Task 1.1
        - LeftTask 1.2
        + Task 1.3
    + Part Two
        + Task 2.1
        + Task 2.2
            -_ Task 2.2.1 To the left boxless
            -_ Task 2.2.2 To the Left boxless
            +_ Task 2.2.3 To the right boxless
...

Well, just a thought.
commented Mar 14, 2019 by Rom1deTroyes
A lot of (Buisness and Managment) Schools use PowerPoint to generate WBS, with a simple list.
Here is one (ugly) exemple :
https://github.com/PFRFlemmards/project-madera/blob/master/01-Livrable-1/09-WBS-Horizontale.pptx?raw=true

https://github.com/PFRFlemmards/project-madera/raw/master/01-Livrable-1/09-WBS-Horizontale.jpg

I will try to get time to test the beta upthere (-:

++
    Romain
commented Mar 14, 2019 by plantuml (294,960 points)
WIth last beta http://beta.plantuml.net/plantuml.jar you can now have

@startwbs
+ Project
 + Part One
  + Task 1.1
   - LeftTask 1.2
   + Task 1.3
 + Part Two
  + Task 2.1
  + Task 2.2
   -_ Task 2.2.1 To the left boxless
   -_ Task 2.2.2 To the Left boxless
   +_ Task 2.2.3 To the right boxless
@endwbs
commented Mar 14, 2019 by nicamlg (140 points)
edited Mar 14, 2019 by nicamlg
Awesome!

It is even more compact than before.

One thing I found out: it only gets 4 levels. In this example:

```
@startwbs
+ Business Process Modelling WBS
 + Launch the project
  + Complete Stakeholder Research
  + Initial Implementation Plan
 + Design phase
  + Modeling
   + 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
```

The "Completed1" and "Completed2" don't show up. Is there a reason for this? I understand it must be a limit somehwere, but I would have thought about 5 levels...

Anyway, this diagram is getting almosst perfect. :-) Thank you all.

I think most of what it is needed has been covered, except coloring the boxes.
I would suggest that once a branch gets a background color (by whatever means ;-)), keep it to the end of the branch (including sub-levels) until the next background change, so it doesn't need to repeat it for every element of the branch.
commented Mar 14, 2019 by nicamlg (140 points)
Hi again.

I've got a problem with another test:

@startwbs
+ Project
    + Part One
        + Task 1.1
        - LeftTask 1.2
        + Task 1.3
    + Part Two
        + Task 2.1
        + Task 2.2
            -_ Task 2.2.1 To the left boxless
            -_ Task 2.2.2 To the Left boxless
            +_ Task 2.2.3 To the right boxless
@endwbs

(it is tabbed, so there's only a character per indent level)

Shouldn't ' Part Two'  be on the right of the 'Project'?

(using lastest beta: 1.2019.04beta2)
commented Mar 14, 2019 by plantuml (294,960 points)
With last beta http://beta.plantuml.net/plantuml.jar you can now have

@startwbs
+ Project
++ Part A
+++ Part AA
++++ Part AAA
+++++ Part AAAA
++++++ Part AAAAA
@endwbs

> Shouldn't ' Part Two'  be on the right of the 'Project'?
Well, this is a question of taste. We have decided of put "Project" exactly in the middle of the image.
If you really need it, we could add a setting to put "Project" in the middle of "Part One" and "Part Two"
Maybe the more difficult part is to find a nice name for this eventual setting...
Any suggestion is welcome !
commented Mar 15, 2019 by nicamlg (140 points)
edited Mar 15, 2019 by nicamlg
Hi.

> If you really need it, we could add a setting to put "Project" in the middle of
> "Part One" and "Part Two"
> Maybe the more difficult part is to find a nice name for this eventual setting...
> Any suggestion is welcome !

What I meant is that it is, after all, a graph, and if there are two branches, there should be located on each side of the root element...

If you want to reuse a token, maybe "direction" could do. However, I woud suggest "distribution", accepting "tree" or "even" for my proposed one, and "sequential" or "column" for the current distribution.

 ' either as a skinparam parameter
  skinparam wbsDistribution tree

' or as a command:
  distribution column

' which can be made more semantic
  distribute as tree

' which in turn means more readable
distribute as column[s]  ' using the plural is optional, just for semantic correctness
commented Mar 20, 2019 by ingo (120 points)
@startwbs
+ Project
++ Part A
+++ Part AA
++++ Part AAA
+++++ Part AAAA
++++++ Part AAAAA
@endwbs

This looks just like how I would envision an outline in plantuml. The rendering looks just like an outline where root and first children of root are projected horizontal.

The mindmap is a "bunch of oulines" sharing the same root, but rendered al horizontal.

Would it be something to add directionality to the mindmap and with that cover all above versions?

outline:
@startmindmap
vertical
* Project
++ Part A
+++ Part AA
++++ Part AAA
+++++ Part AAAA
@endmindmal

wbs:
@startmindmap
vertical
horizontal * Project
horizontal ++ Part A
+++ Part AA
++++ Part AAA
+++++ Part AAAA
@endmindmal

ingo
commented Nov 9, 2019 by rolandog (100 points)

Hello everyone. I've been using PlantUML for a while, and I've been loving the great new features that are being proposed and developed. Thanks to everyone for making PlantUML such a wonderful tool to use.

I know this feature is still prone to changes, but I have a suggestion regarding the handling of whitespace (if it is still planned to accept indentation through whitespace, per the last example of the main site).

One of the main website's examples is really close to what could be considered Pandoc's implementation of Markdown (as my account is new, I'll refrain from posting links). My suggestion would be to handle the whitespace in a similar as they noted in the manual:

List items may include other lists. In this case the preceding blank line is optional. The nested list must be indented to line up with the first non-space character after the list marker of the containing list item.

* fruits
  + apples
    - macintosh
    - red delicious
  + pears
  + peaches
* vegetables
  + broccoli
  + chard

So, in essence, this would allow for PlantUML users to copy/paste a Markdown list (and indent it, and add a root node if only a single node is permitted) in order to generate the WBS or the MindMap, while retaining compatibility with the previous single-space indentation allowed.

This would allow, I think, compatibility for classifying two modes to define the structure: through OrgMode or Creole Wiki Syntax if the second item has no whitespace, and through Markdown-compatible handling if it does.

This is just a suggestion that I'm hoping is somehow useful for faster creation of diagrams through flexibility of acceptable inputs, but I understand if it isn't implementable.

Again, thanks for everyone's efforts in making PlantUML so great!

...