gobravedave / Enterprise-Architect

scripts and other code snippets to extend Sparxs Enterprise Architect
BSD 2-Clause "Simplified" License
51 stars 12 forks source link

Converting PlantUML sources that start with omit or deactivate in initialization, etc., causes activity to go wrong. #14

Closed Takashi-K-TakaTech closed 1 year ago

Takashi-K-TakaTech commented 2 years ago

PlantUML sources that cause problems:

@startuml PreActionTbl_Main
boss ->> part1 : Open
activate part1
boss ->> part2 : power off
deactivate part2
alt wait for complete of open
   part1 -->> boss : notify complete
   deactivate part1
end
boss ->> part2 : power on
activate part2
alt wait for complete of power on
   part2 -->> boss : notify power on
end
boss -> boss : wait 2 min
boss ->> part2 : power off
alt wait for complete of power off
   part2 -->> boss : notify power off
   deactivate part2
end
@enduml

Removing the first 'deactivate part2' line on the source caused the same problem.

gobravedave commented 1 year ago

Hi @Takashi-K-TakaTech the script actually ignores activate and deactivate commands.. as EA manage synchronous and return as connector attributes..

The script does support the following activation/deactivations..

`@startuml main ->> job : test1 cmd alt wait response job ->> main : complete test1 end main ->> job : test2 cmd alt wait response job ->> main : complete test2 end main -> job++ : test3 cmd return complete test3

main -> job : test4 cmd job -->main:complete test 4

main -> job++ : test5 cmd job -->main--:complete test 5

main -> job : test6 cmd main <-- job:complete test 6

@enduml ` After making this change.. i was not able to replicate your problem..

oh.. you seem to use -->> in your scripts.. I am not familiar with this.. I covert it to --> to be the return leg od an asynchronous call.

thanks again, David.