-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathflow.form.ts
More file actions
62 lines (60 loc) · 2.32 KB
/
Copy pathflow.form.ts
File metadata and controls
62 lines (60 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
import { defineForm } from '../ui/view.zod';
/**
* Flow Metadata Form
*
* Form layout for creating/editing visual flow metadata definitions.
*/
export const flowForm = defineForm({
schemaId: 'flow',
type: 'simple',
sections: [
{
name: 'basics',
label: 'Basics',
description: 'Flow identity and how it starts.',
columns: 2,
fields: [
{ field: 'name', required: true, colSpan: 1, helpText: 'Unique identifier (snake_case)' },
{ field: 'label', required: true, colSpan: 1, helpText: 'Display name for users' },
{ field: 'type', required: true, colSpan: 1, helpText: 'How the flow starts (autolaunched, record_change, schedule, screen, api)' },
{ field: 'template', colSpan: 1, helpText: 'Is this a reusable subflow (can be called from other flows)' },
{ field: 'description', widget: 'textarea', colSpan: 2, helpText: 'What this flow does' },
],
},
{
name: 'canvas',
label: 'Canvas',
description: 'Nodes, edges, and flow variables — consider the visual designer for complex flows.',
fields: [
{
field: 'nodes',
type: 'repeater',
required: true,
helpText: '⚠️ Consider using Flow Designer visual editor instead of JSON',
},
{
field: 'edges',
type: 'repeater',
required: true,
helpText: 'Connections between nodes — use Flow Designer for easier editing',
},
{ field: 'variables', type: 'repeater', helpText: 'Flow variables (inputs/outputs)' },
],
},
{
name: 'execution',
label: 'Execution',
description: 'Deployment status, identity, and error handling.',
collapsible: true,
collapsed: true,
columns: 2,
fields: [
{ field: 'status', required: true, colSpan: 1, helpText: 'Deployment status: draft → active → obsolete' },
{ field: 'version', colSpan: 1, helpText: 'Version number (auto-incremented)' },
{ field: 'runAs', colSpan: 1, helpText: 'Execute as system (admin) or user (current user permissions)' },
{ field: 'errorHandling', type: 'composite', colSpan: 2, helpText: 'What to do when a node fails (fail, retry, continue)' },
],
},
],
});