In order to assure the item revision is classified, I put in the approval workflow a validate task with the rule handler ICS_assure_target_classified with the argument -allowed_types set with bussines objects I want classified. Depending where I put the rule handler the task either doesn't start or doesn't complete, even tough I set a error path.
The error code also is something that doesn't work. I tried a lot of codes from the ITK ICS error codes list, but no one seems to work, e.g. 71504, 71520, 71999, 71656, 71521.
How can I make the task start and folow the error path automatically?
Do you mean "ICS-assert-target-classified"? If so, it has only one argument, -allowed_type, which can a be a comma delimited list of business objects. It doesn't have an argument for setting an error code.
Yes, I typed it wrong but the I did it correct in TC.
I designed a workflow to approve the itens, and inside that it has a task to validate if the item is classified. When the item is not classified, it should follow an error path, which it does not. If I put the handler in the Start action, the task doesn't even start, if I put in the Complete, it starts but doesn't finish. The error codes that I said, I put in the error path on "Branch error codes", but no code seems to work. If I left the error path to follow on any error, I can manually start or complete the task and it follows the error path. If I set the error, when I try manually start or complete the task, it says the the rules for the handler are not met and no action is made.
What I want is the task to automaticaly start or complete and follow the error path, without the need to do it manually.
OK, after a little experimentation I found out that the handler should be in a Validate task, and it should be placed on the Start action. Draw two flowlines from the Validate task: one for the success branch and the other to whatever you want to happen if the validation check fails. Select this last flowline and right-click to show the options menu and pick "Set to Error Path". My example workflow is shown below after the target item revision failed the check, and with the context menu for setting the error path superimposed.
The picture below shows the placement of the handler, and the argument I used.
Thanks for the information. I really appreciate the effort.
I did exactly the same thing, and still the validate task doesn't start by its own, I mean I still have to start under the menu "Action>Start" when we right click on the task.
What version of Teamcenter are you using? There's a problem report, PR #7557569, that says that the handler is broken in some earlier versions and fixed in TC 10.1.6 and TC 11.2.2. If that's not the problem, can you export the workflow and post the XML file here?
I've completed the update to TC 10.1.7 and I'm still facing the same problem, the task when there is a item not classified, it doesn't start. I'm still figuring out how to export the workflow to xml and as soon I get that, I'll post it here.
I imported the workflow and modified the EPM-attach-related-objects -relation argument in the root task, changing it from "Z9_Eng_de_Produto" to "IMAN_specification", then submitted an item revision with a few unclassified IMAN_specification related datasets and it appears to be working.
That leads me to ask: is "Z9_Eng_de_Produto" a custom relation in your Teamcenter environment?