Workflow class
Last update: 18.06.2026Namespace: Ans.DataProcessing
Summary
Container of fields.
A workflow is a black box containing operators and exposing only the necessary operator's
inputs and outputs to compute a given algorithm
Example
disp_op = dpf.operators.result.displacement()
max_fc_op = dpf.operators.min_max.min_max_fc(disp_op)
workfow = dpf.Workflow()
workfow.Add(disp_op)
workfow.Add(max_fc_op)
workfow.SetInputName(disp_op, 4, "data_sources")
workfow.SetOutputName(max_fc_op, 0, "min")
workfow.SetOutputName(max_fc_op, 1, "max")
workfow.connect("data_sources", my_data_sources)
min = workfow.GetOutputAsField("min")
max = workfow.GetOutputAsField("max")
Class Information
| Property | Value |
|---|---|
| Namespace | Ans.DataProcessing |
| Assembly | CS_DataProcessing |
| Base Class | Ans.DataProcessing.internal_objects.DpfType |
Constructors
Constructor
Workflow()
Constructor
Workflow(wf_ptr)
Parameters:
wf_ptr(IntPtr)
Constructor
Workflow(id)
Parameters:
id(int)
Methods
SetOutputContour
Method SetOutputContour exposes an output as "contour".
This contour output can be requested and computed afterwards to be plotted.
obj.SetOutputContour(op, pin, gfxCntrType)
Parameters:
op(BaseOperator)pin(int)gfxCntrType(GFXContourType (optional))
SetOutputContour
obj.SetOutputContour(op, gfxCntrType)
Parameters:
op(BaseOperator)gfxCntrType(GFXContourType (optional))
SetOutputContour
obj.SetOutputContour(pin, gfxCntrType)
Parameters:
pin(LinkableOutput)gfxCntrType(GFXContourType (optional))
SetOutputContour
obj.SetOutputContour(pin, gfxCntrType)
Parameters:
pin(LinkableOutput)gfxCntrType(GFXContourType (optional))
SetOutputContour
obj.SetOutputContour(pin, gfxCntrType)
Parameters:
pin(LinkableOutput)gfxCntrType(GFXContourType (optional))
SetOutputContour
obj.SetOutputContour(fields, gfxCntrType)
Parameters:
fields(FieldsContainer)gfxCntrType(GFXContourType (optional))
SetOutputContour
obj.SetOutputContour(field, gfxCntrType)
Parameters:
field(Field)gfxCntrType(GFXContourType (optional))
SetOutputWarpField
Method SetOutputWarpField exposes an output as "warp".
This warping output can be requested and computed afterwards to be used as warping (or deformed shape) of a contour.
obj.SetOutputWarpField(op, pin)
Parameters:
op(BaseOperator)pin(int)
SetOutputWarpField
obj.SetOutputWarpField(op)
Parameters:
op(BaseOperator)
SetOutputWarpField
obj.SetOutputWarpField(pin)
Parameters:
pin(LinkableOutput)
SetOutputWarpField
obj.SetOutputWarpField(pin)
Parameters:
pin(LinkableOutput)
SetOutputWarpField
obj.SetOutputWarpField(pin)
Parameters:
pin(LinkableOutput)
SetOutputWarpField
obj.SetOutputWarpField(fields)
Parameters:
fields(FieldsContainer)
SetOutputWarpField
obj.SetOutputWarpField(field)
Parameters:
field(Field)
SetOutputMesh
Method SetOutputMesh exposes an output as "mesh".
This mesh (which should be a MehedRegion or a MeshesContainer) output can be requested and computed afterwards to be used as a mesh to plot a contour on.
obj.SetOutputMesh(op, pin)
Parameters:
op(BaseOperator)pin(int)
SetOutputMesh
obj.SetOutputMesh(op)
Parameters:
op(BaseOperator)
SetOutputMesh
obj.SetOutputMesh(pin)
Parameters:
pin(LinkableOutput)
SetOutputMesh
obj.SetOutputMesh(pin)
Parameters:
pin(LinkableOutput)
SetOutputMesh
obj.SetOutputMesh(pin)
Parameters:
pin(LinkableOutput)
SetOutputMesh
obj.SetOutputMesh(meshes)
Parameters:
meshes(MeshesContainer)
SetOutputMesh
obj.SetOutputMesh(mesh)
Parameters:
mesh(MeshedRegion)
SetInputTime
obj.SetInputTime(op, pin)
Parameters:
op(BaseOperator)pin(int)
InstantiateOnRemote
result = obj.InstantiateOnRemote(ip, port)
Parameters:
ip(str)port(int)
Returns: Workflow
SetInputMeshScoping
obj.SetInputMeshScoping(op, pin)
Parameters:
op(BaseOperator)pin(int)
SetInputBodyScoping
obj.SetInputBodyScoping(op, pin)
Parameters:
op(BaseOperator)pin(int)
ConnectWith
Method ConnectWith Chain 2 workflows together so that they become one workflow.
All the operators, inputs and outputs of left_workflow are exposed in
this workflow.
obj.ConnectWith(leftWorkflow)
Parameters:
leftWorkflow(Workflow)
ConnectWith
obj.ConnectWith(leftWorkflow, outputsToInputs)
Parameters:
leftWorkflow(Workflow)outputsToInputs(dict)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(BaseOperator)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(Field)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(BaseCollection)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(int)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(bool)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(float)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(str)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(Scoping)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(DataSources)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(MeshedRegion)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(PropertyField)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(TimeFreqSupport)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(CyclicSupport)
Connect
obj.Connect(inputPinName, value)
Parameters:
inputPinName(str)value(list)
GetOutputAsFieldsContainer
result = obj.GetOutputAsFieldsContainer(outputPinName)
Parameters:
outputPinName(str)
Returns: FieldsContainer
GetOutputAsScopingsContainer
result = obj.GetOutputAsScopingsContainer(outputPinName)
Parameters:
outputPinName(str)
Returns: ScopingsContainer
GetOutputAsDataSources
result = obj.GetOutputAsDataSources(outputPinName)
Parameters:
outputPinName(str)
Returns: DataSources
GetOutputAsField
result = obj.GetOutputAsField(outputPinName)
Parameters:
outputPinName(str)
Returns: Field
GetOutputAsScoping
result = obj.GetOutputAsScoping(outputPinName)
Parameters:
outputPinName(str)
Returns: Scoping
GetOutputAsCyclicSupport
result = obj.GetOutputAsCyclicSupport(outputPinName)
Parameters:
outputPinName(str)
Returns: CyclicSupport
GetOutputAsString
result = obj.GetOutputAsString(outputPinName)
Parameters:
outputPinName(str)
Returns: str
GetOutputAsInt
result = obj.GetOutputAsInt(outputPinName)
Parameters:
outputPinName(str)
Returns: int
GetOutputAsDouble
result = obj.GetOutputAsDouble(outputPinName)
Parameters:
outputPinName(str)
Returns: float
GetOutputAsTimeFreqSupport
result = obj.GetOutputAsTimeFreqSupport(outputPinName)
Parameters:
outputPinName(str)
Returns: TimeFreqSupport
GetOutputAsMeshesContainer
result = obj.GetOutputAsMeshesContainer(outputPinName)
Parameters:
outputPinName(str)
Returns: MeshesContainer
GetOutputAsMeshedRegion
result = obj.GetOutputAsMeshedRegion(outputPinName)
Parameters:
outputPinName(str)
Returns: MeshedRegion
GetOutputAsResultInfo
result = obj.GetOutputAsResultInfo(outputPinName)
Parameters:
outputPinName(str)
Returns: ResultInfo
GetOutputAsPropertyField
result = obj.GetOutputAsPropertyField(outputPinName)
Parameters:
outputPinName(str)
Returns: PropertyField
HasTag
result = obj.HasTag(tag)
Parameters:
tag(WorkFlowTags)
Returns: bool
AddTag
obj.AddTag(tag)
Parameters:
tag(WorkFlowTags)
WriteToGraphViz
obj.WriteToGraphViz(filename)
Parameters:
filename(str)
FromTemplate
result = obj.FromTemplate(template_name)
Parameters:
template_name(str)
Returns: Workflow
TemplateExists
result = obj.TemplateExists(template_name)
Parameters:
template_name(str)
Returns: bool
discoverAllOperators
obj.discoverAllOperators()
GetRecordedId
result = obj.GetRecordedId()
Returns: int
GetInternalData
result = obj.GetInternalData()
Returns: IntPtr
Record
Add the workflow to DPF's internal registry with an id returned by this method.
The workflow can be recovered by wf = Workflow(id)
result = obj.Record(identifier, transferOwnership)
Parameters:
identifier(str)transferOwnership(bool)
Returns: int
Derivate
obj.Derivate(pinName, variableName)
Parameters:
pinName(str)variableName(str (optional))
WriteToFile
obj.WriteToFile(filePath)
Parameters:
filePath(str)
LoadFromFile
obj.LoadFromFile(filePath)
Parameters:
filePath(str)
Add
Method Add adds an Operator to the list of operators in the workflow.
You do not need to add all operators to the workflow. The list of operators is mostly used
to compute progress while a workflow is running.
obj.Add(op)
Parameters:
op(BaseOperator)
Add
obj.Add(ops)
Parameters:
ops(list)
GetNumberOfOperators
result = obj.GetNumberOfOperators()
Returns: int
SetInputName
Method SetInputName exposes an input using its name. You can then connect inputs using the input name on the given operator.
obj.SetInputName(op, pin, name)
Parameters:
op(BaseOperator)pin(int)name(str)
SetOutputName
Method SetOutputName forwards data as an output so you can request this data by its name.
obj.SetOutputName(data, name)
Parameters:
data(object)name(str)
SetOutputName
Method SetOutputName exposes an output by its name so that you can request the computed outputs of the given operator
using the output name aftewards.
obj.SetOutputName(op, pin, name)
Parameters:
op(BaseOperator)pin(int)name(str)
SetOutputChart
obj.SetOutputChart(op, pin, chart, chart_label)
Parameters:
op(BaseOperator)pin(int)chart(ChartType (optional))chart_label(str (optional))
SetOutputChart
obj.SetOutputChart(op, chart, chart_label)
Parameters:
op(BaseOperator)chart(ChartType (optional))chart_label(str (optional))
SetOutputChart
obj.SetOutputChart(pin, chart, chart_label)
Parameters:
pin(LinkableOutput)chart(ChartType (optional))chart_label(str (optional))
SetOutputChart
obj.SetOutputChart(pin, chart, chart_label)
Parameters:
pin(LinkableOutput)chart(ChartType (optional))chart_label(str (optional))
SetOutputChart
obj.SetOutputChart(pin, chart, chart_label)
Parameters:
pin(LinkableOutput)chart(ChartType (optional))chart_label(str (optional))
Properties
Id
Type: int
# Get the property (read-only)
value = obj.Id
Operators
Property Operators returns the list of Operators added with the method Workflow.Add
Type: list
# Get the property (read-only)
value = obj.Operators
Inputs
Property Inputs returns the list of input names that have been exposed with the method Workflow.SetInputName
and its derivates (Workflow.SetInputMeshScoping, Workflow.SetInputBodyScoping...)
Type: list
# Get the property (read-only)
value = obj.Inputs
Outputs
Property Outputs returns the list of output names that have been exposed with the method Workflow.SetOutputName
and its derivates (Workflow.SetOutputChart, Workflow.SetOutputContour, Workflow.SetOutputWarpField...)
Type: list
# Get the property (read-only)
value = obj.Outputs