Package com.bytedesk.ticket.flow
Class TicketFlowController
java.lang.Object
com.bytedesk.ticket.flow.TicketFlowController
@RestController
@RequestMapping("/api/v1/ticket/flow")
public class TicketFlowController
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TicketCommentService
private final TicketFlowService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<JsonResult<Boolean>>
activateProcess
(String processInstanceId) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
addComment
(String taskId, String message, String userId) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
assignTask
(String taskId, String assignee) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
completeTask
(String taskId, Map<String, Object> variables) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.task.api.Task>>>
getGroupTasks
(String groupId) org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.engine.history.HistoricProcessInstance>>>
getHistory
(String ticketId) org.springframework.http.ResponseEntity<JsonResult<org.flowable.engine.repository.ProcessDefinition>>
org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.engine.task.Comment>>>
getProcessComments
(String processInstanceId) org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.engine.task.Comment>>>
getTaskComments
(String taskId) org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.task.api.Task>>>
getUserTasks
(String assignee) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
startProcess
(TicketEntity ticket) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
submitSurvey
(String taskId, int rating, String comment) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
supervisorReview
(String taskId, boolean reassign) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
suspendProcess
(String processInstanceId) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
terminateProcess
(String processInstanceId, String reason) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
verifyTicket
(String taskId, boolean approved)
-
Field Details
-
ticketFlowService
-
commentService
-
-
Constructor Details
-
TicketFlowController
public TicketFlowController()
-
-
Method Details
-
startProcess
@PostMapping("/start") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> startProcess(@RequestBody TicketEntity ticket) -
assignTask
@PutMapping("/task/{taskId}/assign") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> assignTask(@PathVariable String taskId, @RequestParam String assignee) -
completeTask
-
addComment
@PostMapping("/task/{taskId}/comment") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> addComment(@PathVariable String taskId, @RequestParam String message, @RequestParam String userId) -
getUserTasks
@GetMapping("/tasks") public org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.task.api.Task>>> getUserTasks(@RequestParam String assignee) -
deployProcess
@PostMapping("/deploy") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> deployProcess() -
getLatestDefinition
@GetMapping("/definition/latest") public org.springframework.http.ResponseEntity<JsonResult<org.flowable.engine.repository.ProcessDefinition>> getLatestDefinition() -
getHistory
@GetMapping("/history/{ticketId}") public org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.engine.history.HistoricProcessInstance>>> getHistory(@PathVariable String ticketId) -
terminateProcess
@DeleteMapping("/process/{processInstanceId}") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> terminateProcess(@PathVariable String processInstanceId, @RequestParam String reason) -
suspendProcess
@PutMapping("/process/{processInstanceId}/suspend") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> suspendProcess(@PathVariable String processInstanceId) -
activateProcess
@PutMapping("/process/{processInstanceId}/activate") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> activateProcess(@PathVariable String processInstanceId) -
verifyTicket
@PutMapping("/task/{taskId}/verify") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> verifyTicket(@PathVariable String taskId, @RequestParam boolean approved) -
submitSurvey
@PutMapping("/task/{taskId}/survey") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> submitSurvey(@PathVariable String taskId, @RequestParam int rating, @RequestParam String comment) -
supervisorReview
@PutMapping("/task/{taskId}/review") public org.springframework.http.ResponseEntity<JsonResult<Boolean>> supervisorReview(@PathVariable String taskId, @RequestParam boolean reassign) -
getGroupTasks
@GetMapping("/tasks/group/{groupId}") public org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.task.api.Task>>> getGroupTasks(@PathVariable String groupId) -
getTaskComments
@GetMapping("/task/{taskId}/comments") public org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.engine.task.Comment>>> getTaskComments(@PathVariable String taskId) -
getProcessComments
@GetMapping("/process/{processInstanceId}/comments") public org.springframework.http.ResponseEntity<JsonResult<List<org.flowable.engine.task.Comment>>> getProcessComments(@PathVariable String processInstanceId)
-