Class: StackMate::WaitConditionHandle

Inherits:
Ruote::Participant
  • Object
show all
Includes:
Logging
Defined in:
lib/stackmate/participants/common.rb

Instance Method Summary collapse

Methods included from Logging

configure_logger_for, #logger, logger_for

Instance Method Details

#on_workitemObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/stackmate/participants/common.rb', line 9

def on_workitem
  logger.debug "Entering #{participant_name} "
  workitem[participant_name] = {}
  presigned_url = 'http://localhost:4567/waitcondition/' + workitem.fei.wfid + '/' + participant_name
  workitem.fields['ResolvedNames'][participant_name] = presigned_url
  logger.info "Your pre-signed URL is: #{presigned_url} "
  logger.info "Try: \ncurl -X PUT --data 'foo' #{presigned_url}"
  WaitCondition.create_handle(participant_name, presigned_url)
  workitem[participant_name][:physical_id] = presigned_url

  reply
end