Rules File for Generated Process Plans
The rules file specifies the rules to be applied when creating or updating a generated process plan. It defines the structure of the generated process plan. You can specify the attributes and associations that should be carried forward from a generic process plan to a generated process plan for a given object type. If not specified, all the attributes and associations are carried forward.
Defining a Rules File
The rules are defined in a structured way in a text file in the JSON format using the elements given below:
As given in the example, you can define multiple rules for a particular object type in a rules file. A rule must contain a sourceType and targetTypeblock. You can specify rules for multiple object types in the same rule file.
Here are two examples that depict the use of usage links and sequences as the source and target types:
{
"sourceType": "com.ptc.windchill.mpml.processplan.operation.MPMOperationUsageLink",
"targetType": "com.ptc.windchill.mpml.processplan.operation.MPMOperationUsageLink"
}
{
"sourceType": "com.ptc.windchill.mpml.processplan.sequence.MPMSequence",
"targetType": "com.ptc.windchill.mpml.processplan.sequence.MPMSequence",
"excludedAttributes": "BranchingOperation",
"excludedAttributesForUpdate": "ReturnOperation"
}
Key Points
The combination of the types specified in the sourceType and targetTypeblocks is unique in a rule file.
All sub types of the types given in sourceType inherit the given rules unless explicitly specified otherwise.
Using attributeToSyncMappings is optional. It can be used when the source and target attributes are different.
For special attributes such as Long Description, you need to specify the internal name in a different manner such as longDescriptionRichText.formattedText.
You can configure the property com.ptc.windchill.associativity.reconciliation.excludedTypes to specify the types of documents that should not be carried forward when creating or updating a generated process plan. For more information, see Propagating Upstream Changes.
After creating the rules file, you need to associate it with a generic process plan. For more information, see Associating a Rules File With a Generic Process Plan.
Was this helpful?