mscgenjs-core icon indicating copy to clipboard operation
mscgenjs-core copied to clipboard

(notes for introducing activation columns)

Open sverweij opened this issue 6 years ago • 1 comments

a basic scenario

mscgenjs_chart-2

Handling proper arrow endings properly

mscgenjs_chart-3

Handling colors

mscgenjs_chart-4

Integrating ...

mscgenjs_chart-5

Re-activation?

mscgenjs_chart-8

Activation on self reference?

TODO

some pseudo code

// pEntity state machine:
initial     -> inactive;
inactive    -> activated  : activate; // WHERE?
activated   -> active     : initial activation rendered; // HERE
active      -> deactivated: deactivate; // WHERE?
deactivated -> inactive   : deactivation rendered; //HERE
        /* switch (pEntity.state) {
            case 'activated':
                render activation line top
                pEntity.state = 'active';
                break;
            case 'active':
                render activation line continuation
                break;
            case 'deactivated':
                render activation line bottom
                pEntity.state = 'inactive'
                break;
        }
        */

auto activation scenarios

msc {
  a, b, c [label=" ", linecolor=transparent, arclinecolor=lightgrey];

  a =>> b [label="hello"],
  c .. b [label="activate"];
  b >> a,
  c .. b [label="deactivate"];
  
  ...;
  a =>> b [label="hello too"],
  c .. b [label="activate"];
  b >> a;
  b >> a,
  c .. b [label="deactivate"];
  
  ...;
  a =>> b [label="hello again"],
  c .. b [label="activate (I)"];
  a =>> b [label="hello again"],
  c .. b [label="activate (again - II)"];
  b >> a,
  c .. b [label="deactivate (II)"];
  b >> a,
  c .. b [label="deactivate (I)"];
  
  ...;
  a =>> b [label="hello again"],
  c .. b [label="activate (I)"];
  b =>> b [label="hello me"],
  c .. b [label="activate and\ndeactivate (II)", textbgcolor="transparent"];

  b >> a,
  c .. b [label="deactivate (I)"];
}

mscgenjs_chart-9

sverweij avatar Jun 22 '18 15:06 sverweij