code: def run_worker(wname, data, engine_uuid_hex=None, **kwargs):
      
      if 'stop_on_halt' not in kwargs:
          kwargs['stop_on_halt'] = False
  
      if engine_uuid_hex:
          engine_uuid = uuid.UUID(hex=engine_uuid_hex)
          engine = WorkflowEngine.from_uuid(uuid=engine_uuid, **kwargs)
      else:
          engine = WorkflowEngine.with_name(wname, **kwargs)
          engine.save()
  
      objects = get_workflow_object_instances(data, engine)
      db.session.commit()
      engine.process(objects, **kwargs)
      return engine
docs: Run a workflow by name with list of data objects.
  
      The list of data can also contain WorkflowObjects.
  
      ``**kwargs`` can be used to pass custom arguments to the engine/object.
  
      :param wname: name of workflow to run.
      :type wname: str
  
      :param data: objects to run through the workflow.
      :type data: list
  
      :param engine_uuid_hex: hex string of the uuid of the engine to use, if
          not passed will create a new one.
      :type data: str
  
      :return: WorkflowEngine instance