There are two types of handlers available in the Teamcenter workflow designer application i.e. Action handler and Rule handler.
Action Handler: The action handler performs the required action on the objects available in the target attachment. e.g. EPM-attach-related-objects, EPM-create-sub-process
Rule Handler: The rule handler validates the required condition or rule on the target attachment. e.g. EPM-check-object-properties, EPM-check-target-attachments
Siemens has provided in-built OOTB handlers for general scenarios that we can directly use while designing the workflow process using the workflow designer application. But in some cases, these handlers alone could not satisfy or meet the business process requirement. In such cases, custom handlers can be developed using ITK customization.
In this article, we are going to see 10 different real-life scenarios where custom handlers need to be developed using ITK customization.
Action Handlers:
Requirement 1:
Read Start Date and End Date property values from the target Item Revision. Then calculate the time required in minutes based on the Start Date and End Date. Set a calculated minute value on the Time required attribute available on Item Revision.
Requirement 2:
Read workflow approver information from Item Revision and set this approver information on the property available on the custom form attached under Item Revision.
Requirement 3:
Read attribute information available on the custom form attached to the Item Revision of target attachment. Create a directory with the name ItemID_RevId of item revision and create a text file with the name of the form in that directory. Write custom form attribute information in that text file.
Note: Read directory path information from the preference
Requirement 4:
Get a file available on the specified path that is generated by another process and attach it to Item Revision with the required relation. Get values of Dataset Type and relation from handler arguments. Get the file directory path value from the preference.
Requirement 5:
There are 3 attributes (Problem 1, Problem 2, and Problem 3) available on Form Attached to Item Revision. If the value is available in these attributes then create a change object with the name of the attribute value and attach item revision in the problem items of the change object and initiate a workflow process on that change object.
Create a separate change object for each problem property attribute value. Attach datasets available under item revision as reference Items in the change object.
Rule Handlers:
Requirement 1:
There are two custom attributes available on Item Revision i.e. Start Date and End Date. Write a rule handler that will validate that the start date should be less than the end date. The error message should be displayed to the user if the condition is not Satisfied.
Requirement 2:
Write a rule handler to Validate the dataset named reference attached to ItemRevision of target attachment. If the attached dataset does not contain a named reference then an error should be displayed to the user.
Requirement 3:
There are attributes related to the chassis and engine on the custom form attached to the item Revision. There is a Part Type attribute available on the custom form which contains either Chasis or Engine value. Write a rule handler that will check the Part Type attribute value. If the Part Type attribute value is Chasis then the user should fill the only chassis-related attributes and if the attribute value is Engine then the user should fill in chassis-related attributes only.
Requirement 4:
Write a rule handler to validate the release status of all children of an assembly revision available in the target attachment. If child objects do not have the required status then the appropriate message should be displayed to the user.
Note: The handler should check all levels of assembly and secondary objects (Dataset and Forms) of all Child revisions.
Requirement 5:
Write a rule handler that will check required date attributes and an error should be displayed to the user if the date attribute is greater than the current date. Read date attribute values from handler arguments.
What did you learn from this article?
Here we have tried to summarise different real-life scenarios of Teamcenter custom handlers development based on our industry experience in the PLM field. I am sure there will be more scenarios based on the use case and business process requirements. If you have come across any such scenarios then please do mention them in the comment section or you can reach out to us using the contact form.