Class: Caixanegra::API::Designer::FlowsController

Inherits:
Caixanegra::APIController show all
Defined in:
app/controllers/caixanegra/api/designer/flows_controller.rb

Instance Method Summary collapse

Instance Method Details

#debug_runObject



19
20
21
22
23
24
25
26
27
# File 'app/controllers/caixanegra/api/designer/flows_controller.rb', line 19

def debug_run
  execution = Caixanegra::Executor.new(
    initial_carryover: initial_carryover,
    flow_definition: @flow,
    debug_mode: true
  ).run

  render json: { result: execution[:result], debug: execution[:debug] }
end

#showObject



9
10
11
# File 'app/controllers/caixanegra/api/designer/flows_controller.rb', line 9

def show
  render json: @flow
end

#updateObject



13
14
15
16
17
# File 'app/controllers/caixanegra/api/designer/flows_controller.rb', line 13

def update
  Caixanegra::Manager.set(params[:id], JSON.parse(request.body.read))

  head :ok
end