
digraph {
  bgcolor="transparent"

  node [penwidth=0.5 fontsize="12" shape="box" style="filled" fontcolor="white" fontname="Courier New"]
  edge [penwidth=2 fontsize="10" color="#0A1931" arrowsize=0.8 fontname="Courier New"]

#########
# NODES #
#########
  begin [id="begin#Begin" pos="0.0,10000.0!" height=0.4 width=1.0 fixedsize=true group="fun-main"    label="Begin" tooltip="Begin" shape="ellipse" fillcolor="#8de4ff" color="#00799e" fontcolor="#982b13"] 
  declare_seats [id="declare_seats#Declare" pos="0.0,9999.0625!" height=0.4 width=1.19 fixedsize=true group="fun-main"    label="seats = 0" tooltip="seats: Integer = 0" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  declare_people [id="declare_people#Declare" pos="0.0,9998.125!" height=0.4 width=1.3 fixedsize=true group="fun-main"    label="people = 0" tooltip="people: Integer = 0" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  ask_seats [id="ask_seats#Output" pos="0.0,9997.1875!" height=0.4 width=4.38 fixedsize=true group="fun-main"    label="\"Скільки комп’ютерних місць вільні?\"" tooltip="\"Скільки комп’ютерних місць вільні?\"" shape="trapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  input_seats [id="input_seats#Input" pos="0.0,9996.25!" height=0.4 width=1.0 fixedsize=true group="fun-main"    label="seats" tooltip="seats" shape="invtrapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  ask_people [id="ask_people#Output" pos="0.0,9995.3125!" height=0.4 width=4.930000000000001 fixedsize=true group="fun-main"    label="\"Скільки людей хочуть забронювати місця?\"" tooltip="\"Скільки людей хочуть забронювати місця?\"" shape="trapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  input_people [id="input_people#Input" pos="0.0,9994.375!" height=0.4 width=1.0 fixedsize=true group="fun-main"    label="people" tooltip="people" shape="invtrapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  validate [id="validate#If" pos="0.0,9993.4375!" height=0.5 width=3.14 fixedsize=true group="fun-main" 
    label="seats < 0 || people <= 0" tooltip="seats < 0 || people <= 0" shape="diamond" fillcolor="#ffd166" color="#8f6400" fontcolor="black"]
  
  true_dummy_up_validate [pos="8.75,9993.4375!" shape=point width=0]
  false_dummy_up_validate [pos="-6.25,9993.4375!" shape=point width=0]
  
  error_message [id="error_message#Output" pos="8.75,9992.5!" height=0.4 width=10.76 fixedsize=true group="invalid_data"    label="\"Помилка: кількість місць не може бути від’ємною, а кількість людей має бути більшою за нуль.\"" tooltip="\"Помилка: кількість місць не може бути від’ємною, а кількість людей має бути більшою за нуль.\"" shape="trapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  check_capacity [id="check_capacity#If" pos="-6.25,9992.5!" height=0.5 width=2.15 fixedsize=true group="valid_data" 
    label="seats >= people" tooltip="seats >= people" shape="diamond" fillcolor="#ffd166" color="#8f6400" fontcolor="black"]
  
  true_dummy_up_check_capacity [pos="-3.75,9992.5!" shape=point width=0]
  false_dummy_up_check_capacity [pos="-10.0,9992.5!" shape=point width=0]
  
  confirm [id="confirm#Output" pos="-3.75,9991.5625!" height=0.4 width=3.2800000000000002 fixedsize=true group="booking_success"    label="\"Бронювання підтверджено!\"" tooltip="\"Бронювання підтверджено!\"" shape="trapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  remaining_label [id="remaining_label#Output" pos="-3.75,9990.625!" height=0.4 width=3.39 fixedsize=true group="booking_success"    label="\"Залишилося вільних місць:\"" tooltip="\"Залишилося вільних місць:\"" shape="trapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  remaining_value [id="remaining_value#Output" pos="-3.75,9989.6875!" height=0.4 width=1.74 fixedsize=true group="booking_success"    label="seats - people" tooltip="seats - people" shape="trapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  offer_other_time [id="offer_other_time#Output" pos="-10.0,9991.5625!" height=0.4 width=5.92 fixedsize=true group="booking_failed"    label="\"Місць недостатньо. Запропонуйте групі інший час.\"" tooltip="\"Місць недостатньо. Запропонуйте групі інший час.\"" shape="trapezium" fillcolor="#015692" color="#002a3a" fontcolor="white"] 
  
  true_dummy_down_check_capacity [ pos="-3.75,9988.75!" shape=point width=0]
  false_dummy_down_check_capacity [ pos="-10.0,9988.75!" shape=point width=0]
  
  end_check_capacity [id="end_check_capacity#IfEnd" class="flowrun-not-selectable" pos="-6.25,9988.75!" group="valid_data" fillcolor="#ffd166" color="#8f6400" fontcolor="black"
    label="" tooltip=" " shape="circle" fixedsize=true width=0.2 height=0.2]
  
  
  
  true_dummy_down_validate [ pos="8.75,9987.8125!" shape=point width=0]
  false_dummy_down_validate [ pos="-6.25,9987.8125!" shape=point width=0]
  
  end_validate [id="end_validate#IfEnd" class="flowrun-not-selectable" pos="0.0,9987.8125!" group="fun-main" fillcolor="#ffd166" color="#8f6400" fontcolor="black"
    label="" tooltip=" " shape="circle" fixedsize=true width=0.2 height=0.2]
  
  
  end [id="end#Return" pos="0.0,9986.875!" height=0.4 width=1.0 fixedsize=true group="fun-main"    label="End" tooltip="End" shape="ellipse" fillcolor="#8de4ff" color="#00799e" fontcolor="#982b13"] 

#########
# EDGES #
#########
  begin:s -> declare_seats:n [id="begin@fun-main" tailtooltip=" " edgetooltip=" "]
  declare_seats:s -> declare_people:n [id="declare_seats@fun-main" tailtooltip=" " edgetooltip=" "]
  declare_people:s -> ask_seats:n [id="declare_people@fun-main" tailtooltip=" " edgetooltip=" "]
  ask_seats:s -> input_seats:n [id="ask_seats@fun-main" tailtooltip=" " edgetooltip=" "]
  input_seats:s -> ask_people:n [id="input_seats@fun-main" tailtooltip=" " edgetooltip=" "]
  ask_people:s -> input_people:n [id="ask_people@fun-main" tailtooltip=" " edgetooltip=" "]
  input_people:s -> validate:n [id="input_people@fun-main" tailtooltip=" " edgetooltip=" "]
  ## IF-TRUE
  validate:e -> true_dummy_up_validate [id="validate@invalid_data" tailtooltip=" " edgetooltip=" " arrowhead=none taillabel="true" fontcolor="forestgreen"]
  true_dummy_up_validate -> error_message:n [id="validate@invalid_data" tailtooltip=" " edgetooltip=" "]
  
  error_message:s -> true_dummy_down_validate:n [id="error_message@invalid_data" tailtooltip=" " edgetooltip=" " arrowhead=none]
  
  true_dummy_down_validate -> end_validate [id="error_message@invalid_data" tailtooltip=" " edgetooltip=" "]
  
  
  ## IF-FALSE
  validate:w -> false_dummy_up_validate [id="validate@valid_data" tailtooltip=" " edgetooltip=" " arrowhead=none taillabel="false" fontcolor="red"]
  false_dummy_up_validate -> check_capacity:n [id="validate@valid_data" tailtooltip=" " edgetooltip=" "]
  
  ## IF-TRUE
  check_capacity:e -> true_dummy_up_check_capacity [id="check_capacity@booking_success" tailtooltip=" " edgetooltip=" " arrowhead=none taillabel="true" fontcolor="forestgreen"]
  true_dummy_up_check_capacity -> confirm:n [id="check_capacity@booking_success" tailtooltip=" " edgetooltip=" "]
  
  confirm:s -> remaining_label:n [id="confirm@booking_success" tailtooltip=" " edgetooltip=" "]
  remaining_label:s -> remaining_value:n [id="remaining_label@booking_success" tailtooltip=" " edgetooltip=" "]
  remaining_value:s -> true_dummy_down_check_capacity:n [id="remaining_value@booking_success" tailtooltip=" " edgetooltip=" " arrowhead=none]
  
  true_dummy_down_check_capacity -> end_check_capacity [id="remaining_value@booking_success" tailtooltip=" " edgetooltip=" "]
  
  
  ## IF-FALSE
  check_capacity:w -> false_dummy_up_check_capacity [id="check_capacity@booking_failed" tailtooltip=" " edgetooltip=" " arrowhead=none taillabel="false" fontcolor="red"]
  false_dummy_up_check_capacity -> offer_other_time:n [id="check_capacity@booking_failed" tailtooltip=" " edgetooltip=" "]
  
  offer_other_time:s -> false_dummy_down_check_capacity:n [id="offer_other_time@booking_failed" tailtooltip=" " edgetooltip=" " arrowhead=none]
  
  false_dummy_down_check_capacity -> end_check_capacity [id="offer_other_time@booking_failed" tailtooltip=" " edgetooltip=" "]
  
  ## IF-END
  end_check_capacity:s -> false_dummy_down_validate:n [id="end_check_capacity@valid_data" tailtooltip=" " edgetooltip=" " arrowhead=none]
  
  
  
  false_dummy_down_validate -> end_validate [id="check_capacity@valid_data" tailtooltip=" " edgetooltip=" "]
  
  ## IF-END
  end_validate:s -> end:n [id="end_validate@fun-main" tailtooltip=" " edgetooltip=" "]
  

}
