diff --git a/packages/core/client/src/locale/en_US.ts b/packages/core/client/src/locale/en_US.ts
index 2c0873982..d9266ac1f 100644
--- a/packages/core/client/src/locale/en_US.ts
+++ b/packages/core/client/src/locale/en_US.ts
@@ -284,4 +284,5 @@ export default {
// workflows
'Execution History': 'History',
+ 'Parallel branch': 'Branch',
}
diff --git a/packages/core/client/src/locale/zh_CN.ts b/packages/core/client/src/locale/zh_CN.ts
index 1009046dc..918cfa66b 100644
--- a/packages/core/client/src/locale/zh_CN.ts
+++ b/packages/core/client/src/locale/zh_CN.ts
@@ -460,13 +460,11 @@ export default {
'Condition': '条件判断',
'Mode': '模式',
- 'Reject on false': '通行模式',
- 'Branch results': '分支模式',
- 'Continue when result is "Yes"': '判断为“是”时继续',
- 'Make 2 branches for "Yes" and "No"': '判断结果分为“是”和“否”两个分支,分别继续',
+ 'Continue when "Yes"': '“是”则继续',
+ 'Branch into "Yes" and "No"': '“是”和“否”分别继续',
'Conditions': '条件配置',
- 'Parallel': '并行',
+ 'Parallel branch': '分支',
'All succeeded': '全部成功',
'Any succeeded': '任意成功',
'Continue after all branches succeeded': '全部分支都成功后才能继续',
diff --git a/packages/core/client/src/workflow/nodes/condition.tsx b/packages/core/client/src/workflow/nodes/condition.tsx
index c379bc03d..b571acb52 100644
--- a/packages/core/client/src/workflow/nodes/condition.tsx
+++ b/packages/core/client/src/workflow/nodes/condition.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { css, cx } from "@emotion/css";
-import { Button, Select, Tooltip } from "antd";
-import { CloseCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons';
+import { Button, Select } from "antd";
+import { CloseCircleOutlined } from '@ant-design/icons';
import { Trans, useTranslation } from "react-i18next";
import { NodeDefaultView } from ".";
@@ -150,25 +150,11 @@ export default {
enum: [
{
value: true,
- label: (
-
- {i18n.t('Reject on false')}
-
- )
+ label: i18n.t('Continue when "Yes"')
},
{
value: false,
- label: (
-
- {i18n.t('Branch results')}
-
- )
+ label: i18n.t('Branch results')
}
],
},
diff --git a/packages/core/client/src/workflow/nodes/parallel.tsx b/packages/core/client/src/workflow/nodes/parallel.tsx
index 10f9a86d6..6d9ca4e43 100644
--- a/packages/core/client/src/workflow/nodes/parallel.tsx
+++ b/packages/core/client/src/workflow/nodes/parallel.tsx
@@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next";
// import { SchemaComponent } from "../../schema-component";
export default {
- title: '{{t("Parallel")}}',
+ title: '{{t("Parallel branch")}}',
type: 'parallel',
group: 'control',
fieldset: {
@@ -39,7 +39,7 @@ export default {
value: 'any',
label: (
{i18n.t('Any succeeded')}
diff --git a/packages/core/client/src/workflow/schemas/workflows.ts b/packages/core/client/src/workflow/schemas/workflows.ts
index a5f0ad0fa..4fc0909d9 100644
--- a/packages/core/client/src/workflow/schemas/workflows.ts
+++ b/packages/core/client/src/workflow/schemas/workflows.ts
@@ -55,6 +55,7 @@ const collection = {
],
'x-component': 'Radio.Group',
'x-decorator': 'FormItem',
+ default: false
} as ISchema
}
],
diff --git a/packages/plugins/workflow/src/collections/workflows.ts b/packages/plugins/workflow/src/collections/workflows.ts
index d900fca9d..16ec7a834 100644
--- a/packages/plugins/workflow/src/collections/workflows.ts
+++ b/packages/plugins/workflow/src/collections/workflows.ts
@@ -16,7 +16,8 @@ export default {
interface: 'boolean',
type: 'boolean',
name: 'enabled',
- title: '启用'
+ title: '启用',
+ defaultValue: false
},
{
interface: 'textarea',
diff --git a/packages/plugins/workflow/src/triggers/collection.ts b/packages/plugins/workflow/src/triggers/collection.ts
index dbceee728..a778ec5ef 100644
--- a/packages/plugins/workflow/src/triggers/collection.ts
+++ b/packages/plugins/workflow/src/triggers/collection.ts
@@ -45,7 +45,7 @@ export default {
if (!Collection) {
return;
}
- // TODO: duplication when mode change should be considered
+
for (let [key, event] of MODE_BITMAP_EVENTS.entries()) {
if (mode & key) {
if (!Collection.model.options.hooks[event]?.find(item => item.name && item.name === this.getHookId())) {