Convenience APIs are IronPython queries that provide simple access to task-stored input and output data. The available convenience APIs are:
GetInputDataByTypeReturns a List<object> containing
upstream data for a given type. For example:
upstreamData =
container.GetInputDataByType(InputType="MeshingMesh")
meshFileRef = None
upstreamDataCount = upstreamData.Count
if upstreamDataCount > 0:
meshFileRef = upstreamData[0]GetOutputDataReturns a Dictionary<string,
List<DataReference>> holding the task's output
types. For example:
outputRefs = container.GetOutputData() meshOutputSet = outputRefs["SimulationGeneratedMesh"] meshOutput = meshOutputSet[0] meshOutput.TransferFile = meshFileRef
GetCustomEntityObtains the custom data entity from a container based on the entity's
name and type. If the name and type are not specified, the default ACT
object is returned. This object contains the properties defined by the
workflow task from the <propertygroup> and
<property> blocks.
entity = ACT.GetCustomEntity(container)
GetCustomEntityPropertyValueThis query returns the value of a property defined on a custom data entity.
inputValue = ACT.GetCustomEntityPropertyValue(entity, "Input")
Users can also directly access properties off of a task object.
SetCustomEntityPropertyValueThis command handles the setting of a custom entity's property value.
ACT.SetCustomEntityPropertyValue(entity, "Output", outputValue)
Users can also directly set properties off of a task object.
GetTaskByNameThis command accesses the data model to facilitate task searches. A usage example appears in the figure at the end of this section.
ExtAPI.DataModel.GetTaskByName(taskName)
GetTaskGroupByNameThis command accesses the data model to facilitate task group searches. A usage example appears in the figure at the end of this section.
ExtAPI.DataModel.GetTaskGroupByName(taskGroupName)
The following figure shows convenience queries for tasks and task groups.