Preamble
BCMS (requirements definition doc. ⤳ PDF ) is a software case study,
which is implemented in State Chart XML -SCXML- and
PauWare .
PauWare is a Java engine for executing
Harel's Statecharts in general.
Application Programming Interface -API-: Javadoc .
Resources
BCMS SCXML document
BCMS.scxml .
For editing purposes, you may use a simple editor
SCXML-editor.jar
with associated execution statement: java -jar SCXML-editor.jar
Java SE application as a Maven project
BCMS.PauWare2Web.zip
Installation requirements
This application has been designed and tested by means of PauWare ver. 2.0 (a.k.a. PauWare2 , Sept. 2021).
This application also reuses PauWare2Web , a PauWare2 add-on, which allows the dynamic simulation of Harel's Statecharts in a Web browser.
While PauWare2 is based on Java 9,
PauWare2Web requires Java 11 .
After downloading BCMS.PauWare2Web.zip ,
PauWare2
PauWare2.zip
and PauWare2Web
PauWare2Web.zip
must be made accessible as Maven dependencies.
PauWare2Web itself requires third-party libraries that are downloaded by Maven :
Java API for Processing JSON software is linked to PauWare2Web as a runtime library.
PlantUML Java software is linked to PauWare2Web as a runtime library.
Graphviz software (required by PlantUML ) is a priori installed on Windows .
Graphviz software on macOS may be installed using Homebrew
(see also here …).
Tyrus Java software is linked to PauWare2Web as a runtime library.
Note that PauWare2Web can be bypassed in the code (no Web visualization then) by commenting/removing in BCMS.java
what follows:
_BCMS_state_machine = new com.pauware.pauware_engine.Core.StateMachine(… /*, new com.pauware.pauware2web.PauWare2Web_client()*/);
Specification (statechart) as full-size SVG image
BCMS Step_3_Coordination allow: timeout/BCMS.record_timeout_reason(Long,String) exit/ BCMS.to_be_killed Route_for_police_vehicles_fixed→ Route_for_fire_trucks_fixed→ Fire_trucks_arriving→ Police_vehicles_arriving→ Completion_of_objectives Step_5_Arrival allow: crisis is less severe/BCMS.recall_fire_truck allow: crisis is less severe/BCMS.recall_police_vehicle allow: crisis is less severe/^BCMS.enough_fire_trucks_arrived allow: crisis is less severe/^BCMS.enough_police_vehicles_arrived allow: fire truck breakdown/BCMS.breakdown_fire_truck(String,String) allow: police vehicle breakdown/BCMS.breakdown_police_vehicle(String,String) Police_vehicles_arrival →Completion_of_objectives Police_vehicles_arriving All_police_vehicles_arrived invariant: [BCMS.PV_arrived_greater_or_equal_to_PV_dispatched] enough_police_vehicles_arrived[BCMS.no_more_dispatched_police_vehicles_and_not_in_All_fire_trucks_arrived] police_vehicle_arrived/BCMS.arrive_police_vehicle(String);^BCMS.enough_police_vehicles_arrived enough_police_vehicles_arrived[BCMS.no_more_dispatched_police_vehicles_and_in_All_fire_trucks_arrived] Fire_trucks_arrival →Completion_of_objectives Fire_trucks_arriving All_fire_trucks_arrived invariant: [BCMS.FT_arrived_greater_or_equal_to_FT_dispatched] fire_truck_arrived/BCMS.arrive_fire_truck(String);^BCMS.enough_fire_trucks_arrived enough_fire_trucks_arrived[BCMS.no_more_dispatched_fire_trucks_and_not_in_All_police_vehicles_arrived] enough_fire_trucks_arrived[BCMS.no_more_dispatched_fire_trucks_and_in_All_police_vehicles_arrived] All_police_vehicles_dispatched invariant: [BCMS.PV_dispatched_equal_to_PV_required] Init FSC_connected PSC_connected Crisis_details_exchange entry/ BCMS.to_be_killed entry/ BCMS.to_be_set(Long) Step_4_Dispatching All_fire_trucks_dispatched invariant: [BCMS.FT_dispatched_equal_to_FT_required] End_of_crisis →Route_for_fire_trucks_fixed →Route_for_police_vehicles_fixed Number_of_fire_truck_defined Steps_33a1_33a2_Negotiation Route_for_police_vehicles_development →Step_4_Dispatching Route_plan_development→ Route_for_police_vehicles_to_be_proposed Route_for_police_vehicles_fixed Route_for_police_vehicles_approved FSC_agrees_about_police_vehicle_route[BCMS.not_in_Route_for_fire_trucks_approved] FSC_agrees_about_police_vehicle_route[BCMS.in_Route_for_fire_trucks_approved] FSC_disagrees_about_police_vehicle_route route_for_police_vehicles route_for_police_vehicles Route_for_fire_trucks_development →Step_4_Dispatching Route_plan_development→ Route_for_fire_trucks_to_be_proposed Route_for_fire_trucks_approved Route_for_fire_trucks_fixed FSC_agrees_about_fire_truck_route[BCMS.in_Route_for_police_vehicles_approved] route_for_fire_trucks route_for_fire_trucks FSC_agrees_about_fire_truck_route[BCMS.not_in_Route_for_police_vehicles_approved] FSC_disagrees_about_fire_truck_route Route_plan_development Number_of_police_vehicle_defined enough_police_vehicles_dispatched[BCMS.police_vehicle_dispatched_greater_than_or_equal_to_number_of_police_vehicle_required] state_police_vehicle_number/BCMS.set_number_of_police_vehicle_required(Integer) enough_fire_trucks_dispatched[BCMS.fire_truck_dispatched_greater_than_or_equal_to_number_of_fire_truck_required] PSC_connection_request FSC_agrees_about_police_vehicle_route[BCMS.in_Route_for_fire_trucks_approved] fire_truck_dispatched[BCMS.fire_truck_dispatched_less_than_number_of_fire_truck_required]/BCMS.dispatch_fire_truck(String);^BCMS.enough_fire_trucks_dispatched FSC_connection_request fire_truck_dispatched[BCMS.fire_truck_dispatched_less_than_number_of_fire_truck_required]/BCMS.dispatch_fire_truck(String);^BCMS.enough_fire_trucks_dispatched police_vehicle_dispatched[BCMS.police_vehicle_dispatched_less_than_number_of_police_vehicle_required]/BCMS.dispatch_police_vehicle(String);^BCMS.enough_police_vehicles_dispatched FSC_agrees_about_fire_truck_route[BCMS.in_Route_for_police_vehicles_approved] enough_police_vehicles_dispatched[BCMS.police_vehicle_dispatched_greater_than_or_equal_to_number_of_police_vehicle_required] close state_fire_truck_number/BCMS.set_number_of_fire_truck_required(Integer) crisis_is_more_severe fire_truck_blocked/BCMS.block_fire_truck(String) police_vehicle_blocked/BCMS.block_police_vehicle(String) PSC_connection_request FSC_connection_request police_vehicle_dispatched[BCMS.police_vehicle_dispatched_less_than_number_of_police_vehicle_required]/BCMS.dispatch_police_vehicle(String);^BCMS.enough_police_vehicles_dispatched enough_fire_trucks_arrived[BCMS.no_more_dispatched_fire_trucks_and_in_All_police_vehicles_arrived] enough_police_vehicles_arrived[BCMS.no_more_dispatched_police_vehicles_and_in_All_fire_trucks_arrived] enough_fire_trucks_dispatched[BCMS.fire_truck_dispatched_greater_than_or_equal_to_number_of_fire_truck_required] state_fire_truck_number/BCMS.set_number_of_fire_truck_required(Integer) route_for_fire_trucks state_police_vehicle_number/BCMS.set_number_of_police_vehicle_required(Integer) route_for_police_vehicles no_more_route_left