@Transactional(propagation=REQUIRES_NEW,
rollbackFor=java.lang.Throwable.class)
public class FlowableUserRequestHandler
extends Object
implements UserRequestHandler
| Modifier and Type | Field and Description |
|---|---|
protected String |
adminUser |
protected org.apache.syncope.core.provisioning.api.data.UserDataBinder |
dataBinder |
protected DomainProcessEngine |
engine |
protected org.apache.syncope.core.persistence.api.entity.EntityFactory |
entityFactory |
protected static org.slf4j.Logger |
LOG |
protected org.apache.syncope.core.persistence.api.dao.UserDAO |
userDAO |
protected WorkflowTaskManager |
wfTaskManager |
| Constructor and Description |
|---|
FlowableUserRequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(org.flowable.engine.runtime.ProcessInstance procInst,
String reason)
Cancel a running user request.
|
void |
cancelByProcessDefinition(String processDefinitionId)
Cancel all running user requests for the given process definition id.
|
void |
cancelByUser(org.apache.syncope.core.provisioning.api.event.AnyDeletedEvent event)
Cancel all running user requests for the user in the given delete event.
|
UserRequestForm |
claimForm(String taskId)
Claim a form for a given object.
|
protected int |
countProcessInstances(StringBuilder processInstanceQuery) |
protected StringBuilder |
createProcessInstanceQuery(String userKey) |
protected UserRequestFormPropertyType |
fromFlowableFormType(org.flowable.engine.form.FormType flowableFormType) |
protected UserRequestForm |
getForm(org.flowable.task.api.history.HistoricTaskInstance task) |
UserRequestForm |
getForm(String userKey,
String taskId)
Get the form matching the provided task id.
|
protected UserRequestForm |
getForm(String procInstId,
String taskId,
String formKey,
List<org.flowable.engine.form.FormProperty> props) |
protected UserRequestForm |
getForm(org.flowable.task.api.Task task) |
protected UserRequestForm |
getForm(org.flowable.task.api.Task task,
org.flowable.engine.form.TaskFormData fd) |
org.apache.commons.lang3.tuple.Pair<Integer,List<UserRequestForm>> |
getForms(String userKey,
int page,
int size,
List<org.apache.syncope.core.persistence.api.dao.search.OrderByClause> orderByClauses)
Get the forms matching the provided parameters.
|
protected org.apache.commons.lang3.tuple.Pair<Integer,List<UserRequestForm>> |
getForms(org.flowable.task.api.TaskQuery query,
int page,
int size,
List<org.apache.syncope.core.persistence.api.dao.search.OrderByClause> orderByClauses) |
protected UserRequestForm |
getHistoricFormTO(String procInstId,
String taskId,
String formKey,
List<org.flowable.engine.impl.persistence.entity.HistoricFormPropertyEntity> props) |
protected <T> T |
getHistoricVariable(List<org.flowable.variable.api.history.HistoricVariableInstance> historicVariables,
String name,
Class<T> valueRef) |
protected Map<String,String> |
getPropertiesForSubmit(UserRequestForm form) |
protected org.flowable.task.api.Task |
getTask(String taskId) |
protected String |
getUserKey(String procInstId) |
protected UserRequest |
getUserRequest(org.flowable.engine.runtime.ProcessInstance procInst) |
org.apache.commons.lang3.tuple.Pair<Integer,List<UserRequest>> |
getUserRequests(String userKey,
int page,
int size,
List<org.apache.syncope.core.persistence.api.dao.search.OrderByClause> orderByClauses)
Get the running user requests matching the provided parameters.
|
protected org.apache.syncope.core.persistence.api.entity.user.User |
lazyLoad(org.apache.syncope.core.persistence.api.entity.user.User user) |
org.apache.commons.lang3.tuple.Pair<org.flowable.engine.runtime.ProcessInstance,String> |
parse(String executionId)
Parses the given execution id to find matching user request and owner.
|
protected org.apache.commons.lang3.tuple.Pair<org.flowable.task.api.Task,org.flowable.engine.form.TaskFormData> |
parseTask(String taskId) |
UserRequest |
start(String bpmnProcess,
org.apache.syncope.core.persistence.api.entity.user.User user,
WorkflowTaskExecInput inputVariables)
Starts a new user request, for the given BPMN process and user.
|
org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.syncope.common.lib.patch.UserPatch> |
submitForm(UserRequestForm form)
Submit a form.
|
UserRequestForm |
unclaimForm(String taskId)
Unclaim a form for a given object.
|
protected static final org.slf4j.Logger LOG
@Autowired protected WorkflowTaskManager wfTaskManager
@Autowired protected org.apache.syncope.core.provisioning.api.data.UserDataBinder dataBinder
protected String adminUser
@Autowired protected DomainProcessEngine engine
@Autowired protected org.apache.syncope.core.persistence.api.dao.UserDAO userDAO
@Autowired protected org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory
protected StringBuilder createProcessInstanceQuery(String userKey)
protected int countProcessInstances(StringBuilder processInstanceQuery)
protected UserRequest getUserRequest(org.flowable.engine.runtime.ProcessInstance procInst)
@Transactional(readOnly=true) public org.apache.commons.lang3.tuple.Pair<Integer,List<UserRequest>> getUserRequests(String userKey, int page, int size, List<org.apache.syncope.core.persistence.api.dao.search.OrderByClause> orderByClauses)
UserRequestHandlergetUserRequests in interface UserRequestHandleruserKey - user key (optional)page - result pagesize - items per pageorderByClauses - sort conditionsprotected org.apache.syncope.core.persistence.api.entity.user.User lazyLoad(org.apache.syncope.core.persistence.api.entity.user.User user)
public UserRequest start(String bpmnProcess, org.apache.syncope.core.persistence.api.entity.user.User user, WorkflowTaskExecInput inputVariables)
UserRequestHandlerstart in interface UserRequestHandlerbpmnProcess - BPMN processuser - userinputVariables - variablespublic org.apache.commons.lang3.tuple.Pair<org.flowable.engine.runtime.ProcessInstance,String> parse(String executionId)
UserRequestHandlerparse in interface UserRequestHandlerexecutionId - execution idpublic void cancel(org.flowable.engine.runtime.ProcessInstance procInst,
String reason)
UserRequestHandlercancel in interface UserRequestHandlerprocInst - process instance for user requestreason - reason to cancel the user requestpublic void cancelByProcessDefinition(String processDefinitionId)
UserRequestHandlercancelByProcessDefinition in interface UserRequestHandlerprocessDefinitionId - process definition idpublic void cancelByUser(org.apache.syncope.core.provisioning.api.event.AnyDeletedEvent event)
UserRequestHandlercancelByUser in interface UserRequestHandlerevent - delete eventprotected UserRequestFormPropertyType fromFlowableFormType(org.flowable.engine.form.FormType flowableFormType)
protected UserRequestForm getForm(org.flowable.task.api.Task task)
protected UserRequestForm getForm(org.flowable.task.api.Task task, org.flowable.engine.form.TaskFormData fd)
protected UserRequestForm getForm(org.flowable.task.api.history.HistoricTaskInstance task)
protected UserRequestForm getHistoricFormTO(String procInstId, String taskId, String formKey, List<org.flowable.engine.impl.persistence.entity.HistoricFormPropertyEntity> props)
protected UserRequestForm getForm(String procInstId, String taskId, String formKey, List<org.flowable.engine.form.FormProperty> props)
public UserRequestForm getForm(String userKey, String taskId)
UserRequestHandlergetForm in interface UserRequestHandleruserKey - user keytaskId - task id@Transactional(readOnly=true) public org.apache.commons.lang3.tuple.Pair<Integer,List<UserRequestForm>> getForms(String userKey, int page, int size, List<org.apache.syncope.core.persistence.api.dao.search.OrderByClause> orderByClauses)
UserRequestHandlergetForms in interface UserRequestHandleruserKey - user key (optional)page - result pagesize - items per pageorderByClauses - sort conditionsprotected org.apache.commons.lang3.tuple.Pair<Integer,List<UserRequestForm>> getForms(org.flowable.task.api.TaskQuery query, int page, int size, List<org.apache.syncope.core.persistence.api.dao.search.OrderByClause> orderByClauses)
protected org.apache.commons.lang3.tuple.Pair<org.flowable.task.api.Task,org.flowable.engine.form.TaskFormData> parseTask(String taskId)
protected org.flowable.task.api.Task getTask(String taskId) throws org.apache.syncope.core.persistence.api.dao.NotFoundException
org.apache.syncope.core.persistence.api.dao.NotFoundExceptionpublic UserRequestForm claimForm(String taskId)
UserRequestHandlerclaimForm in interface UserRequestHandlertaskId - Workflow task to which the form is associatedpublic UserRequestForm unclaimForm(String taskId)
UserRequestHandlerunclaimForm in interface UserRequestHandlertaskId - Workflow task to which the form is associatedprotected Map<String,String> getPropertiesForSubmit(UserRequestForm form)
protected <T> T getHistoricVariable(List<org.flowable.variable.api.history.HistoricVariableInstance> historicVariables, String name, Class<T> valueRef)
public org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.syncope.common.lib.patch.UserPatch> submitForm(UserRequestForm form)
UserRequestHandlersubmitForm in interface UserRequestHandlerform - to be submittedCopyright © 2010–2020 The Apache Software Foundation. All rights reserved.