Interface UserRequestService

    • Method Detail

      • listRequests

        @GET
        @Produces({"application/json","application/yaml","application/xml"})
        PagedResult<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"})
        UserRequest startRequest​(@NotNull @PathParam("bpmnProcess")
                                 @NotNull String bpmnProcess,
                                 @QueryParam("user")
                                 String user,
                                 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"})
        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"})
        PagedResult<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"})
        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"})
        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 UserRequestForm form)
        Submits a user request form.
        Parameters:
        form - user request form.
        Returns:
        Response object featuring the updated user enriched with propagation status information