The available options for constructing a work item using one of the methods on pdg.WorkItemHolder. See pdg.WorkItemHolder.addWorkItem for examples.
Methods ¶
batch
: bool
Property
When set to True, indicates that the work item will be constructed as a
batch.
Defaults to False.
batchOffset
: int
Property
When batch is True, the index offset for items in the batch.
Defaults to 0.
batchSize
: int
Property
The size of the batch, when batch is set to True.
Defaults to 0, but should always be set when creating a batch.
cloneMode
: pdg.cloneMode
Property
The data cloning mode when constructing the work item.
Defaults to pdg.clonemode.Default.
cloneOutputFiles
: bool
Property
When set to True, the new work item will clone output files from its
parent work item.
Defaults to False.
cloneResultData
: bool
Property
This property is deprecated. Use pdg.WorkItemHolder.cloneOutputFiles instead.
cloneTarget
: pdg.WorkItem
Property
An optional clone target, which specifies where attribute data is cloned from. If this field isn’t specified then attributes are copied from the parent work item.
Default to None.
cookType
: pdg.workItemCookType
Property
The cook type for the work item. This is preferred over the older
inProcess option.
Defaults to pdg.workItemCookType.Automatic, which means the work item uses the cook type setting from the node. If the node has no cook type parameter, then the cook type is set to pdg.workItemCookType.Generate if it has no command line or pdg.workItemCookType.OutOfOutProcess if it does.
inProcess
: bool
Property
This property is deprecated – cookType=pdg.workItemCookType.InProcess
should be used instead.
index
: int
Property
The work item index. The work item uses the parent item’s index if this is set to -1.
Defaults to -1.
isDynamicBatch
: bool
Property
Whether or not the batch is allowed to dynamically add sub items while
it cooks. Only used when batch is set to True.
Defaults to False.
isNoGenerate
: bool
Property
When this flag is set, the work item will be marked as not capable of generating new items in downstream nodes.
Defaults to False.
isPartialCook
: bool
Property
Whether or not a batch supports cooking from part way through its list of
sub items, if some of the items are already cached. Only used when batch
is set to True
Defaults to Fales.
isServiceMode
: bool
Property
This property is deprecated – cookType=pdg.workItemCookType.Service
should be used instead.
name
: str
Property
This option is deprecated, and will have no effect on work item(s) created using this options instance. Instead, use pdg.WorkItem.setLabel to customize the display name of a work item.
parent
: pdg.WorkItem
Property
The parent for the newly constructed work item. This should be always be set when generating from a list of upstream work items so that PDG can establish the proper dependency relationship, copy attributes, etc.
parentArray
: list
of pdg.WorkItem
Property
When generating a batch, it is possible to specify a different parent item
for each of the items in the batch. This is done by passing an array of
work items into the holder using this property. If the array is smaller than
the batchSize, the last element of the array is reused as the parent for
all the batches beyond the length of the array.
parentArrayOffset
: int
Property
When using a parentArray this property can be used to specify the
starting offset in the array. By default the array is accessed starting at
index 0. This is useful when generating multiple batches to avoid having
to build separate parent array values for each batch. The same array can
be reused with a different offset value to each call to addWorkItem.
preserveType
: bool
Property
When set to true, the new item will attempt to keep the work item data type of the parent item.
Defaults to False.
priority
: int
or None
Property
The priority value for the work item. Setting this property to None
indicats that PDG should use the priority controls on the node itself to
determine the task priority.
Defaults to None.
typeName
: str
Property
The name of the work item data type to use when constructing the work item.
Defaults to empty string, which uses the default genericdata work item
data type.