Interface UserRequestHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.AnyLifecycleEvent<org.apache.syncope.core.persistence.api.entity.Any<?>> 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.
      UserRequestForm getForm​(String userKey, String taskId)
      Get the form matching the provided task id.
      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.
      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.
      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.
      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.request.UserUR> submitForm​(UserRequestForm form)
      Submit a form.
      UserRequestForm unclaimForm​(String taskId)
      Unclaim a form for a given object.
    • Method Detail

      • getUserRequests

        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.
        Parameters:
        userKey - user key (optional)
        page - result page
        size - items per page
        orderByClauses - sort conditions
        Returns:
        total number of user requests, list of user requests matching the provided parameters
      • start

        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.
        Parameters:
        bpmnProcess - BPMN process
        user - user
        inputVariables - variables
        Returns:
        data about the started request service, including execution id
      • parse

        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.
        Parameters:
        executionId - execution id
        Returns:
        matching user request and owner
      • cancel

        void cancel​(org.flowable.engine.runtime.ProcessInstance procInst,
                    String reason)
        Cancel a running user request.
        Parameters:
        procInst - process instance for user request
        reason - reason to cancel the user request
      • cancelByProcessDefinition

        void cancelByProcessDefinition​(String processDefinitionId)
        Cancel all running user requests for the given process definition id.
        Parameters:
        processDefinitionId - process definition id
      • cancelByUser

        @TransactionalEventListener
        void cancelByUser​(org.apache.syncope.core.provisioning.api.event.AnyLifecycleEvent<org.apache.syncope.core.persistence.api.entity.Any<?>> event)
        Cancel all running user requests for the user in the given delete event.
        Parameters:
        event - delete event
      • getForm

        UserRequestForm getForm​(String userKey,
                                String taskId)
        Get the form matching the provided task id.
        Parameters:
        userKey - user key
        taskId - task id
        Returns:
        the form for the given task id
      • getForms

        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.
        Parameters:
        userKey - user key (optional)
        page - result page
        size - items per page
        orderByClauses - sort conditions
        Returns:
        total number of forms, list of forms matching the provided parameters
      • claimForm

        UserRequestForm claimForm​(String taskId)
        Claim a form for a given object.
        Parameters:
        taskId - Workflow task to which the form is associated
        Returns:
        updated form
      • unclaimForm

        UserRequestForm unclaimForm​(String taskId)
        Unclaim a form for a given object.
        Parameters:
        taskId - Workflow task to which the form is associated
        Returns:
        updated form
      • submitForm

        org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.syncope.common.lib.request.UserUR> submitForm​(UserRequestForm form)
        Submit a form.
        Parameters:
        form - to be submitted
        Returns:
        user updated by this form submit