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 DomainProcessEngineengineprotected UserRequestHandleruserRequestHandler-
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
-
Fields inherited from interface org.apache.syncope.core.workflow.api.UserWorkflowAdapter
CONFIRM_PASSWORD_RESET, REQUEST_PASSWORD_RESET
-
-
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 voiddoDelete(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 voiddoRequestPasswordReset(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.StringgetPrefix()<T> TgetVariable(String executionId, String variableName, Class<T> variableClass)Gets variable value.protected UserlazyLoad(User user)protected static voidnavigateAvailableTasks(org.flowable.bpmn.model.FlowElement flow, List<String> availableTasks)voidsetVariable(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:
getPrefixin interfaceWorkflowAdapter- Overrides:
getPrefixin 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:WorkflowTaskManagerGets variable value. Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariablein 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:WorkflowTaskManagerUpdates or create sa variable for an execution.- Specified by:
setVariablein 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:
doCreatein 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:
doActivatein classAbstractUserWorkflowAdapter
-
doUpdate
protected UserWorkflowResult<Pair<UserUR,Boolean>> doUpdate(User user, UserUR userUR, String updater, String context)
- Specified by:
doUpdatein classAbstractUserWorkflowAdapter
-
doSuspend
protected UserWorkflowResult<String> doSuspend(User user, String updater, String context)
- Specified by:
doSuspendin classAbstractUserWorkflowAdapter
-
doReactivate
protected UserWorkflowResult<String> doReactivate(User user, String updater, String context)
- Specified by:
doReactivatein classAbstractUserWorkflowAdapter
-
doRequestPasswordReset
protected void doRequestPasswordReset(User user, String updater, String context)
- Specified by:
doRequestPasswordResetin classAbstractUserWorkflowAdapter
-
doConfirmPasswordReset
protected UserWorkflowResult<Pair<UserUR,Boolean>> doConfirmPasswordReset(User user, String token, String password, String updater, String context)
- Specified by:
doConfirmPasswordResetin classAbstractUserWorkflowAdapter
-
doDelete
protected void doDelete(User user, String eraser, String context)
- Specified by:
doDeletein classAbstractUserWorkflowAdapter
-
executeNextTask
public UserWorkflowResult<String> executeNextTask(WorkflowTaskExecInput workflowTaskExecInput)
Description copied from interface:WorkflowTaskManagerExecute a task on an user.- Specified by:
executeNextTaskin 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:WorkflowTaskManagerGet tasks available for execution, for given user.- Specified by:
getAvailableTasksin interfaceWorkflowTaskManager- Parameters:
userKey- user key- Returns:
- available tasks
-
-