Basic Administration > Supporting Collaboration > Workflow Administration > Workflow Management > Best Practices > Access Control and Workflow Templates
  
Access Control and Workflow Templates
Access control is generally defined for the domain to which an object belongs. However, it is possible to specifically add unique ad hoc access control rules to a Windchill object (such as a specific part or document). For example, you can use ad hoc access control rules inside a workflow, or you can define object-level ad hoc access control rules using the Edit Access Control action.
If you are likely to have an extremely high number of running workflow activities referencing the same object, make sure that you grant ad hoc access only as needed. Use policy access control where appropriate.
For more information, see Access Control.
Access Control and Process Nodes
Access control permissions are not checked for expressions in a workflow activity or robot node. You can use the Windchill API if your process requires that access control permissions are enforced within expression execution. The following is an example of the appropriate code:
boolean oldAccessEnforcedSetting = SessionServerHelper.manager.setAccessEnforced(true);
try {…
// workflow expression code

}finally{
SessionServerHelper.manager.setAccessEnforced(oldAccessEnforcedSetting);
// At the end of your code, reset access check setting to its initial value
}
* 
You must ensure that the access check setting is reset to its original value at the end of the code.