How can I get a object inside a Promotion Request revised when the Promotion Process is sent for rework? I tried to add a expression robot as below but I still couldn't get the object revised. I added this to the default promotion approval process next to the stage where the targets gets unlocked once the rework loop starts. I set the preference to auto revision mode and selected In Work in the state preference since that's the state the object is in when it will get revised.
wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject;
java.util.Locale locale = wt.session.SessionHelper.getLocale();
com.ptc.core.ui.validation.UIValidationResultSet set= com.ptc.windchill.enterprise.maturity.PromotionNoticeWorkflowHelper.revisePromotables(pn, pn.getCreator(), locale);
The Process Monitor does not indicate any errors and says that the expression got executed.
During the rework loop the promotion request process automatically sets the objects back to their initial state. ('In Work' --> 'Under Review' --> 'In Work) At this point they can be checked out, changed, and then checked back in. No revising is required. Once you are finished making changes you complete the complete the rework task and the promotion process repeats. It will automatically snap the associated promotion objects to the latest versions available and then set them back to 'Under Review'.
I understand. But the Business Requirement is to revise any object that has been asked to rework to track the revs. They would like to know how many revs the document had at the end of the day. So I need to somehow either force the user to revise when he gets a promotion rework or the system has to revise it when the rework is initiated.
Revise is used to create a completely new revision and take you from the 'Released' state of the previous revision to the 'In Work' state of the new revision. Is this case you never made it to 'Released' since the changes were not approved. There is no need for a new revision, just make the additional changes while the objects are still at 'In Work' and then continue on with the promotion request. Everything is fully logged and traceable in the system. You do not want to use revisions in place of check-ins. The system isn't designed to work that way. (Sure, you can force it to work this way, but you are going to have to manually customize a bunch of stuff.)
set the workflow related loggers and check the Method server logs to fix the expression.