12-03-2012 11:05 AM
12-04-2012 03:25 AM
12-04-2012 06:53 AM
ProcessEngines.getDefaultEngine().getIdentityService()
<serviceTask id="mailtask01" name="Mail01" activiti:type="mail">
<extensionElements>
<activiti:field name="to" expression="${my.package.MailUtil.mailForGroup("myFunnyGroup")}"></activiti:field>
org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'my'
at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
12-04-2012 11:52 AM
public class MyMailUtil {
public String mailForGroup(String groupId) {
StringBuffer result = new StringBuffer();
List<User> users = identityService().createUserQuery().memberOfGroup(groupId).list();
for (User user : users) {
if (result.length() > 0) {
result.append(", ");
}
result.append(user.getEmail());
}
return result.toString();
}
protected IdentityService identityService() {
return ProcessEngines.getDefaultProcessEngine().getIdentityService();
}
}
<bean id="myMailUtil" class="my.package.MyMailUtil" />
<serviceTask id="mailtask01" name="Mail" activiti:async="true" activiti:type="mail">
<extensionElements>
<activiti:field name="to" expression="#{myMailUtil.mailForGroup("myFunnyGroup")}"></activiti:field>
12-05-2012 01:47 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.