SpringBoot启动activiti的流程,测试的时候如何发送这个url的post请求? 10
/****开始流程*/@PostMapping(value="/startProcessInstance")@ApiOperation(value="开始流程",note...
/*** * 开始流程 */ @PostMapping(value = "/startProcessInstance") @ApiOperation(value = "开始流程", notes = "开始流程") public R startProcessInstance(@RequestBody @Validated @ApiParam(value = "开始流程请求对象") @Valid StartProcessInstanceReq startProcessInstanceReq) { try { Map<String, Object> variables = startProcessInstanceReq.getVariables();//流程配置参数 variables.put("applyUserId", startProcessInstanceReq.getApplyUserId());//流程发起人 ProcessInstance processInstance = activitiService.startProcessInstance(startProcessInstanceReq.getInstanceKey(), variables); log.debug("processInstance:" + processInstance.getProcessDefinitionId()); return R.ok().put("processInstanceId", processInstance.getId()); } catch (Exception e) { return R.error(-1, e.getMessage()); } }
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询