def _fail_workflow(self, final_context, msg):
if states.is_paused_or_completed(self.wf_ex.state):
return
output_on_error = {}
try: output_on_error = data_flow.evaluate_workflow_output( self.wf_ex, self.wf_spec.get_output_on_error(), final_context
)
except exc.MistralException as e:
msg = ( "Failed to evaluate expression in output-on-error! " "(output-on-error: '%s', exception: '%s' Cause: '%s'"
% (self.wf_spec.get_output_on_error(), e, msg)
) LOG.error(msg)
self.set_state(states.ERROR, state_info=msg)
# When we set an ERROR state we should safely set output value getting
# w/o exceptions due to field size limitations.
msg = utils.cut_by_kb(
msg, cfg.CONF.engine.execution_field_size_limit_kb
)
if self.wf_ex.task_execution_id: self._schedule_send_result_to_parent_workflow()
So, we first utils.cut_by_kb() for "msg" but then, essentially, add 'output_on_error' to it so the resulting size of 'output' may be greater than cfg.CONF.engine.execution_field_size_limit_kb
The method looks like:
def _fail_workflow( self, final_context, msg): is_paused_ or_completed( self.wf_ ex.state) :
if states.
return
try:
)
except exc.MistralExce
msg = (
% (self.wf_
)
# When we set an ERROR state we should safely set output value getting
cfg. CONF.engine. execution_ field_size_ limit_kb
# w/o exceptions due to field size limitations.
msg = utils.cut_by_kb(
msg,
)
if self.wf_ ex.task_ execution_ id:
self. _schedule_ send_result_ to_parent_ workflow( )
So, we first utils.cut_by_kb() for "msg" but then, essentially, add 'output_on_error' to it so the resulting size of 'output' may be greater than cfg.CONF. engine. execution_ field_size_ limit_kb