我使用的是5.1的Alfresco社區,我試圖讓記錄例如當前人物的屬性值,在用戶,我有:找人露天的財產JAVA
"{http://www.someco.org/model/people/1.0}customProperty"
如何我可以在java中獲得這個嗎?
是一個自定義屬性,所以在http://localhost:8080/alfresco/service/api/people它沒有出現。我怎樣才能做到這一點?
我試試這個,以獲得至少nodeRef:
protected ServiceRegistry getServiceRegistry() {
ProcessEngineConfigurationImpl config = Context.getProcessEngineConfiguration();
if (config != null) {
// Fetch the registry that is injected in the activiti spring-configuration
ServiceRegistry registry = (ServiceRegistry) config.getBeans().get(ActivitiConstants.SERVICE_REGISTRY_BEAN_KEY);
if (registry == null) {
throw new RuntimeException("Service-registry not present in ProcessEngineConfiguration beans, expected ServiceRegistry with key" + ActivitiConstants.SERVICE_REGISTRY_BEAN_KEY);
}
return registry;
}
throw new IllegalStateException("No ProcessEngineConfiguration found in active context");
}
public void writeToCatalina() {
PersonService personService = getServiceRegistry().getPersonService();
System.out.println("test");
String name = AuthenticationUtil.getFullyAuthenticatedUser();
System.out.println(name);
NodeRef personRef = personService.getPerson(name);
System.out.println(personRef);
}
但我得到:
沒有ProcessEngineConfiguration發現,在積極方面
幫幫我!
但我想獲取當前用戶的參數記錄,沒有提供任何信息(用戶,通過)。在這種情況下,您創建一個人,並通過它獲得nodeRef。但是如果我想要當前用戶,我該如何做到這一點? –