WorkflowBuilder#
- class pharmpy.workflows.WorkflowBuilder(workflow=None, tasks=None, name=None)[source]#
Bases:
WorkflowBase
Builder class for Workflow
Methods Summary
add_task
(task[, predecessors])Add a task to the workflow
insert_workflow
(other[, predecessors])Insert other workflow
replace_task
(task, new_task)Replace a task with a new task
Methods Documentation
- add_task(task, predecessors=None)[source]#
Add a task to the workflow
Predecessors will be connected if given.
- Parameters:
task (Task) – Task to add
predecessors (list or Task) – One or multiple predecessor tasks to connect to the added task
- insert_workflow(other, predecessors=None)[source]#
Insert other workflow
- Parameters:
other (Workflow) – Workflow to insert
predecessors (list or Task) – One or multiple predecessor tasks to connect to the inputs of the inserted workflow. If None all output tasks will be found and used as predecessors.