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,org.apache.syncope.core.workflow.api.UserWorkflowAdapter,org.apache.syncope.core.workflow.api.WorkflowAdapter
public class FlowableUserWorkflowAdapter extends AbstractUserWorkflowAdapter implements WorkflowTaskManager
-
-
Field Summary
Fields Modifier and Type Field Description protected DomainProcessEngineengineprotected org.springframework.context.ApplicationEventPublisherpublisherprotected UserRequestHandleruserRequestHandler-
Fields inherited from class org.apache.syncope.core.workflow.java.AbstractUserWorkflowAdapter
dataBinder, entityFactory, LOG, perContextAccountRules, perContextPasswordRules, realmDAO, securityProperties, userDAO
-
-
Constructor Summary
Constructors Constructor Description FlowableUserWorkflowAdapter(org.apache.syncope.core.provisioning.api.data.UserDataBinder dataBinder, org.apache.syncope.core.persistence.api.dao.UserDAO userDAO, org.apache.syncope.core.persistence.api.dao.RealmDAO realmDAO, org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory, org.apache.syncope.core.spring.security.SecurityProperties securityProperties, DomainProcessEngine engine, UserRequestHandler userRequestHandler, org.springframework.context.ApplicationEventPublisher publisher)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<String>doActivate(org.apache.syncope.core.persistence.api.entity.user.User user, String token, String updater, String context)protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<org.apache.syncope.common.lib.request.UserUR,Boolean>>doConfirmPasswordReset(org.apache.syncope.core.persistence.api.entity.user.User user, String token, String password, String updater, String context)protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<String,Boolean>>doCreate(org.apache.syncope.common.lib.request.UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context)protected voiddoDelete(org.apache.syncope.core.persistence.api.entity.user.User user, String eraser, String context)protected Set<String>doExecuteNextTask(String procInstID, org.apache.syncope.core.persistence.api.entity.user.User user, Map<String,Object> moreVariables)protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<String>doReactivate(org.apache.syncope.core.persistence.api.entity.user.User user, String updater, String context)protected voiddoRequestPasswordReset(org.apache.syncope.core.persistence.api.entity.user.User user, String updater, String context)protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<String>doSuspend(org.apache.syncope.core.persistence.api.entity.user.User user, String updater, String context)protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<org.apache.syncope.common.lib.request.UserUR,Boolean>>doUpdate(org.apache.syncope.core.persistence.api.entity.user.User user, org.apache.syncope.common.lib.request.UserUR userUR, String updater, String context)org.apache.syncope.core.provisioning.api.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 org.apache.syncope.core.persistence.api.entity.user.UserlazyLoad(org.apache.syncope.core.persistence.api.entity.user.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, getAccountPolicies, getAccountRules, getPasswordPolicies, getPasswordRules, 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
-
publisher
protected final org.springframework.context.ApplicationEventPublisher publisher
-
-
Constructor Detail
-
FlowableUserWorkflowAdapter
public FlowableUserWorkflowAdapter(org.apache.syncope.core.provisioning.api.data.UserDataBinder dataBinder, org.apache.syncope.core.persistence.api.dao.UserDAO userDAO, org.apache.syncope.core.persistence.api.dao.RealmDAO realmDAO, org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory, org.apache.syncope.core.spring.security.SecurityProperties securityProperties, DomainProcessEngine engine, UserRequestHandler userRequestHandler, org.springframework.context.ApplicationEventPublisher publisher)
-
-
Method Detail
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceorg.apache.syncope.core.workflow.api.WorkflowAdapter- Overrides:
getPrefixin classAbstractUserWorkflowAdapter
-
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
-
lazyLoad
protected org.apache.syncope.core.persistence.api.entity.user.User lazyLoad(org.apache.syncope.core.persistence.api.entity.user.User user)
-
doCreate
protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<String,Boolean>> doCreate(org.apache.syncope.common.lib.request.UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context)
- Specified by:
doCreatein classAbstractUserWorkflowAdapter
-
doExecuteNextTask
protected Set<String> doExecuteNextTask(String procInstID, org.apache.syncope.core.persistence.api.entity.user.User user, Map<String,Object> moreVariables)
-
doActivate
protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<String> doActivate(org.apache.syncope.core.persistence.api.entity.user.User user, String token, String updater, String context)
- Specified by:
doActivatein classAbstractUserWorkflowAdapter
-
doUpdate
protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<org.apache.syncope.common.lib.request.UserUR,Boolean>> doUpdate(org.apache.syncope.core.persistence.api.entity.user.User user, org.apache.syncope.common.lib.request.UserUR userUR, String updater, String context)
- Specified by:
doUpdatein classAbstractUserWorkflowAdapter
-
doSuspend
protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<String> doSuspend(org.apache.syncope.core.persistence.api.entity.user.User user, String updater, String context)
- Specified by:
doSuspendin classAbstractUserWorkflowAdapter
-
doReactivate
protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<String> doReactivate(org.apache.syncope.core.persistence.api.entity.user.User user, String updater, String context)
- Specified by:
doReactivatein classAbstractUserWorkflowAdapter
-
doRequestPasswordReset
protected void doRequestPasswordReset(org.apache.syncope.core.persistence.api.entity.user.User user, String updater, String context)- Specified by:
doRequestPasswordResetin classAbstractUserWorkflowAdapter
-
doConfirmPasswordReset
protected org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<org.apache.syncope.common.lib.request.UserUR,Boolean>> doConfirmPasswordReset(org.apache.syncope.core.persistence.api.entity.user.User user, String token, String password, String updater, String context)
- Specified by:
doConfirmPasswordResetin classAbstractUserWorkflowAdapter
-
doDelete
protected void doDelete(org.apache.syncope.core.persistence.api.entity.user.User user, String eraser, String context)- Specified by:
doDeletein classAbstractUserWorkflowAdapter
-
executeNextTask
public org.apache.syncope.core.provisioning.api.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
-
-