cwltool.workflow_job
====================

.. py:module:: cwltool.workflow_job


Classes
-------

.. autoapisummary::

   cwltool.workflow_job.WorkflowJobStep
   cwltool.workflow_job.ReceiveScatterOutput
   cwltool.workflow_job.WorkflowJob
   cwltool.workflow_job.WorkflowJobLoopStep


Functions
---------

.. autoapisummary::

   cwltool.workflow_job.parallel_steps
   cwltool.workflow_job.nested_crossproduct_scatter
   cwltool.workflow_job.crossproduct_size
   cwltool.workflow_job.flat_crossproduct_scatter
   cwltool.workflow_job.dotproduct_scatter
   cwltool.workflow_job.match_types
   cwltool.workflow_job.object_from_state


Module Contents
---------------

.. py:class:: WorkflowJobStep(step)

   Generated for each step in Workflow.steps().


   .. py:attribute:: step


   .. py:attribute:: tool


   .. py:attribute:: id


   .. py:attribute:: submitted
      :value: False



   .. py:attribute:: iterable
      :type:  cwltool.utils.JobsGeneratorType | None
      :value: None



   .. py:attribute:: completed
      :value: False



   .. py:attribute:: name


   .. py:method:: job(joborder, output_callback, runtimeContext)


.. py:class:: ReceiveScatterOutput(output_callback, dest, total)

   Produced by the scatter generators.


   .. py:attribute:: dest


   .. py:attribute:: processStatus
      :value: 'success'



   .. py:attribute:: total


   .. py:attribute:: output_callback


   .. py:attribute:: steps
      :type:  list[cwltool.utils.JobsGeneratorType | None]
      :value: []



   .. py:property:: completed
      :type: int


      The number of completed internal jobs.



   .. py:method:: receive_scatter_output(index, jobout, processStatus)

      Record the results of a scatter operation.



   .. py:method:: setTotal(total, steps)

      Set the total number of expected outputs along with the steps.

      This is necessary to finish the setup.



.. py:function:: parallel_steps(steps, rc, runtimeContext)

.. py:function:: nested_crossproduct_scatter(process, joborder, scatter_keys, output_callback, runtimeContext)

.. py:function:: crossproduct_size(joborder, scatter_keys)

   Compute the size of a cross product.


.. py:function:: flat_crossproduct_scatter(process, joborder, scatter_keys, output_callback, runtimeContext)

.. py:function:: dotproduct_scatter(process, joborder, scatter_keys, output_callback, runtimeContext)

.. py:function:: match_types(sinktype, src, iid, inputobj, linkMerge, valueFrom)

.. py:function:: object_from_state(state, params, frag_only, supportsMultipleInput, sourceField, incomplete = False)

.. py:class:: WorkflowJob(workflow, runtimeContext)

   Generates steps from the Workflow.


   .. py:attribute:: workflow


   .. py:attribute:: tool


   .. py:attribute:: steps


   .. py:attribute:: state
      :type:  dict[str, cwltool.utils.WorkflowStateItem | None]


   .. py:attribute:: processStatus
      :value: ''



   .. py:attribute:: did_callback
      :value: False



   .. py:attribute:: made_progress
      :type:  bool | None
      :value: None



   .. py:attribute:: outdir


   .. py:attribute:: name


   .. py:method:: do_output_callback(final_output_callback)


   .. py:method:: receive_output(step, outputparms, final_output_callback, jobout, processStatus)


   .. py:method:: try_make_job(step, final_output_callback, runtimeContext)


   .. py:method:: run(runtimeContext, tmpdir_lock = None)

      Log the start of each workflow.



   .. py:method:: job(joborder, output_callback, runtimeContext)


.. py:class:: WorkflowJobLoopStep(step, container_engine)

   Generated for each step in Workflow.steps() containing a `loop` directive.


   .. py:attribute:: step
      :type:  WorkflowJobStep


   .. py:attribute:: container_engine
      :type:  str


   .. py:attribute:: joborder
      :type:  cwl_utils.types.CWLObjectType | None
      :value: None



   .. py:attribute:: processStatus
      :type:  str
      :value: 'success'



   .. py:attribute:: iteration
      :type:  int
      :value: 0



   .. py:attribute:: output_buffer
      :type:  collections.abc.MutableMapping[str, collections.abc.MutableSequence[cwl_utils.types.CWLOutputType | None] | cwl_utils.types.CWLOutputType | None]


   .. py:method:: job(joborder, output_callback, runtimeContext)

      Generate a WorkflowJobStep job until the `when` condition evaluates to False.



   .. py:method:: loop_callback(runtimeContext, jobout, processStatus)

      Update the joborder object with output values from the last iteration.



