Package io.jmix.bpm.notification.impl
Class BpmNotificationRecipientResolverImpl
java.lang.Object
io.jmix.bpm.notification.impl.BpmNotificationRecipientResolverImpl
- All Implemented Interfaces:
BpmNotificationRecipientResolver
@Component("bpm_BpmNotificationRecipientResolver")
public class BpmNotificationRecipientResolverImpl
extends Object
implements BpmNotificationRecipientResolver
Default
BpmNotificationRecipientResolver implementation that resolves recipients from the
process/task state (assignee, initiator, candidates) or by evaluating a recipient expression.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BpmPropertiesprotected UserGroupServiceprotected UserRepository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddByUsername(List<org.springframework.security.core.userdetails.UserDetails> recipients, String username) protected voidaddExpressionResult(List<org.springframework.security.core.userdetails.UserDetails> recipients, @Nullable Object value) protected List<org.flowable.identitylink.api.IdentityLink> candidateLinks(@Nullable org.flowable.task.service.delegate.DelegateTask task) protected List<org.springframework.security.core.userdetails.UserDetails> protected org.flowable.common.engine.impl.el.ExpressionManagerList<org.springframework.security.core.userdetails.UserDetails> resolveRecipients(NotificationDefinition definition, org.flowable.variable.api.delegate.VariableScope scope, @Nullable org.flowable.task.service.delegate.DelegateTask task) Resolves recipients for a notification definition.
-
Field Details
-
userRepository
-
userGroupService
-
bpmProperties
-
-
Constructor Details
-
BpmNotificationRecipientResolverImpl
public BpmNotificationRecipientResolverImpl()
-
-
Method Details
-
resolveRecipients
public List<org.springframework.security.core.userdetails.UserDetails> resolveRecipients(NotificationDefinition definition, org.flowable.variable.api.delegate.VariableScope scope, @Nullable org.flowable.task.service.delegate.DelegateTask task) Description copied from interface:BpmNotificationRecipientResolverResolves recipients for a notification definition.- Specified by:
resolveRecipientsin interfaceBpmNotificationRecipientResolver- Parameters:
definition- notification definitionscope- the variable scope (execution or task) used to evaluate expressionstask- the task in scope, ornullfor a service task; required for assignee/candidate recipient types- Returns:
- distinct recipients; empty if none resolve
-
candidateLinks
protected List<org.flowable.identitylink.api.IdentityLink> candidateLinks(@Nullable org.flowable.task.service.delegate.DelegateTask task) -
addExpressionResult
-
addByUsername
-
distinct
-
getExpressionManager
protected org.flowable.common.engine.impl.el.ExpressionManager getExpressionManager()
-