@startuml
!include https://raw.githubusercontent.com/johthor/DomainStory-PlantUML/main/domainStory.puml
'!include ../domainStory.puml

!include <material/bus>
!unquoted procedure Bus($name, $label = "", $color = "", $scale = "")
    Object("Bus", "$ma_bus", $name, $label, $color, $scale)
!endprocedure

Person(agent, gate agent)
Person(dispatcher ,bus dispatcher)
System(dispatching, bus dispatching)
Person(driver, bus driver)
Group(passengers)

Boundary(contracting) {
    Call(busCall, bus)
    Document(jobOrder, job to order)
    Call(order)
}

Boundary(transport) {
    Bus(bus)
}

Boundary(logging) {
    Document(details1, details of the journey)
    Document(details2, details of the journey)
    Document(details3, details of the journey)
    note right of details1
        Disruptions,
        number of
        passengers
        transported, etc.
    end note
}

activity(_, agent, orders, busCall, from, dispatcher)
activity(_, dispatcher, creates, jobOrder, in, dispatching, <--, -->)
activity(_, dispatcher, gives, order, to, driver)
activity(_, driver, transports by, bus, passengers, _, <--)
activity(_, driver, logs, details1)
activity(_, driver, hands over, details2, at the end of the shift to, dispatcher)
activity(_, dispatcher, enters, details3, in, dispatching, -->, <--)

contracting -[hidden]> transport
@enduml
