return str;
}
public static void dataVariableCalculate(String scriptText, ExecutionContext executionContext){
DataVariableMgmtInstance dataVariableMgmtInstance = executionContext.getProcessInstance().getDataVariableMgmtInstance();
List<String> dataVariableList = getDataVariableList(scriptText);
for (String expressionId : dataVariableList) {
if (dataVariableMgmtInstance.getDataVariableByExpressionId(expressionId) == null) {
List<DataVariableBehavior> dataVariableBehaviors = dataVariableMgmtInstance.getProcessInstance().getProcessDefinition().getDataVariableMgmtDefinition()
.getDataVariableBehaviorsByProcess();
for (DataVariableBehavior dataVariableBehavior : dataVariableBehaviors) {
if (dataVariableBehavior.getId().equals(expressionId)) {
DataVariableEntity dataVariableEntity = dataVariableMgmtInstance.createDataVariableInstance(dataVariableBehavior);
dataVariableEntity.executeExpression(executionContext);
}else{
if(dataVariableBehavior.getBizType()!=null&&!dataVariableBehavior.getBizType().equals("")&&dataVariableBehavior.getBizType().equals(DataVariableEntity.QUERY_DATA_KEY)){
DataVariableEntity dataVariableEntity = dataVariableMgmtInstance.createDataVariableInstance(dataVariableBehavior);
dataVariableEntity.executeExpression(executionContext);
}
}
}