Connect two arbitrary nodes in New Activity Diagram Syntax

+2 votes
asked Mar 15, 2018 in Wanted features by Victor
Hi PlantUML,

I have been a fan for a couple of years and I noticed you are on Patreon now.  I look forward to contributing.

 The ability to represent function calls is essential to Activity Diagrams. With the old Activity Diagram syntax it was easy to draw an arrow between two nodes to represent function calls in the middle of some routine, because they all had names and the arrows referenced the origin and destination nodes.

How is this possible in the new syntax?  The use case is to represent function calls that must point to code that is not within the sequence, loops and if statements that are handled (very nicely) by the new syntax.  

Best regards,

Victor

1 Answer

0 votes
answered Mar 15, 2018 by plantuml (294,960 points)

A new feature that has been added recently is connector. Right now, this is really basic, you can just have :

@startuml
:start;
(A)
:other stuff;
@enduml

Maybe it can be a workaround to function call ?

We are open to suggestion about a extended syntax. You can also draw (using some image editor) a simple example of what you are expecting, it may help us.

Regards,

commented Mar 23, 2018 by JHaas
Not OP, but I would like to do something like this:

@startuml
partition "Block A" {
start;
(A)
    while(Still moving) is (Yes)
        if (Foo) then
            (B)
            detach;
        endif   
    endwhile
    :Foobar;
    stop;
}
partition "Block B" {
    (B)
    :Do Something;
    if(Test) then
        (C)
        detach;
    else
        (A)
        detach;
    endif
}
@enduml

With the (B) nodes being connected with a simple arrow.

Second problem:

Both the start node and (A) should point to the first condition, instead they point at each other, which looks kind of stupid.
commented Nov 8, 2019 by anonymous
edited Nov 8, 2019

The Example in my case would be

:Search for Customer;

if(Found) then (Yes)

    repeat

    :Call Partition ValidateCustomerDetails;

    if(Valid) then (No)

        :Show Error;

        :Fill Missing Fields;

        :Click Save

    endif

    repeat while (Validation Successful) is (Yes)

    :Call Partition UpdateCustomer;

else (No)

    :Fill Customer Form;

    :Call Partition ValidateCustomerDetails;

    :Call Partition CreateCustomer;

endif

}

Here ValidateCustomerDetails Partition is called twice. If I include Contact Person for Customer then there will be 2 more calls to ValidateCustomerDetails.  is there a way to handle such calls in Beta Activity Diagram.

----------- Update-----------------------

@startuml
(*)  --> "check input"
If "input is verbose" then
--> [Yes] "turn on verbosity"
--> "run command"
else
--> "run command"
Endif
-->(*)
@enduml
This Diagram in the Old flow, need in new flow.
---------------------------------

Thanks

Dhananjay

...