Skip to content

Conversation

@kirchsth
Copy link
Member

Instead of the increment() and setIndex() functions the user can use Index(), LastIndex() and SetIndex() directly in the RelIndex(...) macro. (The already existing Increment() and setIndex() functions works unchanged)

The new notation is shorter (and I think simpler) like below

Rel_D(customer, app, "Updates his profile using", "HTTPS")
Rel(app, customer_service, "Updates customer information using", "JSON/HTTPS")
Rel_R(customer_service, customer_db, "Stores data in", "JDBC")

RelIndex_D(Index()-1, customer_service, message_bus, "Sends customer update events to", "async")
RelIndex_U(LastIndex()-2, customer_service, app, "Confirm update to", "async")

RelIndex_L(Index()-1, message_bus, reporting_service, "Sends customer update events to", "async")
RelIndex(Index()-1, reporting_service, reporting_db, "Stores data in")

RelIndex_R(SetIndex(5)-2, message_bus, audit_service, "Sends customer update events to", "async")
RelIndex(Index()-2, audit_service, audit_store, "Stores events in")

compared to the existing one.

Rel_D(customer, app, "Updates his profile using", "HTTPS")
Rel(app, customer_service, "Updates customer information using", "JSON/HTTPS")
Rel_R(customer_service, customer_db, "Stores data in", "JDBC")

RelIndex_D($index-1, customer_service, message_bus, "Sends customer update events to", "async")
RelIndex_U($index-2, customer_service, app, "Confirm update to", "async")
increment()

RelIndex_L($index-1, message_bus, reporting_service, "Sends customer update events to", "async")
increment()
RelIndex($index-1, reporting_service, reporting_db, "Stores data in")

setIndex(5)
RelIndex_R($index-2, message_bus, audit_service, "Sends customer update events to", "async")
increment()
RelIndex($index-2, audit_service, audit_store, "Stores events in")

This PR need the new PlantUML verson V1.2020.24 (it can be already tested with the online server http://www.plantuml.com/plantuml/ it has the V1.2020.24beta4)

@kirchsth kirchsth changed the title #95 Dynamic diagrams supports Index(), LastIndex() and SetIndex() #96 Dynamic diagrams supports Index(), LastIndex() and SetIndex() Dec 18, 2020
@Potherca Potherca merged commit d9dac90 into plantuml-stdlib:master Feb 18, 2021
@Potherca Potherca added this to the v2.1.0 milestone Apr 4, 2021
@kirchsth kirchsth deleted the feature/95 branch July 4, 2021 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants