Class FlowableUserWorkflowAdapter
- java.lang.Object
-
- org.apache.syncope.core.workflow.java.AbstractWorkflowAdapter
-
- org.apache.syncope.core.workflow.java.AbstractUserWorkflowAdapter
-
- org.apache.syncope.core.flowable.impl.FlowableUserWorkflowAdapter
-
- All Implemented Interfaces:
WorkflowTaskManager
,UserWorkflowAdapter
,WorkflowAdapter
public class FlowableUserWorkflowAdapter extends AbstractUserWorkflowAdapter implements WorkflowTaskManager
-
-
Field Summary
Fields Modifier and Type Field Description protected DomainProcessEngine
engine
protected UserRequestHandler
userRequestHandler
-
Fields inherited from class org.apache.syncope.core.workflow.java.AbstractUserWorkflowAdapter
dataBinder, LOG, realmDAO, ruleEnforcer, securityProperties, userDAO
-
Fields inherited from class org.apache.syncope.core.workflow.java.AbstractWorkflowAdapter
entityFactory, groupDAO, publisher
-
-
Constructor Summary
Constructors Constructor Description FlowableUserWorkflowAdapter(UserDataBinder dataBinder, UserDAO userDAO, RealmDAO realmDAO, GroupDAO groupDAO, EntityFactory entityFactory, SecurityProperties securityProperties, RuleEnforcer ruleEnforcer, DomainProcessEngine engine, UserRequestHandler userRequestHandler, ApplicationEventPublisher publisher)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UserWorkflowResult<String>
doActivate(User user, String token, String updater, String context)
protected UserWorkflowResult<Pair<UserUR,Boolean>>
doConfirmPasswordReset(User user, String token, String password, String updater, String context)
protected UserWorkflowResult<Pair<String,Boolean>>
doCreate(UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context)
protected void
doDelete(User user, String eraser, String context)
protected Set<String>
doExecuteNextTask(String procInstID, User user, Map<String,Object> moreVariables)
protected UserWorkflowResult<String>
doReactivate(User user, String updater, String context)
protected void
doRequestPasswordReset(User user, String updater, String context)
protected UserWorkflowResult<String>
doSuspend(User user, String updater, String context)
protected UserWorkflowResult<Pair<UserUR,Boolean>>
doUpdate(User user, UserUR userUR, String updater, String context)
UserWorkflowResult<String>
executeNextTask(WorkflowTaskExecInput workflowTaskExecInput)
Execute a task on an user.List<WorkflowTask>
getAvailableTasks(String userKey)
Get tasks available for execution, for given user.String
getPrefix()
<T> T
getVariable(String executionId, String variableName, Class<T> variableClass)
Gets variable value.protected User
lazyLoad(User user)
protected static void
navigateAvailableTasks(org.flowable.bpmn.model.FlowElement flow, List<String> availableTasks)
void
setVariable(String executionId, String variableName, Object value)
Updates or create sa variable for an execution.-
Methods inherited from class org.apache.syncope.core.workflow.java.AbstractUserWorkflowAdapter
activate, confirmPasswordReset, create, create, delete, enforcePolicies, internalSuspend, reactivate, requestPasswordReset, suspend, update
-
Methods inherited from class org.apache.syncope.core.workflow.java.AbstractWorkflowAdapter
metadata
-
-
-
-
Field Detail
-
engine
protected final DomainProcessEngine engine
-
userRequestHandler
protected final UserRequestHandler userRequestHandler
-
-
Constructor Detail
-
FlowableUserWorkflowAdapter
public FlowableUserWorkflowAdapter(UserDataBinder dataBinder, UserDAO userDAO, RealmDAO realmDAO, GroupDAO groupDAO, EntityFactory entityFactory, SecurityProperties securityProperties, RuleEnforcer ruleEnforcer, DomainProcessEngine engine, UserRequestHandler userRequestHandler, ApplicationEventPublisher publisher)
-
-
Method Detail
-
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interfaceWorkflowAdapter
- Overrides:
getPrefix
in classAbstractUserWorkflowAdapter
- Returns:
- any string that might be interpreted as 'prefix' (say table prefix in SQL environments)
-
getVariable
public <T> T getVariable(String executionId, String variableName, Class<T> variableClass)
Description copied from interface:WorkflowTaskManager
Gets variable value. Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariable
in interfaceWorkflowTaskManager
- Type Parameters:
T
- variable type- Parameters:
executionId
- id of execution, cannot be null.variableName
- name of variable, cannot be null.variableClass
- class of variable, cannot be null.- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null.
-
setVariable
public void setVariable(String executionId, String variableName, Object value)
Description copied from interface:WorkflowTaskManager
Updates or create sa variable for an execution.- Specified by:
setVariable
in interfaceWorkflowTaskManager
- Parameters:
executionId
- id of execution to set variable in, cannot be null.variableName
- name of variable to set, cannot be null.value
- value to set; when null is passed, the variable is not removed, only it's value will be set to null
-
doCreate
protected UserWorkflowResult<Pair<String,Boolean>> doCreate(UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context)
- Specified by:
doCreate
in classAbstractUserWorkflowAdapter
-
doExecuteNextTask
protected Set<String> doExecuteNextTask(String procInstID, User user, Map<String,Object> moreVariables)
-
doActivate
protected UserWorkflowResult<String> doActivate(User user, String token, String updater, String context)
- Specified by:
doActivate
in classAbstractUserWorkflowAdapter
-
doUpdate
protected UserWorkflowResult<Pair<UserUR,Boolean>> doUpdate(User user, UserUR userUR, String updater, String context)
- Specified by:
doUpdate
in classAbstractUserWorkflowAdapter
-
doSuspend
protected UserWorkflowResult<String> doSuspend(User user, String updater, String context)
- Specified by:
doSuspend
in classAbstractUserWorkflowAdapter
-
doReactivate
protected UserWorkflowResult<String> doReactivate(User user, String updater, String context)
- Specified by:
doReactivate
in classAbstractUserWorkflowAdapter
-
doRequestPasswordReset
protected void doRequestPasswordReset(User user, String updater, String context)
- Specified by:
doRequestPasswordReset
in classAbstractUserWorkflowAdapter
-
doConfirmPasswordReset
protected UserWorkflowResult<Pair<UserUR,Boolean>> doConfirmPasswordReset(User user, String token, String password, String updater, String context)
- Specified by:
doConfirmPasswordReset
in classAbstractUserWorkflowAdapter
-
doDelete
protected void doDelete(User user, String eraser, String context)
- Specified by:
doDelete
in classAbstractUserWorkflowAdapter
-
executeNextTask
public UserWorkflowResult<String> executeNextTask(WorkflowTaskExecInput workflowTaskExecInput)
Description copied from interface:WorkflowTaskManager
Execute a task on an user.- Specified by:
executeNextTask
in interfaceWorkflowTaskManager
- Parameters:
workflowTaskExecInput
- input for task execution- Returns:
- user after task execution
-
navigateAvailableTasks
protected static void navigateAvailableTasks(org.flowable.bpmn.model.FlowElement flow, List<String> availableTasks)
-
getAvailableTasks
public List<WorkflowTask> getAvailableTasks(String userKey)
Description copied from interface:WorkflowTaskManager
Get tasks available for execution, for given user.- Specified by:
getAvailableTasks
in interfaceWorkflowTaskManager
- Parameters:
userKey
- user key- Returns:
- available tasks
-
-