Activti6.0通过运行时服务修改流程定义的内容

ProcessDefinition processDefinition =
				repositoryService.createProcessDefinitionQuery().singleResult();
		Map<String, Object> map = Maps.newHashMap();
		map.put("key1", "value1");
		map.put("key2", "value2");
		ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinition.getId());
		LOGGER.info("processInstance = {}", processInstance);

		runtimeService.setVariable(processInstance.getId(), "key3", "values3");
		runtimeService.setVariable(processInstance.getId(), "key2", "key2-1");
		Map<String, Object> variables = runtimeService.getVariables(processInstance.getId());
		LOGGER.info("variables = {}", variables);

猜你喜欢

转载自blog.csdn.net/qq_42046342/article/details/100863097