cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Unable to create a Object in Windchill due to access policy.

krishna_ra
2-Guest

Unable to create a Object in Windchill due to access policy.

Hi Friends,

 

I have started learning customizations and wasabout to create a Customized Object however it failing with message the "Domain administered Object is not assigned with the Domain"

 

com.infoengine.util.IEException; nested exception is: 
wt.util.WTRuntimeException: The domain administered object has no assigned domain.  Cannot check policy access.
 
I had assigned the Domain and Confainer reference as below still the issue.
WTContainerRef containerRef = WTContainerHelper.service.getByPath("wt.inf.container.OrgContainer=Test1/wt.pdmlink.PDMLinkProduct=Prod_1");
//pet.setContainerReference(containerRef);
pet.setContainerReference(containerRef);
AdministrativeDomain adminDomain = containerRef.getContainer().getDefaultDomain();
AdminDomainRef ref_admi = AdminDomainRef.newAdminDomainRef(adminDomain);
//pet.setContainer(adminDomain);
pet.setDomainRef(ref_admi);
SessionHelper.manager.setPrincipal("wcadmin");
1 REPLY 1

You can turn off the access control:

 

boolean accessEnforced = SessionServerHelper.manager.setAccessEnforced(false);
try {
....
} finally {
SessionServerHelper.manager.setAccessEnforced(accessEnforced);
}
Top Tags