update 优化 WorkflowService 增加获取流程变量方法
This commit is contained in:
parent
a22dc9537f
commit
2d99304396
@ -46,6 +46,13 @@ public interface WorkflowService {
|
|||||||
*/
|
*/
|
||||||
void setVariable(Long instanceId, Map<String, Object> variable);
|
void setVariable(Long instanceId, Map<String, Object> variable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程变量
|
||||||
|
*
|
||||||
|
* @param instanceId 流程实例id
|
||||||
|
*/
|
||||||
|
Map<String, Object> instanceVariable(Long instanceId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按照业务id查询流程实例id
|
* 按照业务id查询流程实例id
|
||||||
*
|
*
|
||||||
|
@ -123,7 +123,7 @@ public interface IFlwInstanceService {
|
|||||||
* @param instanceId 实例id
|
* @param instanceId 实例id
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
Map<String, Object> instanceVariable(String instanceId);
|
Map<String, Object> instanceVariable(Long instanceId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置流程变量
|
* 设置流程变量
|
||||||
|
@ -344,7 +344,7 @@ public class FlwInstanceServiceImpl implements IFlwInstanceService {
|
|||||||
* @param instanceId 实例id
|
* @param instanceId 实例id
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> instanceVariable(String instanceId) {
|
public Map<String, Object> instanceVariable(Long instanceId) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
FlowInstance flowInstance = flowInstanceMapper.selectById(instanceId);
|
FlowInstance flowInstance = flowInstanceMapper.selectById(instanceId);
|
||||||
Map<String, Object> variableMap = flowInstance.getVariableMap();
|
Map<String, Object> variableMap = flowInstance.getVariableMap();
|
||||||
|
@ -78,6 +78,16 @@ public class WorkflowServiceImpl implements WorkflowService {
|
|||||||
flwInstanceService.setVariable(instanceId, variables);
|
flwInstanceService.setVariable(instanceId, variables);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程变量
|
||||||
|
*
|
||||||
|
* @param instanceId 流程实例id
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> instanceVariable(Long instanceId) {
|
||||||
|
return flwInstanceService.instanceVariable(instanceId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按照业务id查询流程实例id
|
* 按照业务id查询流程实例id
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user