tony 3 years ago
parent f735b9eb75
commit e20b3016a6

@ -31,7 +31,7 @@ public class FlowInstanceController {
@ApiOperation(value = "根据流程定义id启动流程实例") @ApiOperation(value = "根据流程定义id启动流程实例")
@PostMapping("/startBy/{procDefId}") @PostMapping("/startBy/{procDefId}")
public AjaxResult startById(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId, public AjaxResult startById(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
@ApiParam(value = "变量集合,json对象") @RequestBody @RequestParam(required = false) Map<String, Object> variables) { @ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
return flowInstanceService.startProcessInstanceById(procDefId, variables); return flowInstanceService.startProcessInstanceById(procDefId, variables);
} }

@ -127,7 +127,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
public AjaxResult readXml(String deployId) throws IOException { public AjaxResult readXml(String deployId) throws IOException {
ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult(); ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult();
InputStream inputStream = repositoryService.getResourceAsStream(definition.getDeploymentId(), definition.getResourceName()); InputStream inputStream = repositoryService.getResourceAsStream(definition.getDeploymentId(), definition.getResourceName());
String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8); String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8.name());
return AjaxResult.success("", result); return AjaxResult.success("", result);
} }

Loading…
Cancel
Save