fix(plugin-workflow-manual): fix value block in todo block (#3400)
This commit is contained in:
parent
d3704f6807
commit
6f72451d27
@ -416,7 +416,6 @@ export function SchemaConfig({ value, onChange }) {
|
|||||||
const nodeComponents = {};
|
const nodeComponents = {};
|
||||||
nodes.forEach((item) => {
|
nodes.forEach((item) => {
|
||||||
const instruction = workflowPlugin.instructions.get(item.type);
|
const instruction = workflowPlugin.instructions.get(item.type);
|
||||||
Object.assign(nodeInitializers, instruction.initializers);
|
|
||||||
Object.assign(nodeComponents, instruction.components);
|
Object.assign(nodeComponents, instruction.components);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ function Result({ dataSource }) {
|
|||||||
}
|
}
|
||||||
const result = parse(dataSource)({
|
const result = parse(dataSource)({
|
||||||
$jobsMapByNodeKey: (execution.jobs ?? []).reduce(
|
$jobsMapByNodeKey: (execution.jobs ?? []).reduce(
|
||||||
(map, job) => Object.assign(map, { [job.nodeId]: job.result }),
|
(map, job) => Object.assign(map, { [job.nodeKey]: job.result }),
|
||||||
{},
|
{},
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
@ -16,6 +16,10 @@ export default {
|
|||||||
name: 'node',
|
name: 'node',
|
||||||
target: 'flow_nodes',
|
target: 'flow_nodes',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'string',
|
||||||
|
name: 'nodeKey',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'belongsTo',
|
type: 'belongsTo',
|
||||||
name: 'upstream',
|
name: 'upstream',
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
import { Migration } from '@nocobase/server';
|
||||||
|
|
||||||
|
export default class extends Migration {
|
||||||
|
appVersion = '<0.19.0-alpha.4';
|
||||||
|
on = 'afterSync';
|
||||||
|
async up() {
|
||||||
|
const { db } = this.context;
|
||||||
|
|
||||||
|
const PluginModel = db.getModel('applicationPlugins');
|
||||||
|
const JobRepo = db.getRepository('jobs');
|
||||||
|
await db.sequelize.transaction(async (transaction) => {
|
||||||
|
const jobs = await JobRepo.find({
|
||||||
|
appends: ['node.key'],
|
||||||
|
});
|
||||||
|
await jobs.reduce(
|
||||||
|
(promise, job) =>
|
||||||
|
promise.then(() => {
|
||||||
|
if (job.nodeKey) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return job.update(
|
||||||
|
{
|
||||||
|
nodeKey: job.node.key,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
silent: true,
|
||||||
|
transaction,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
Promise.resolve(),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user