@At @Ok("jsp") public void list() { MvcUtil.setAttribute(caches.flowByID().values()); MvcUtil.setAttribute("version", caches.flowVersionByFlowID()); MvcUtil.setAttribute("deployed", flowService.deployedFlows()); }
@At @Ok("void") public void resource( @Param("deploymentId") String deploymentId, @Param("resourceName") String resourceName) throws IOException { Streams.writeAndClose( Mvcs.getResp().getOutputStream(), flowService.resource(deploymentId, resourceName)); }
@At @Ok("jsp") public void permission(@Param("versionID") Integer versionID) { flowService.definitionEntity(versionID); }
@At public Msg deleteInstance(Delete delete) { flowService.delete(delete); return new Msg().setMessage("已取消"); }
@At @Ok("jsp") public void history(@Param("processInstanceId") String processInstanceId) { MvcUtil.setAttribute(flowService.history(processInstanceId)); }
@At public Msg complete(Complete complete) { flowService.complete(complete); return new Msg().setMessage("审批完成"); }
@At public Msg start(Map<String, String> variables) { flowService.start(variables); return new Msg().setMessage("申请成功"); }
@At @Ok("jsp") public void definition(@Param("deploymentId") String deploymentId) { MvcUtil.setAttribute(flowService.definition(deploymentId)); }
@At public void delete(@Param("deploymentId") String deploymentId) { flowService.delete(deploymentId); }
@At public void deploy(@Param("id") Integer id) throws IOException { flowService.deploy(id); }