Why is this code not working in draw.io? what would be the fix?

0 votes
asked Nov 27, 2023 in Question / help by anonymous
@startuml

!define RECTANGLE class
!define END_RECTANGLE }

!define OVAL usecase
!define END_OVAL }

!define SYSTEM component
!define END_SYSTEM }

RECTANGLE "User" {
  +Login
  +ViewProfile
  +SearchServices
  +ApplyForAssistance
  +ViewHistory
}

RECTANGLE "Social Worker" {
  +ViewCases
  +ProcessApplications
  +ScheduleAppointments
}

SYSTEM "ExternalSystem" {
  +ProcessPayments
}

USER -[hidden]-> (Login)
USER --> (ViewProfile)
USER --> (SearchServices)
USER --> (ApplyForAssistance)
USER --> (ViewHistory)

(ScheduleAppointments) <-- SocialWorker
(ViewCases) <-- SocialWorker
(ProcessApplications) <-- SocialWorker

(ProcessPayments) <-- ExternalSystem

@enduml

1 Answer

0 votes
answered Nov 27, 2023 by The-Lu (74,900 points)

Hi A., and all,

Don't mix class and usecase/component diagram, as it.

Here is a proposal:

@startuml

!define RECTANGLE package
'!define END_RECTANGLE }

!define OVAL usecase
'!define END_OVAL }

!define SYSTEM component
'!define END_SYSTEM }

RECTANGLE USER [
  +Login
  +ViewProfile
  +SearchServices
  +ApplyForAssistance
  +ViewHistory
]

RECTANGLE SocialWorker [
  +ViewCases
  +ProcessApplications
  +ScheduleAppointments
]

SYSTEM ExternalSystem [
  =ExternalSystem
  +ProcessPayments
]

USER -[hidden]-> (Login)
USER --> (ViewProfile)
USER --> (SearchServices)
USER --> (ApplyForAssistance)
USER --> (ViewHistory)

(ScheduleAppointments) <-- SocialWorker
(ViewCases) <-- SocialWorker
(ProcessApplications) <-- SocialWorker

(ProcessPayments) <-- ExternalSystem

@enduml

Regards,
Th.

...