@RestController
public class TaskVariableResource extends TaskVariableBaseResource {
@Autowired
protected ObjectMapper objectMapper;
public TaskVariableResource() {}
@RequestMapping( value = {"/runtime/tasks/{taskId}/variables/{variableName}"}, method = {RequestMethod.GET}, produces = {"application/json"} )
public RestVariable getVariable(@PathVariable("taskId") String taskId, @PathVariable("variableName") String variableName, @RequestParam(
value = "scope", required = false) String scope, HttpServletRequest request, HttpServletResponse response) {
return this.getVariableFromRequest(taskId, variableName, scope, false);
}
@RequestMapping( value = {"/runtime/tasks/{taskId}/variables/{variableName}"}, method = {RequestMethod.PUT}, produces = {"application/json"})
public RestVariable updateVariable(@PathVariable("taskId") String taskId, @PathVariable("variableName") String variableName, @RequestParam(
value = "scope", required = false) String scope, HttpServletRequest request) {
Task task = this.getTaskFromRequest(taskId);
RestVariable result = null;
..................
return result;
}
@RequestMapping( value = {"/runtime/tasks/{taskId}/variables/{variableName}"}, method = {RequestMethod.DELETE} )
public void deleteVariable(@PathVariable("taskId") String taskId, @PathVariable("variableName") String variableName, @RequestParam(
value = "scope", required = false) String scopeString, HttpServletResponse response) {
}
@RequestMapping( value = {"/runtime/tasks/{taskId}/identitylinks"}, method = {RequestMethod.POST}, produces = {"application/json"})
public RestIdentityLink createIdentityLink(@PathVariable("taskId") String taskId, @RequestBody RestIdentityLink identityLink, HttpServletRequest request, HttpServletResponse response) {
...........................
return this.restResponseFactory.createRestIdentityLink(identityLink.getType(), identityLink.getUser(), identityLink.getGroup(), task.getId(), (String)null, (String)null);
}
}
activiti标准restful例子
最新推荐文章于 2019-06-26 15:51:19 发布