I need to dynamically query the list of candidateUsers/candidateGroups from database. Can this be done?I tried the following:
package com.mastersam.adama.server.activiti.delegate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CandidateGroupDelegate {
private Logger logger = LoggerFactory
.getLogger(CandidateGroupDelegate.class);
public String getGroup() {
logger.error("getGroup");
return "requester";
}
}
Then I have this in my activiti-context.xml
<property name="beans">
<map>
<entry key="candidateGroupDelegate" value-ref="candidateGroupDelegate" />
</map>
</property>
…
<bean id="candidateGroupDelegate"
class="com.mastersam.adama.server.activiti.delegate.CandidateGroupDelegate">
</bean>
After which I set in the candidateUsers property of the Process${candidateGroupDelegate.getGroup()} or #{candidateGroupDelegate.getGroup()}both doesn't work, it doesn't call my function. I tried searching and it doesn't seems like the candidateUsers and candidateGroups parameter supports spring expression, is that right?Any other ways to accomplish what I want?