def populate_module_and_state(trans, workflow, param_map, allow_tool_state_corrections=False, module_injector=None):
 if (module_injector is None):
  module_injector = WorkflowModuleInjector(trans, allow_tool_state_corrections)
 for step in workflow.steps:
  step_args = param_map.get(step.id, {})
  step_errors = module_injector.inject(step, step_args=step_args)
  if step_errors:
   raise exceptions.MessageException(step_errors, err_data={step.order_index: step_errors})
  if step.upgrade_messages:
   if allow_tool_state_corrections:
    log.debug('Workflow step "%i" had upgrade messages: %s', step.id, step.upgrade_messages)
   else:
    raise exceptions.MessageException(step.upgrade_messages, err_data={step.order_index: step.upgrade_messages})

def populate_module_and_state ( trans , workflow , param_map , allow_tool_state_corrections = False , module_injector = None ) : if ( module_injector is None ) : module_injector = WorkflowModuleInjector ( trans , allow_tool_state_corrections ) for step in workflow . steps : step_args = param_map . get ( step . id , { } ) step_errors = module_injector . inject ( step , step_args = step_args ) if step_errors : raise exceptions . MessageException ( step_errors , err_data = { step . order_index : step_errors } ) if step . upgrade_messages : if allow_tool_state_corrections : log . debug ( 'Workflow step "%i" had upgrade messages: %s' , step . id , step . upgrade_messages ) else : raise exceptions . MessageException ( step . upgrade_messages , err_data = { step . order_index : step . upgrade_messages } )
used by api but not web controller .