Label Null point exception in activity diagram

0 votes
asked Oct 13, 2022 in Bug by anonymous
//www.plantuml.com/plantuml/png/RL5DRzim3BthL_2O7WexMqy9rXLRqAtOi1NT1x2J8TjCB40s1Oh9q0NvxrCesq2N2J0jFNxmyV4kYcNPzzxenHXnuX4A6rnnM1OKaAqu6cBX1YVEUlTdV1zZqs5lJyLHREtnLDHMcguuwk_7m-PaZDl2ucTAQQqW1FlioRQm9UwjN85qEC3YwwSh0m3d3rRVq7BJdJqGA4QNoaAAJL2jbh4XRi4Di7cd6LNbQVTFR5Mfwnf69guzmVKjJ0zrhjMgUKWSKv6fzYsK4xLV69MRdjKZOx2CIcwK0dIUX2SvC9T47n4MNsXArA44Ef403RK8R-2cVAtzy_6sHWynL7efPtn7GZEyL1Y7rctDr450fVj_XvjfmiiMIvEJFk1mNYq2CXE_Jvb9d7NsVQPTXk6ta-v510Z11W-qpcMYK32Pc6xxAQkuTLwGuP7fu5fitrv8kggg-nnJFyyBookuP-fV0DzftDaixjJnOl9NPRasgoUKFG_myUnWZEDwZ7AzIwdxtly5

1 Answer

0 votes
answered Oct 13, 2022 by The-Lu (64,760 points)

Hello A., and all,

In fact: Currently, on PlantUML, we can not go to a label not previously defined!

Just to avoid the `NPE`, here is a proposal with rearrange the order, as:

@startuml
start

title /api/v1/operations/initializations/{schema}/{table}/batch/{batchUID}

if (Validate payload format) then (Not OK)
    :Set http code = 404 ;

    label sp
    label sp
    label sp
    label sp
    label sp_label1

    :Generate errorCodeUid;
    :Log error with errorCodeUid to Devo;

    stop
else (OK)
    :Search the possible match batch record in DB
    __log possible match__
    - {batchUid} -> batchUid
    ;
    
    If (log record > 0) then (No)
        :Set http code = 403 ;
        'label sp_label0
        goto sp_label1
    else (Yes)
        :Prepare the initial load reponse;
    endif
endif

if (Record filter Provided?) then (Yes)
    :__Filter by__
    - recordFrom
    - recordTo
    ;
else (No)
endif

:Set http code = 200;
:Return Http response;

stop
@enduml

Enjoy,
Regards,
<a fan user>
Th.

commented Oct 13, 2022 by luckyP
Thank you so much, i know the rule now
commented Oct 24, 2022 by Todd Musheno (2,680 points)
Sounds like a documentation issue.
...