lib/jflow/activity/task.rb in jflow-0.2.6 vs lib/jflow/activity/task.rb in jflow-0.2.8

- old
+ new

@@ -22,10 +22,18 @@ def token task.task_token end + def run_id + task.workflow_execution.run_id + end + + def workflow_id + task.workflow_execution.workflow_id + end + def klass @klass_value ||= JFlow.configuration.activity_map.klass_for(name,version) raise "Could not find code to run for given activity" unless @klass_value @klass_value end @@ -45,17 +53,19 @@ log "Result is #{result.class} #{result}" completed!(result) end def completed!(result) + log "Task Completed" swf_client.respond_activity_task_completed({ task_token: token, result: result, }) end def failed!(exception) + log "Task Failed #{exception.message}" swf_client.respond_activity_task_failed({ task_token: token, reason: exception.message, details: exception.backtrace ? exception.backtrace.join("\n") : "no stacktrace", }) \ No newline at end of file