ServiceManager manager = workflowable.getServiceManager();
String url = workflowable.getDocument().getCanonicalWebappURL();
ServiceSelector selector = null;
AccessControllerResolver acResolver = null;
AccessController accessController = null;
try {
selector = (ServiceSelector) manager.lookup(AccessControllerResolver.ROLE + "Selector");
acResolver = (AccessControllerResolver) selector
.select(AccessControllerResolver.DEFAULT_RESOLVER);
accessController = acResolver.resolveAccessController(url);
PolicyManager policyManager = accessController.getPolicyManager();
Identity identity = workflowable.getSession().getIdentity();
AccreditableManager accreditableMgr = accessController
.getAccreditableManager();
Policy policy = policyManager.getPolicy(accreditableMgr, url);
RoleManager roleManager = accreditableMgr.getRoleManager();
boolean complied = false;