mixing wireframes and activity Diagrames

0 votes
asked Nov 5, 2018 in Question / help by Guy

I'm new for PlantUML and so far finding it very useful.. however I'm stuck trying to write an activity diagram with a wireframe inside.

I'd like the while loop box to have the wireframe dialog or if I can't do that I'd like to have the while loop to go to the dialog rather than the loop.. Otherwise I have to show the dialog wireframe twice.

Any suggestions or advice would be great.

My current model looks like this:

@startuml
:
{{
salt
{+
  Password | "****     "
  [Cancel] | [  OK   ]

}
}}
;

while (password) is (Incorrect)
  :log attempt;
  :attempt_count++;
  if (attempt_count > 4) then (yes)
    :increase delay timer;
    :wait for timer to expire;
  else (no)
  endif
endwhile (correct)
:log request;
:disable service;
@enduml
commented Nov 6, 2018 by albert (3,520 points)
Maybe have a look at the repeat construct where you place the salt part inside the loop, see  (http://plantuml.com/activity-diagram-beta). Looks like "repeat while (password correct) is (incorrect)" is working".

1 Answer

0 votes
answered Oct 8, 2020 by The-Lu (63,920 points)

Hello G.

Awaiting 'While condition in several lines', a possible workaround is to put all the salt diagram on the same line, as:

{{\nsalt\n{+\nPassword | "****     "\n[Cancel] | [  OK   ]}\n}}

Then we observe your expected result:


[See on PlantUML online server]


For multi-line defect on while loop, see also: https://forum.plantuml.net/11863/while-condition-in-several-lines

If that can help,
Regards,
Th.

...