Cascading Rules Not Working During the Creation Phase of an Object Created via API
Version: Windchill 12.1
Hello,
I am creating an object with a problem report subtype using an expression robot within a Windchill workflow. There are some cascading rules defined in the created problem report based on the Role value. For example, when the Role value is set to Software Quality Engineer, attributes X, Y, Z, A, and BC should be hidden. However, even though I set the Role value to Software Quality Engineer while creating the object, the cascading rules do not apply during the object creation, and all attributes are visible on the info page after the object is created. The cascading rules only work on the Edit page, but even if the object is edited in this way, the info page is not updated. How can I resolve this issue? I am eagerly awaiting your suggestions.
Additionally, the default values for the attributes are not appearing in the object I created with the code below. The info page is completely empty, showing only the attribute names.
I am sharing the code snippet I used below.
// Create an instance of subtype of Change Request
wt.fc.ReferenceFactory rf = new wt.fc.ReferenceFactory();
wt.fc.WTReference context_ref = (wt.fc.WTReference) rf.getReference("OR:wt.pdmlink.PDMLinkProduct:152306");
java.util.Locale locale = wt.session.SessionHelper.getLocale();
com.ptc.core.lwc.server.PersistableAdapter obj = new com.ptc.core.lwc.server.PersistableAdapter("WCTYPE|wt.change2.WTChangeIssue|tr.com.aselsan.Software_Verification_Plan_Checklist1", locale, new com.ptc.core.meta.common.CreateOperationIdentifier());
obj.load("name","containerReference","rol");
obj.set("name", "test PR 002");
obj.set("containerReference", context_ref);
obj.set("rol", "Software_Quality");
obj.validate();
wt.change2.WTChangeIssue Pr2 = (wt.change2.WTChangeIssue)obj.apply();
// Assign iteration creator before saving
wt.vc.VersionControlHelper.assignIterationCreator((wt.vc.Versioned) Pr2, participantRef);
Pr2 = (wt.change2.WTChangeIssue) wt.fc.PersistenceHelper.manager.save(Pr2);
Pr2 = (wt.change2.WTChangeIssue) wt.fc.PersistenceHelper.manager.refresh(Pr2);
// Link to the Problem Report(primaryBusinessObject)
wt.change2.ChangeProcessLink changeProcessLink = wt.change2.ChangeProcessLink.newChangeProcessLink((wt.change2.WTChangeReview)primaryBusinessObject, Pr2);
wt.fc.PersistenceHelper.manager.save(changeProcessLink);

