*
src (javaScript)
>
diagram.js
>
has actors
>
each Actor has
*
a name
*
an index
*
an alias
>
has signals
*
each Signal has
*
a type
*
an Actor A
*
an Actor B
*
a lineType
*
an arrowType
*
a message
*
has a title
>
can have notes
V
a note has
*
a type
*
an actor
*
a placement
*
a message
V
can parse an input
*
clearly, uses grammar.jison somehow
*
draws via Raphael using sequence-diagram.js
*
sequence-diagram.js
*
 
V
messing about
*
Could I do all my testing in the first box on the page js-sequence-diagrams by bramp
*
Have a look at \n, as I delete n...Pasted Graphic
*
None of the tests deal will <<telling me I have a parsability error>> - but I get an x in the code box
*
? how can I do a load of testing on this? How can I put lots in? How can I organise putting lots in so that I can spot trouble?
*
? why does D--A have an arrow?
V
Potential bug – if I set order using participants, then call "over" in a different order, stuff happens
*
? what's going on here? Pasted Graphic
V
*
Example
#showing 3 col inc displacement and over
participant A
participant B
participant C
note over B: B note
note over C,A: thin #simple missing box
note over A,C: wide #simple shows box
title: ooops
Pasted Graphic
*
Minimal bug -
Note over A,B:
Note over B,A:
Pasted GraphicPasted Graphic
*
 
V
Fix?
V
*
Looks like it's here in sequence-diagram.js line 508 / 509- and what's needed is aX becomes Math.min(aX, bX) and bX becomes Math.max(aX, bX)
var bX = getCenterX( note.actor[1] );
var overlap = NOTE_OVERLAP + NOTE_PADDING;
note.x = aX - overlap;
note.width = (bX + overlap) - note.x;
*
Should I write a test first?
V
V
Previously-seen trouble around aliases
#showing Alias oddness
participant A as bob
note over A: A note
note over bob: bob note
Pasted Graphic
*
X as ThisIsX produces a column called X – matches behaviour found at www.websequencediagrams.com and www.websequencediagrams.com—examples.html
*
Can lead to duplicate column names
V
Trying lots of rows, lots of columns - note over. Just for fun, and because it's easy to generate.
*
Initially noticed that very long >30 sets of 2 wide had very bendy vertical lines - disappeared, crossed over. Played with this.
>
bendiness of lines in "hand drawn" seems to be scaled along with length... so lines bend off space with two things with >50 notes, and boxes > maybe 10 small items wide.
*
in "simple", boxes are not filled (check this)
*
Note that d1n0x3qji82z53.cloudfront.net—mode-asciidoc.jsis missing with a 403, probably because of authorisation. Something to do with the "ace" editor?
*
note that \ is shown as /
*
 
V
tried to set up a lifecycle diagram – need autocomplete
... but ...
this diagram has two clients, tow customer cares - why? Because leading trailing spaces
*
participant client
participant customerCare
participant client record
client -> customerCare: call
customerCare -> client record :create
>
So, for instance, this has three instances of the cc box
*
participant cc as customerCare
client->cc: call
cc ->client record :create
*
this has two
*
participant cc as customerCare
client->cc: call
cc->client record :create
*
and this one
*
client->cc: call
cc->client record :create
*
inserts extra CRs on paste?
*
aargh – the extra whitespace causing duplicate entities!
>
hard to make the diagram do what I want – though instant feedback is brilliant.
*
#Title: lifecycle for client record
participant client
participant customerCare as cc
participant client record
participant billing
client->cc: call
cc->client record:create
client->client record: use
client record-->billing: get use info
billing-->billing: bill run
billing-->client record: update bill
cc->client:send bill
*
How are they used? Here' s a useful thing from scott ambler UML 2 Sequence Diagrams: An Agile Introduction and another from someone who's built a tool UML Sequence Diagrams : A Quick Introduction. This won't do for either, so it's a whiteboard substitute? Something to allow readable text (which I prefer) and a plausibly-identical picture?