Skip to content

Commit 8e11ed1

Browse files
committed
fix: 分支规则正则优化#AI Commit#
1 parent 24193ad commit 8e11ed1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • dss-orchestrator/orchestrators/dss-workflow

dss-orchestrator/orchestrators/dss-workflow/dss-flow-execution-server/src/main/scala/com/webank/wedatasphere/dss/flow/execution/entrance/utils/BranchExpressionUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ object BranchExpressionUtils extends Logging {
172172
}
173173
}
174174

175-
private val StrictConditionPattern = "^[A-Za-z0-9_.-]+\s*(==|!=|>=|<=|>|<)\s*([A-Za-z0-9_.-]+|\"[^\"]*\"|'[^']*')$".r
175+
private val StrictConditionPattern = "^[A-Za-z0-9_.-]+\\s*(==|!=|>=|<=|>|<)\\s*([A-Za-z0-9_.-]+|\"[^\"]*\"|'[^']*')$".r
176176

177177
def isStrictConditionSyntaxValid(condition: String): Boolean = {
178178
val normalized = Option(condition).map(_.trim).getOrElse("")

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/service/impl/DSSFlowServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public class DSSFlowServiceImpl implements DSSFlowService {
173173
private static final String nodeUIViewIdKey = "viewId";
174174

175175
private static final Pattern pattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9_-]*$");
176-
private static final Pattern STRICT_BRANCH_CONDITION_PATTERN = Pattern.compile("^[A-Za-z0-9_.-]+\\s*(==|!=|>=|<=|>|<)\\s*([A-Za-z0-9_.-]+|\\"[^\\"]*\\"|'[^']*')$");
176+
private static final Pattern STRICT_BRANCH_CONDITION_PATTERN = Pattern.compile("^[A-Za-z0-9_.-]+\\s*(==|!=|>=|<=|>|<)\\s*([A-Za-z0-9_.-]+|\"[^\"]*\"|'[^']*')$");
177177
private static final String BRANCH_NODE_TYPE = "workflow.branch";
178178

179179
protected Sender getOrchestratorSender() {

0 commit comments

Comments
 (0)