@startuml new_jet_flow
title New Jet Flow

start

:New jet is created;
:Build jet dependencies;
while (For every dependency)
  if (Required jet exists?) then (Yes)
      if (In the required state?) then (Yes)
        :Save jet in the dependency;
      else (No)
        :Create a jet request to bring\nthis jet to the required state;
      endif
    else (No)
    :Create a jet request for a new jet;
  endif
endwhile

stop
@enduml


@startuml jet_request_flow
title Jet Request Flow
|Requesting Jet|
:Need for a jet in a specific state;

if (Jet available?) then (Yes)
  if (In the required state?) then (Yes)
    if (Jet is busy?) then (no)
      :Ask to go to the required state;
    else (Yes)
      :Create a jet request to bring\nthis jet to the required state;
      |Requested Jet|
      :Finalize the current operation;
      :Check for pending requests;
      if (Pending requests?) then (Yes)
        while (Pending requests?)
          :Process the request;
          :Callback the request issuer;
        endwhile
      endif
    endif
  else (No)
    :Ask to go to the required state;
  endif
else (No)
  |Requesting Jet|
  :Create a jet request for a new jet;
endif
stop
@enduml

@startuml jet_state_transition
title Jet State Transition

start

:Update dependencies;
if (All dependencies satisfied?) then (Yes)
  while (Actions to reach the required state)
    :Execute the action;
    if (Pending requests?) then (Yes)
      while (For every pending request)
      :Process the request;
      :Callback the request issuer;
  endwhile
endif

  endwhile
else (No)
  :Wait for dependencies;
endif

stop
@enduml
