autonumber result seems wrong in nested lifeline

0 votes
asked Oct 27 in Question / help by anonymous
i got sequence no 1 to 9。 how to make it "1,2, 2.1,2.2..."
@startuml
hide footbox
autonumber
scale 0.5
!pragma teoz true
skinparam shadowing false
participant "PROG\nZZZ_RECURSIVE" as 2
participant "ObjectId:7 of Class LCL_CLASS\nZZZ_RECURSIVE" as 3
2 -> 3: Call method ADD
activate 3
3 -> 3: Call method ADD
activate 3
3 -> 3: Call method ADD
activate 3
3 -> 3: Call method ADD
activate 3
3 -> 3: Call method ADD
activate 3
3 -> 3: Call method ADD
activate 3
deactivate 3
deactivate 3
deactivate 3
deactivate 3
deactivate 3
3 --> 2
deactivate 3
loop 2 times
2 -> 2:  SYSTEM-EXIT
activate 2
deactivate 2
2 --> 1
deactivate 2
end
@enduml

1 Answer

0 votes
answered Oct 27 by plantuml (184,600 points)

This is not documented and exactly what you are looking for, but you can have:

@startuml
autonumber 1.1.1
Alice -> Bob: Authentication request
Bob --> Alice: Response

autonumber inc B
'Now we have 1.2.1
Dave -> Foobar: TestA
Foobar --> Dave: Another testB

autonumber inc A
'Now we have 2.1.1
Dave -> Foobar: TestC
Foobar --> Dave: Another testD

autonumber inc B
'Now we have 2.2.1
Dave -> Foobar: TestE
Foobar --> Dave: Another testF
@enduml

http://www.plantuml.com/plantuml/uml/XT2npe8m40VmlKznspVn9J8o68h8w61yWOANq0JkjBt2wtlYeZ5WEZNtp-z_kJAA2vB6mRWaJ6biCS3kNv-nW-yGiZrKt1PWa_H8uZiddWa2tXD6CJg3J3DBk80pnXjJHFFEUUgWCdyddc56wDs4sf1hG-scfQ1XRbqeuAAYDQ_VeZu3MasitG54nzMNR3zbTLVamxPS_zevNztvk2qtfaIwweqV

commented Oct 27 by anonymous
Thanks
is there any way that  'autonumber' keywords works with 'activate' keywords and  detects differenct  layout automatically
...