Messages to/from Group entity
Draws signalling charts, block diagrams and graphs from text input.
Brought to you by:
teknos293
Hi. Thanks for releasing Msc-generator v7.2, which I just updated.
I'd like to be able to send messages to and from Group entities in a signalling chart, as well as from its members. This is currently banned for some reason. Is it possible to lift this restriction?
At the moment, I use a workaround involving an anonymous member to stand in for the parent Group, but the visual result is not very attractive and causes confusion to people reading the chart.
Here is an example:
hscale=auto;
A: "Function A" {
AA: "Subfunction\nAA";
Asubstitute: "";
};
B: "Function B" {
Bsubstitute: "";
BB: "Subfunction\nBB";
};
# This works
AA->BB: AA to BB;
# Error "Group entity 'A' cannot be used here. (Use one of its members instead.)
# Error "Group entity 'A' cannot be used here. (Use one of its members instead.)
A->B: A to B;
# Nasty workaround
Asubstitute->Bsubstitute: A to B workaround;
Thanks!
I suppose the nub of this feature request is really about giving Groups their own lifeline in addition to their child members.
Hi Richard,
Thanks for contacting me. The reason I have not yet added this is that I could not decide, which entity of the group the message shall go to. Say you have:
A
B { B1, B2; };
C;
If the group has a lifeline of its own, where should it be drawn? Left of B1? In-between B1 and B2? or right of B2? What if the group has 3 members or only one? Could you submit a graphics on how you think it should look like?
If the group does not have a lifeline of its own (what was my assumption until you sent your second message), what should A->B; be translated to? A->B1 or A->B2? Likewise what should B->C be translated to B1->C or B2->C?
Zoltan
Thanks for the swift response!
Choosing a default child entity in the group to be the source/target of a message addressed to the group doesn't feel right. I definitely prefer the idea of an independent lifeline for the group.
Deciding where to place the group's lifeline sounds like a difficult algorithm to write. There may be some heuristics that can be used, but in my experience, the best course of action when making difficult choices is simply to ask the user what is wanted.
In this case, I suggest a new attribute on group entities. Here are two alternative ideas:
Idea #1
A new group entity attribute called line.index or stem.index (or similar) that controls the position of the group's lifeline stem in relation to those of its children.
Idea #2
New group entity attributes that control the position of the group's lifeline stem relative to that of a referenced child entity (similar to therelative attribute). Possible attribute names could be line.left_of or line.right_of (or stem.left_of/stem.right_of).
Last edit: Richard Bradbury 2022-03-02