Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"break" in activity fails when used in a partition, but while is outside the partition #18

Open
nmz787 opened this issue Feb 19, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@nmz787
Copy link

nmz787 commented Feb 19, 2019

With the partition, the break effectively act like detach but with an extra arrow pointing to nowhere.
Even removing the partition, the break output line is drawn over other activity lines, and only one of the uses works, the remainder again look like detach with an arrow pointing nowehere.

with partition enabled: with partition

@startuml
skinparam padding 10
skinparam partitionBorderThickness 4

start
partition #BUSINESS "first file" {
  :start things;
    partition #PaleGoldenRod "first idea" {
    :<b>if</b> running in <b>mode A</b>, <b>then</b> all the <b>following code</b> is wrapped in a while loop "<b>while (command was NOT "quit")</b>";
    :call startup code>
    partition #Thistle "second file <b>the starting function()</b>" {
      :if this is the first time being called,
      it will send an email to the user;
    partition #MediumSpringGreen "third file <b>loop_function()</b>" {
        while (command was NOT "quit")
        :open a TCP/IP socket, unless the <b>goto_label</b> flag was previously set;
        :when data is received on the socket, call processing function>
        partition "fourth_file.c <b>processing()</b>" {
          if (command == "read")
            if (perform readA SUCCEEDS) then (True)
              #LawnGreen:send result to client;
              :restart while loop;
              break
            endif
            :set <b>goto_label</b> variable, then return to <b>first idea</b>;
            :jump back to this line (using the C "goto" syntax);
            if (<bfirst idea</b> read SUCCEEDS) then (True)
              #LawnGreen:send result to client;
              :restart while loop;
              break
            endif
            if (last chance)
              :perform last chance code;
              #LawnGreen:send a 0 to client;
              break
            endif
          elseif (command == "write")
            if (perform writeA SUCCEEDS) then (True)
              #LawnGreen:send result to client;
              :restart while loop;
              break
            endif
            :set <b>resume_from_sv_operation</b> variable, then return from C to SystemVerilog;
            :jump back to this line (using the C "goto" syntax);
            if (SystemVerilog read SUCCEEDS) then (True)
              #LawnGreen:send result to client;
              :restart while loop;
              break
            endif
            if (last chance)
              :perform last chance code;
              #LawnGreen:send a 0 to client;
              break
            endif
          elseif (command is alternate)
            :other processing;
            #LawnGreen:send result to client;
            :restart while loop;
            break
          endif
          if (other commands) then (True)
            :perform relevant processing;
          endif
        }
      endwhile
      }
    }
  }
}

@enduml

with partition disabled: without partition

@startuml
skinparam padding 10
skinparam partitionBorderThickness 4

start
partition #BUSINESS "first file" {
  :start things;
    partition #PaleGoldenRod "first idea" {
    :<b>if</b> running in <b>mode A</b>, <b>then</b> all the <b>following code</b> is wrapped in a while loop "<b>while (command was NOT "quit")</b>";
    :call startup code>
    partition #Thistle "second file <b>the starting function()</b>" {
      :if this is the first time being called,
      it will send an email to the user;
    partition #MediumSpringGreen "third file <b>loop_function()</b>" {
        while (command was NOT "quit")
        :open a TCP/IP socket, unless the <b>goto_label</b> flag was previously set;
        :when data is received on the socket, call processing function>
        'partition "fourth_file.c <b>processing()</b>" {
          if (command == "read")
            if (perform readA SUCCEEDS) then (True)
              #LawnGreen:send result to client;
              :restart while loop;
              break
            endif
            :set <b>goto_label</b> variable, then return to <b>first idea</b>;
            :jump back to this line (using the C "goto" syntax);
            if (<bfirst idea</b> read SUCCEEDS) then (True)
              #LawnGreen:send result to client;
              :restart while loop;
              break
            endif
            if (last chance)
              :perform last chance code;
              #LawnGreen:send a 0 to client;
              break
            endif
          elseif (command == "write")
            if (perform writeA SUCCEEDS) then (True)
              #LawnGreen:send result to client;
              :restart while loop;
              break
            endif
            :set <b>resume_from_sv_operation</b> variable, then return from C to SystemVerilog;
            :jump back to this line (using the C "goto" syntax);
            if (SystemVerilog read SUCCEEDS) then (True)
              #LawnGreen:send result to client;
              :restart while loop;
              break
            endif
            if (last chance)
              :perform last chance code;
              #LawnGreen:send a 0 to client;
              break
            endif
          elseif (command is alternate)
            :other processing;
            #LawnGreen:send result to client;
            :restart while loop;
            break
          endif
          if (other commands) then (True)
            :perform relevant processing;
          endif
        '}
      endwhile
      }
    }
  }
}

@enduml
@arnaudroques
Copy link
Contributor

Could you provide a shorter example that shows the issue?
Thanks!

@arnaudroques arnaudroques transferred this issue from plantuml/plantuml Mar 20, 2023
@arnaudroques arnaudroques added the bug Something isn't working label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants