Interface UserRequestService

  • All Superinterfaces:
    org.apache.syncope.common.rest.api.service.JAXRSService

    @Path("flowable/userRequests")
    public interface UserRequestService
    extends org.apache.syncope.common.rest.api.service.JAXRSService
    REST operations related to user workflow.
    • Field Summary

      • Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService

        CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cancelRequest​(@NotNull String executionId, String reason)
      Cancel a running user request.
      org.apache.syncope.common.lib.to.UserRequestForm claimForm​(@NotNull String taskId)
      Requests to manage the form for the given task id.
      org.apache.syncope.common.lib.to.UserRequestForm getForm​(@NotNull String username, @NotNull String taskId)
      Returns a user request form matching the given task id.
      org.apache.syncope.common.lib.to.PagedResult<org.apache.syncope.common.lib.to.UserRequestForm> listForms​(UserRequestQuery query)
      Returns a list of user request forms matching the given query.
      org.apache.syncope.common.lib.to.PagedResult<org.apache.syncope.common.lib.to.UserRequest> listRequests​(UserRequestQuery query)
      Returns a list of running user requests matching the given query.
      org.apache.syncope.common.lib.to.UserRequest startRequest​(@NotNull String bpmnProcess, String user, org.apache.syncope.common.lib.to.WorkflowTaskExecInput inputVariables)
      Starts a new request for the given BPMN Process and user (if provided) or requesting user (if not provided).
      javax.ws.rs.core.Response submitForm​(@NotNull org.apache.syncope.common.lib.to.UserRequestForm form)
      Submits a user request form.
      org.apache.syncope.common.lib.to.UserRequestForm unclaimForm​(@NotNull String taskId)
      Cancels request to manage the form for the given task id.
    • Method Detail

      • listRequests

        @GET
        @Produces({"application/json","application/yaml","application/xml"})
        org.apache.syncope.common.lib.to.PagedResult<org.apache.syncope.common.lib.to.UserRequest> listRequests​(@BeanParam
                                                                                                                UserRequestQuery query)
        Returns a list of running user requests matching the given query.
        Parameters:
        query - query conditions
        Returns:
        list of all running user requests
      • startRequest

        @POST
        @Path("start/{bpmnProcess}")
        @Produces({"application/json","application/yaml","application/xml"})
        @Consumes({"application/json","application/yaml","application/xml"})
        org.apache.syncope.common.lib.to.UserRequest startRequest​(@NotNull @PathParam("bpmnProcess")
                                                                  @NotNull String bpmnProcess,
                                                                  @QueryParam("user")
                                                                  String user,
                                                                  org.apache.syncope.common.lib.to.WorkflowTaskExecInput inputVariables)
        Starts a new request for the given BPMN Process and user (if provided) or requesting user (if not provided).
        Parameters:
        bpmnProcess - BPMN process
        user - if value looks like a UUID then it is interpreted as key otherwise as a username
        inputVariables - initial request variables
        Returns:
        data about the started request service, including execution id
      • cancelRequest

        @DELETE
        @Path("{executionId}")
        @Produces({"application/json","application/yaml","application/xml"})
        void cancelRequest​(@NotNull @PathParam("executionId")
                           @NotNull String executionId,
                           @QueryParam("reason")
                           String reason)
        Cancel a running user request.
        Parameters:
        executionId - execution id
        reason - reason to cancel the user request
      • getForm

        @GET
        @Path("forms/{username}/{taskId}")
        @Produces({"application/json","application/yaml","application/xml"})
        org.apache.syncope.common.lib.to.UserRequestForm getForm​(@NotNull @PathParam("username")
                                                                 @NotNull String username,
                                                                 @NotNull @PathParam("taskId")
                                                                 @NotNull String taskId)
        Returns a user request form matching the given task id.
        Parameters:
        username - username of the logged user
        taskId - workflow task id
        Returns:
        the form for the given task id
      • listForms

        @GET
        @Path("forms")
        @Produces({"application/json","application/yaml","application/xml"})
        org.apache.syncope.common.lib.to.PagedResult<org.apache.syncope.common.lib.to.UserRequestForm> listForms​(@BeanParam
                                                                                                                 UserRequestQuery query)
        Returns a list of user request forms matching the given query.
        Parameters:
        query - query conditions
        Returns:
        list of all available user request forms
      • claimForm

        @POST
        @Path("forms/{taskId}/claim")
        @Produces({"application/json","application/yaml","application/xml"})
        org.apache.syncope.common.lib.to.UserRequestForm claimForm​(@NotNull @PathParam("taskId")
                                                                   @NotNull String taskId)
        Requests to manage the form for the given task id.
        Parameters:
        taskId - workflow task id
        Returns:
        the form for the given task id
      • unclaimForm

        @POST
        @Path("forms/{taskId}/unclaim")
        @Produces({"application/json","application/yaml","application/xml"})
        org.apache.syncope.common.lib.to.UserRequestForm unclaimForm​(@NotNull @PathParam("taskId")
                                                                     @NotNull String taskId)
        Cancels request to manage the form for the given task id.
        Parameters:
        taskId - workflow task id
        Returns:
        the workflow form for the given task id
      • submitForm

        @POST
        @Path("forms")
        @Produces({"application/json","application/yaml","application/xml"})
        @Consumes({"application/json","application/yaml","application/xml"})
        javax.ws.rs.core.Response submitForm​(@NotNull
                                             @NotNull org.apache.syncope.common.lib.to.UserRequestForm form)
        Submits a user request form.
        Parameters:
        form - user request form.
        Returns:
        Response object featuring the updated user enriched with propagation status information