Class FlowableUserRequestHandler
java.lang.Object
org.apache.syncope.core.flowable.impl.FlowableUserRequestHandler
- All Implemented Interfaces:
UserRequestHandler
@Transactional(propagation=REQUIRES_NEW,
rollbackFor=java.lang.Throwable.class)
public class FlowableUserRequestHandler
extends Object
implements UserRequestHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final UserDataBinderprotected final DomainProcessEngineprotected final EntityFactoryprotected static final Loggerprotected final UserDAO -
Constructor Summary
ConstructorsConstructorDescriptionFlowableUserRequestHandler(UserDataBinder dataBinder, String adminUser, DomainProcessEngine engine, UserDAO userDAO, EntityFactory entityFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(ProcessInstance procInst, String reason) Cancel a running user request.voidcancelByProcessDefinition(String processDefinitionId) Cancel all running user requests for the given process definition id.voidcancelByUser(EntityLifecycleEvent<Entity> event) Cancel all running user requests for the user in the given delete event.Claim a form for a given object.protected longcountProcessInstances(StringBuilder processInstanceQuery) protected StringBuildercreateProcessInstanceQuery(String userKey) protected static FormPropertyTypefromFlowableFormType(FormType flowableFormType) Get the form matching the provided task id.protected UserRequestFormprotected UserRequestFormgetForm(HistoricTaskInstance task) protected UserRequestFormprotected UserRequestFormgetForm(Task task, TaskFormData fd) org.springframework.data.domain.Page<UserRequestForm> Get the forms matching the provided parameters.protected org.springframework.data.domain.Page<UserRequestForm> protected UserRequestFormgetHistoricFormTO(String procInstId, String taskId, String formKey, List<HistoricFormPropertyEntity> props) protected <T> TgetHistoricVariable(List<HistoricVariableInstance> historicVariables, String name, Class<T> valueRef) protected Taskprotected StringgetUserKey(String procInstId) protected UserRequestgetUserRequest(ProcessInstance procInst) org.springframework.data.domain.Page<UserRequest> getUserRequests(String userKey, org.springframework.data.domain.Pageable pageable) Get the running user requests matching the provided parameters.protected UserParses the given execution id to find matching user request and owner.protected Pair<Task, TaskFormData> start(String bpmnProcess, User user, WorkflowTaskExecInput inputVariables) Starts a new user request, for the given BPMN process and user.submitForm(UserRequestForm form) Submit a form.unclaimForm(String taskId) Unclaim a form for a given object.
-
Field Details
-
LOG
-
dataBinder
-
adminUser
-
engine
-
userDAO
-
entityFactory
-
-
Constructor Details
-
FlowableUserRequestHandler
public FlowableUserRequestHandler(UserDataBinder dataBinder, String adminUser, DomainProcessEngine engine, UserDAO userDAO, EntityFactory entityFactory)
-
-
Method Details
-
createProcessInstanceQuery
-
countProcessInstances
-
getUserRequest
-
getUserRequests
@Transactional(readOnly=true) public org.springframework.data.domain.Page<UserRequest> getUserRequests(String userKey, org.springframework.data.domain.Pageable pageable) Description copied from interface:UserRequestHandlerGet the running user requests matching the provided parameters.- Specified by:
getUserRequestsin interfaceUserRequestHandler- Parameters:
userKey- user key (optional)pageable- paging information- Returns:
- total number of user requests, list of user requests matching the provided parameters
-
lazyLoad
-
start
Description copied from interface:UserRequestHandlerStarts a new user request, for the given BPMN process and user.- Specified by:
startin interfaceUserRequestHandler- Parameters:
bpmnProcess- BPMN processuser- userinputVariables- variables- Returns:
- data about the started request service, including execution id
-
parse
Description copied from interface:UserRequestHandlerParses the given execution id to find matching user request and owner.- Specified by:
parsein interfaceUserRequestHandler- Parameters:
executionId- execution id- Returns:
- matching user request and owner
-
cancel
Description copied from interface:UserRequestHandlerCancel a running user request.- Specified by:
cancelin interfaceUserRequestHandler- Parameters:
procInst- process instance for user requestreason- reason to cancel the user request
-
cancelByProcessDefinition
Description copied from interface:UserRequestHandlerCancel all running user requests for the given process definition id.- Specified by:
cancelByProcessDefinitionin interfaceUserRequestHandler- Parameters:
processDefinitionId- process definition id
-
cancelByUser
Description copied from interface:UserRequestHandlerCancel all running user requests for the user in the given delete event.- Specified by:
cancelByUserin interfaceUserRequestHandler- Parameters:
event- delete event
-
fromFlowableFormType
-
getForm
-
getForm
-
getForm
-
getUserKey
-
getHistoricFormTO
protected UserRequestForm getHistoricFormTO(String procInstId, String taskId, String formKey, List<HistoricFormPropertyEntity> props) -
getForm
protected UserRequestForm getForm(String procInstId, String taskId, String formKey, List<FormProperty> props) -
getForm
Description copied from interface:UserRequestHandlerGet the form matching the provided task id.- Specified by:
getFormin interfaceUserRequestHandler- Parameters:
userKey- user keytaskId- task id- Returns:
- the form for the given task id
-
getForms
@Transactional(readOnly=true) public org.springframework.data.domain.Page<UserRequestForm> getForms(String userKey, org.springframework.data.domain.Pageable pageable) Description copied from interface:UserRequestHandlerGet the forms matching the provided parameters.- Specified by:
getFormsin interfaceUserRequestHandler- Parameters:
userKey- user key (optional)pageable- paging information- Returns:
- total number of forms, list of forms matching the provided parameters
-
getForms
protected org.springframework.data.domain.Page<UserRequestForm> getForms(TaskQuery query, org.springframework.data.domain.Pageable pageable) -
parseTask
-
getTask
- Throws:
NotFoundException
-
claimForm
Description copied from interface:UserRequestHandlerClaim a form for a given object.- Specified by:
claimFormin interfaceUserRequestHandler- Parameters:
taskId- Workflow task to which the form is associated- Returns:
- updated form
-
unclaimForm
Description copied from interface:UserRequestHandlerUnclaim a form for a given object.- Specified by:
unclaimFormin interfaceUserRequestHandler- Parameters:
taskId- Workflow task to which the form is associated- Returns:
- updated form
-
getPropertiesForSubmit
-
getHistoricVariable
protected <T> T getHistoricVariable(List<HistoricVariableInstance> historicVariables, String name, Class<T> valueRef) -
submitForm
Description copied from interface:UserRequestHandlerSubmit a form.- Specified by:
submitFormin interfaceUserRequestHandler- Parameters:
form- to be submitted- Returns:
- user updated by this form submit
-