@acorex/connectivity 20.6.1 → 20.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,7 +16,7 @@ import { RootConfig as RootConfig$1 } from '@acorex/modules/calendar-management'
|
|
|
16
16
|
import { AXPFileStorageStatus, AXPFileStorageService, AXVChangeType as AXVChangeType$1, AXP_SEARCH_PROVIDER, AXPLockService, AXPVersioningService, AXPAppVersionService } from '@acorex/platform/common';
|
|
17
17
|
import Dexie from 'dexie';
|
|
18
18
|
import { AXFileService } from '@acorex/core/file';
|
|
19
|
-
import { AXPActivityProviderService, AXP_ACTIVITY_CATEGORY_PROVIDER,
|
|
19
|
+
import { AXPActivityProviderService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXPWorkflowExecutionService } from '@acorex/platform/workflow';
|
|
20
20
|
import { AXPCommandService, provideCommandSetups, provideQuerySetups, AXPQueryService, AXPRuntimeModule } from '@acorex/platform/runtime';
|
|
21
21
|
import { RootConfig as RootConfig$2 } from '@acorex/modules/contact-management';
|
|
22
22
|
import { RootConfig as RootConfig$3 } from '@acorex/modules/content-management';
|
|
@@ -1894,1092 +1894,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1894
1894
|
type: Injectable
|
|
1895
1895
|
}] });
|
|
1896
1896
|
|
|
1897
|
-
// ============================================
|
|
1898
|
-
// BUILT-IN ACTIVITY PROVIDER
|
|
1899
|
-
// ============================================
|
|
1900
|
-
/**
|
|
1901
|
-
* Provider for built-in workflow activities.
|
|
1902
|
-
* Registers core activities with key-based lookup (Command-style).
|
|
1903
|
-
*
|
|
1904
|
-
* This is automatically registered in the WorkflowModule.
|
|
1905
|
-
*/
|
|
1906
|
-
class AXCActivityProvider {
|
|
1907
|
-
async provide(context) {
|
|
1908
|
-
// ============================================
|
|
1909
|
-
// CONSOLE ACTIVITIES
|
|
1910
|
-
// ============================================
|
|
1911
|
-
// WriteLine - metadata only (activity must be registered with provideCommandSetups)
|
|
1912
|
-
context.registerActivity({
|
|
1913
|
-
key: 'workflow-activity:write-line',
|
|
1914
|
-
descriptor: {
|
|
1915
|
-
type: 'workflow-activity:write-line',
|
|
1916
|
-
displayName: 'Write Line',
|
|
1917
|
-
description: 'Writes a line of text to the console',
|
|
1918
|
-
category: 'Console',
|
|
1919
|
-
icon: 'fa-light fa-terminal',
|
|
1920
|
-
executionMode: 'frontend', // Frontend activity - executes in browser console
|
|
1921
|
-
inputs: [
|
|
1922
|
-
{
|
|
1923
|
-
name: 'text',
|
|
1924
|
-
title: 'Text',
|
|
1925
|
-
description: 'The text to write',
|
|
1926
|
-
schema: {
|
|
1927
|
-
dataType: 'string',
|
|
1928
|
-
},
|
|
1929
|
-
},
|
|
1930
|
-
],
|
|
1931
|
-
outputs: [],
|
|
1932
|
-
outcomes: ['Done'],
|
|
1933
|
-
isBrowsable: true,
|
|
1934
|
-
isContainer: false,
|
|
1935
|
-
},
|
|
1936
|
-
});
|
|
1937
|
-
// ============================================
|
|
1938
|
-
// CONTROL FLOW ACTIVITIES
|
|
1939
|
-
// ============================================
|
|
1940
|
-
context.registerActivity({
|
|
1941
|
-
key: 'workflow-activity:sequence',
|
|
1942
|
-
descriptor: {
|
|
1943
|
-
type: 'workflow-activity:sequence',
|
|
1944
|
-
displayName: 'Sequence',
|
|
1945
|
-
description: 'Executes a sequence of activities in order',
|
|
1946
|
-
category: 'ControlFlow',
|
|
1947
|
-
icon: 'fa-light fa-list-ol',
|
|
1948
|
-
executionMode: 'backend', // Control flow activities are handled by backend
|
|
1949
|
-
inputs: [],
|
|
1950
|
-
outputs: [],
|
|
1951
|
-
outcomes: ['Done'],
|
|
1952
|
-
isBrowsable: true,
|
|
1953
|
-
isContainer: true,
|
|
1954
|
-
},
|
|
1955
|
-
});
|
|
1956
|
-
context.registerActivity({
|
|
1957
|
-
key: 'workflow-activity:if',
|
|
1958
|
-
descriptor: {
|
|
1959
|
-
type: 'workflow-activity:if',
|
|
1960
|
-
displayName: 'If/Else',
|
|
1961
|
-
description: 'Conditional branching based on a condition',
|
|
1962
|
-
category: 'ControlFlow',
|
|
1963
|
-
icon: 'fa-light fa-code-branch',
|
|
1964
|
-
executionMode: 'backend', // Control flow activities are handled by backend
|
|
1965
|
-
inputs: [
|
|
1966
|
-
{
|
|
1967
|
-
name: 'condition',
|
|
1968
|
-
title: 'Condition',
|
|
1969
|
-
description: 'The condition to evaluate',
|
|
1970
|
-
schema: {
|
|
1971
|
-
dataType: 'boolean',
|
|
1972
|
-
},
|
|
1973
|
-
validations: [{ rule: 'required' }],
|
|
1974
|
-
},
|
|
1975
|
-
],
|
|
1976
|
-
outputs: [
|
|
1977
|
-
{
|
|
1978
|
-
name: 'result',
|
|
1979
|
-
title: 'Result',
|
|
1980
|
-
description: 'The condition evaluation result',
|
|
1981
|
-
schema: {
|
|
1982
|
-
dataType: 'boolean',
|
|
1983
|
-
},
|
|
1984
|
-
},
|
|
1985
|
-
],
|
|
1986
|
-
outcomes: ['Then', 'Else'],
|
|
1987
|
-
isBrowsable: true,
|
|
1988
|
-
isContainer: true,
|
|
1989
|
-
},
|
|
1990
|
-
});
|
|
1991
|
-
context.registerActivity({
|
|
1992
|
-
key: 'workflow-activity:while',
|
|
1993
|
-
descriptor: {
|
|
1994
|
-
type: 'workflow-activity:while',
|
|
1995
|
-
displayName: 'While Loop',
|
|
1996
|
-
description: 'Loops while condition is true',
|
|
1997
|
-
category: 'ControlFlow',
|
|
1998
|
-
icon: 'fa-light fa-repeat',
|
|
1999
|
-
executionMode: 'backend', // Control flow activities are handled by backend
|
|
2000
|
-
inputs: [
|
|
2001
|
-
{
|
|
2002
|
-
name: 'condition',
|
|
2003
|
-
title: 'Condition',
|
|
2004
|
-
description: 'The loop condition',
|
|
2005
|
-
schema: {
|
|
2006
|
-
dataType: 'boolean',
|
|
2007
|
-
},
|
|
2008
|
-
validations: [{ rule: 'required' }],
|
|
2009
|
-
},
|
|
2010
|
-
],
|
|
2011
|
-
outputs: [],
|
|
2012
|
-
outcomes: ['Done'],
|
|
2013
|
-
isBrowsable: true,
|
|
2014
|
-
isContainer: true,
|
|
2015
|
-
},
|
|
2016
|
-
});
|
|
2017
|
-
context.registerActivity({
|
|
2018
|
-
key: 'workflow-activity:for-each',
|
|
2019
|
-
descriptor: {
|
|
2020
|
-
type: 'workflow-activity:for-each',
|
|
2021
|
-
displayName: 'For Each',
|
|
2022
|
-
description: 'Iterates over a collection',
|
|
2023
|
-
category: 'ControlFlow',
|
|
2024
|
-
icon: 'fa-light fa-list',
|
|
2025
|
-
executionMode: 'backend', // Control flow activities are handled by backend
|
|
2026
|
-
inputs: [
|
|
2027
|
-
{
|
|
2028
|
-
name: 'items',
|
|
2029
|
-
title: 'Items',
|
|
2030
|
-
description: 'The collection to iterate over',
|
|
2031
|
-
schema: {
|
|
2032
|
-
dataType: 'array',
|
|
2033
|
-
},
|
|
2034
|
-
validations: [{ rule: 'required' }],
|
|
2035
|
-
},
|
|
2036
|
-
],
|
|
2037
|
-
outputs: [
|
|
2038
|
-
{
|
|
2039
|
-
name: 'currentItem',
|
|
2040
|
-
title: 'Current Item',
|
|
2041
|
-
description: 'The current item being processed',
|
|
2042
|
-
schema: {
|
|
2043
|
-
dataType: 'any',
|
|
2044
|
-
},
|
|
2045
|
-
},
|
|
2046
|
-
{
|
|
2047
|
-
name: 'currentIndex',
|
|
2048
|
-
title: 'Current Index',
|
|
2049
|
-
description: 'The current iteration index',
|
|
2050
|
-
schema: {
|
|
2051
|
-
dataType: 'number',
|
|
2052
|
-
},
|
|
2053
|
-
},
|
|
2054
|
-
],
|
|
2055
|
-
outcomes: ['Done'],
|
|
2056
|
-
isBrowsable: true,
|
|
2057
|
-
isContainer: true,
|
|
2058
|
-
},
|
|
2059
|
-
});
|
|
2060
|
-
// ============================================
|
|
2061
|
-
// COMMAND & QUERY ACTIVITIES (DEPRECATED)
|
|
2062
|
-
// ============================================
|
|
2063
|
-
//
|
|
2064
|
-
// These activities are now DEPRECATED.
|
|
2065
|
-
// All activities are now Commands themselves, so you don't need these wrappers.
|
|
2066
|
-
// Register your commands/queries directly as activities.
|
|
2067
|
-
//
|
|
2068
|
-
// We keep them here for backward compatibility but hidden from toolbox.
|
|
2069
|
-
// They will be removed in future versions.
|
|
2070
|
-
context.registerActivity({
|
|
2071
|
-
key: 'workflow-activity:execute-command',
|
|
2072
|
-
descriptor: {
|
|
2073
|
-
type: 'workflow-activity:execute-command',
|
|
2074
|
-
displayName: 'Execute Command (DEPRECATED)',
|
|
2075
|
-
description: 'DEPRECATED: Use command activities directly. All activities are now commands - register your command as an activity instead of wrapping it.',
|
|
2076
|
-
category: 'Deprecated',
|
|
2077
|
-
icon: 'fa-light fa-bolt',
|
|
2078
|
-
executionMode: 'backend', // Backend activity - executes commands on server
|
|
2079
|
-
inputs: [
|
|
2080
|
-
{
|
|
2081
|
-
name: 'commandKey',
|
|
2082
|
-
title: 'Command Key',
|
|
2083
|
-
description: 'The command key to execute (e.g., "Entity:Create")',
|
|
2084
|
-
schema: {
|
|
2085
|
-
dataType: 'string',
|
|
2086
|
-
},
|
|
2087
|
-
validations: [{ rule: 'required' }],
|
|
2088
|
-
},
|
|
2089
|
-
{
|
|
2090
|
-
name: 'input',
|
|
2091
|
-
title: 'Input',
|
|
2092
|
-
description: 'Input data for the command',
|
|
2093
|
-
schema: {
|
|
2094
|
-
dataType: 'object',
|
|
2095
|
-
},
|
|
2096
|
-
},
|
|
2097
|
-
],
|
|
2098
|
-
outputs: [
|
|
2099
|
-
{
|
|
2100
|
-
name: 'result',
|
|
2101
|
-
title: 'Result',
|
|
2102
|
-
description: 'Command execution result',
|
|
2103
|
-
schema: {
|
|
2104
|
-
dataType: 'any',
|
|
2105
|
-
},
|
|
2106
|
-
},
|
|
2107
|
-
{
|
|
2108
|
-
name: 'success',
|
|
2109
|
-
title: 'Success',
|
|
2110
|
-
description: 'Whether command executed successfully',
|
|
2111
|
-
schema: {
|
|
2112
|
-
dataType: 'boolean',
|
|
2113
|
-
},
|
|
2114
|
-
},
|
|
2115
|
-
{
|
|
2116
|
-
name: 'error',
|
|
2117
|
-
title: 'Error',
|
|
2118
|
-
description: 'Error message if command failed',
|
|
2119
|
-
schema: {
|
|
2120
|
-
dataType: 'string',
|
|
2121
|
-
},
|
|
2122
|
-
},
|
|
2123
|
-
],
|
|
2124
|
-
outcomes: ['Done'],
|
|
2125
|
-
isBrowsable: false, // Hidden from toolbox
|
|
2126
|
-
isContainer: false,
|
|
2127
|
-
},
|
|
2128
|
-
});
|
|
2129
|
-
context.registerActivity({
|
|
2130
|
-
key: 'workflow-activity:execute-query',
|
|
2131
|
-
descriptor: {
|
|
2132
|
-
type: 'workflow-activity:execute-query',
|
|
2133
|
-
displayName: 'Execute Query (DEPRECATED)',
|
|
2134
|
-
description: 'DEPRECATED: Use query activities directly. Queries can be registered as activities - no wrapper needed.',
|
|
2135
|
-
category: 'Deprecated',
|
|
2136
|
-
icon: 'fa-light fa-database',
|
|
2137
|
-
executionMode: 'backend', // Backend activity - executes queries on server
|
|
2138
|
-
inputs: [
|
|
2139
|
-
{
|
|
2140
|
-
name: 'queryKey',
|
|
2141
|
-
title: 'Query Key',
|
|
2142
|
-
description: 'The query key to execute (e.g., "Entity:GetDetails")',
|
|
2143
|
-
schema: {
|
|
2144
|
-
dataType: 'string',
|
|
2145
|
-
},
|
|
2146
|
-
validations: [{ rule: 'required' }],
|
|
2147
|
-
},
|
|
2148
|
-
{
|
|
2149
|
-
name: 'input',
|
|
2150
|
-
title: 'Input',
|
|
2151
|
-
description: 'Input parameters for the query',
|
|
2152
|
-
schema: {
|
|
2153
|
-
dataType: 'object',
|
|
2154
|
-
},
|
|
2155
|
-
},
|
|
2156
|
-
],
|
|
2157
|
-
outputs: [
|
|
2158
|
-
{
|
|
2159
|
-
name: 'result',
|
|
2160
|
-
title: 'Result',
|
|
2161
|
-
description: 'Query fetch result',
|
|
2162
|
-
schema: {
|
|
2163
|
-
dataType: 'any',
|
|
2164
|
-
},
|
|
2165
|
-
},
|
|
2166
|
-
{
|
|
2167
|
-
name: 'success',
|
|
2168
|
-
title: 'Success',
|
|
2169
|
-
description: 'Whether query executed successfully',
|
|
2170
|
-
schema: {
|
|
2171
|
-
dataType: 'boolean',
|
|
2172
|
-
},
|
|
2173
|
-
},
|
|
2174
|
-
{
|
|
2175
|
-
name: 'error',
|
|
2176
|
-
title: 'Error',
|
|
2177
|
-
description: 'Error message if query failed',
|
|
2178
|
-
schema: {
|
|
2179
|
-
dataType: 'string',
|
|
2180
|
-
},
|
|
2181
|
-
},
|
|
2182
|
-
],
|
|
2183
|
-
outcomes: ['Done'],
|
|
2184
|
-
isBrowsable: false, // Hidden from toolbox
|
|
2185
|
-
isContainer: false,
|
|
2186
|
-
},
|
|
2187
|
-
});
|
|
2188
|
-
// ============================================
|
|
2189
|
-
// NAVIGATION ACTIVITIES
|
|
2190
|
-
// ============================================
|
|
2191
|
-
context.registerActivity({
|
|
2192
|
-
key: 'workflow-activity:navigate',
|
|
2193
|
-
descriptor: {
|
|
2194
|
-
type: 'workflow-activity:navigate',
|
|
2195
|
-
displayName: 'Navigate',
|
|
2196
|
-
description: 'Navigates to routes, entities, or external URLs',
|
|
2197
|
-
category: 'Navigation',
|
|
2198
|
-
icon: 'fa-light fa-arrow-right',
|
|
2199
|
-
executionMode: 'frontend', // Frontend activity - navigation happens in browser
|
|
2200
|
-
inputs: [
|
|
2201
|
-
{
|
|
2202
|
-
name: 'mode',
|
|
2203
|
-
title: 'Mode',
|
|
2204
|
-
description: 'Navigation mode (route, entity-details, entity-list, external)',
|
|
2205
|
-
schema: {
|
|
2206
|
-
dataType: 'string',
|
|
2207
|
-
},
|
|
2208
|
-
validations: [{ rule: 'required' }],
|
|
2209
|
-
},
|
|
2210
|
-
{
|
|
2211
|
-
name: 'path',
|
|
2212
|
-
title: 'Path',
|
|
2213
|
-
description: 'Navigation path or URL',
|
|
2214
|
-
schema: {
|
|
2215
|
-
dataType: 'string',
|
|
2216
|
-
},
|
|
2217
|
-
},
|
|
2218
|
-
{
|
|
2219
|
-
name: 'entity',
|
|
2220
|
-
title: 'Entity',
|
|
2221
|
-
description: 'Entity name (ModuleName.EntityName)',
|
|
2222
|
-
schema: {
|
|
2223
|
-
dataType: 'string',
|
|
2224
|
-
},
|
|
2225
|
-
},
|
|
2226
|
-
{
|
|
2227
|
-
name: 'entityId',
|
|
2228
|
-
title: 'Entity ID',
|
|
2229
|
-
description: 'Entity ID for details mode',
|
|
2230
|
-
schema: {
|
|
2231
|
-
dataType: 'string',
|
|
2232
|
-
},
|
|
2233
|
-
},
|
|
2234
|
-
{
|
|
2235
|
-
name: 'target',
|
|
2236
|
-
title: 'Target',
|
|
2237
|
-
description: 'Navigation target (self or blank)',
|
|
2238
|
-
schema: {
|
|
2239
|
-
dataType: 'string',
|
|
2240
|
-
},
|
|
2241
|
-
},
|
|
2242
|
-
{
|
|
2243
|
-
name: 'queryParams',
|
|
2244
|
-
title: 'Query Params',
|
|
2245
|
-
description: 'Query parameters for route navigation',
|
|
2246
|
-
schema: {
|
|
2247
|
-
dataType: 'object',
|
|
2248
|
-
},
|
|
2249
|
-
},
|
|
2250
|
-
],
|
|
2251
|
-
outputs: [],
|
|
2252
|
-
outcomes: ['Done'],
|
|
2253
|
-
isBrowsable: true,
|
|
2254
|
-
isContainer: false,
|
|
2255
|
-
},
|
|
2256
|
-
});
|
|
2257
|
-
// ============================================
|
|
2258
|
-
// DIALOG ACTIVITIES
|
|
2259
|
-
// ============================================
|
|
2260
|
-
context.registerActivity({
|
|
2261
|
-
key: 'workflow-activity:show-confirm-dialog',
|
|
2262
|
-
descriptor: {
|
|
2263
|
-
type: 'workflow-activity:show-confirm-dialog',
|
|
2264
|
-
displayName: 'Show Confirm Dialog',
|
|
2265
|
-
description: 'Displays a confirmation dialog with Yes/No buttons',
|
|
2266
|
-
category: 'Dialog',
|
|
2267
|
-
icon: 'fa-light fa-question-circle',
|
|
2268
|
-
executionMode: 'frontend', // Frontend activity - shows UI dialog
|
|
2269
|
-
inputs: [
|
|
2270
|
-
{
|
|
2271
|
-
name: 'title',
|
|
2272
|
-
title: 'Title',
|
|
2273
|
-
description: 'Dialog title',
|
|
2274
|
-
schema: {
|
|
2275
|
-
dataType: 'string',
|
|
2276
|
-
},
|
|
2277
|
-
},
|
|
2278
|
-
{
|
|
2279
|
-
name: 'message',
|
|
2280
|
-
title: 'Message',
|
|
2281
|
-
description: 'Dialog message',
|
|
2282
|
-
schema: {
|
|
2283
|
-
dataType: 'string',
|
|
2284
|
-
},
|
|
2285
|
-
},
|
|
2286
|
-
{
|
|
2287
|
-
name: 'color',
|
|
2288
|
-
title: 'Color',
|
|
2289
|
-
description: 'Dialog color (success, danger, warning, etc.)',
|
|
2290
|
-
schema: {
|
|
2291
|
-
dataType: 'string',
|
|
2292
|
-
},
|
|
2293
|
-
},
|
|
2294
|
-
{
|
|
2295
|
-
name: 'defaultAction',
|
|
2296
|
-
title: 'Default Action',
|
|
2297
|
-
description: 'Default selected action (confirm or cancel)',
|
|
2298
|
-
schema: {
|
|
2299
|
-
dataType: 'string',
|
|
2300
|
-
},
|
|
2301
|
-
},
|
|
2302
|
-
{
|
|
2303
|
-
name: 'align',
|
|
2304
|
-
title: 'Align',
|
|
2305
|
-
description: 'Button alignment (horizontal or vertical)',
|
|
2306
|
-
schema: {
|
|
2307
|
-
dataType: 'string',
|
|
2308
|
-
},
|
|
2309
|
-
},
|
|
2310
|
-
{
|
|
2311
|
-
name: 'backdrop',
|
|
2312
|
-
title: 'Backdrop',
|
|
2313
|
-
description: 'Show backdrop overlay',
|
|
2314
|
-
schema: {
|
|
2315
|
-
dataType: 'boolean',
|
|
2316
|
-
},
|
|
2317
|
-
},
|
|
2318
|
-
],
|
|
2319
|
-
outputs: [
|
|
2320
|
-
{
|
|
2321
|
-
name: 'result',
|
|
2322
|
-
title: 'Result',
|
|
2323
|
-
description: 'Dialog result (true for confirm, false for cancel)',
|
|
2324
|
-
schema: {
|
|
2325
|
-
dataType: 'boolean',
|
|
2326
|
-
},
|
|
2327
|
-
},
|
|
2328
|
-
{
|
|
2329
|
-
name: 'action',
|
|
2330
|
-
title: 'Action',
|
|
2331
|
-
description: 'Action clicked by user (confirm or cancel)',
|
|
2332
|
-
schema: {
|
|
2333
|
-
dataType: 'string',
|
|
2334
|
-
},
|
|
2335
|
-
},
|
|
2336
|
-
],
|
|
2337
|
-
outcomes: ['Confirmed', 'Cancelled'],
|
|
2338
|
-
isBrowsable: true,
|
|
2339
|
-
isContainer: false,
|
|
2340
|
-
},
|
|
2341
|
-
});
|
|
2342
|
-
context.registerActivity({
|
|
2343
|
-
key: 'workflow-activity:show-alert-dialog',
|
|
2344
|
-
descriptor: {
|
|
2345
|
-
type: 'workflow-activity:show-alert-dialog',
|
|
2346
|
-
displayName: 'Show Alert Dialog',
|
|
2347
|
-
description: 'Displays an alert dialog with OK button',
|
|
2348
|
-
category: 'Dialog',
|
|
2349
|
-
icon: 'fa-light fa-circle-info',
|
|
2350
|
-
executionMode: 'frontend', // Frontend activity - shows UI dialog
|
|
2351
|
-
inputs: [
|
|
2352
|
-
{
|
|
2353
|
-
name: 'title',
|
|
2354
|
-
title: 'Title',
|
|
2355
|
-
description: 'Dialog title',
|
|
2356
|
-
schema: {
|
|
2357
|
-
dataType: 'string',
|
|
2358
|
-
},
|
|
2359
|
-
},
|
|
2360
|
-
{
|
|
2361
|
-
name: 'message',
|
|
2362
|
-
title: 'Message',
|
|
2363
|
-
description: 'Dialog message',
|
|
2364
|
-
schema: {
|
|
2365
|
-
dataType: 'string',
|
|
2366
|
-
},
|
|
2367
|
-
},
|
|
2368
|
-
{
|
|
2369
|
-
name: 'color',
|
|
2370
|
-
title: 'Color',
|
|
2371
|
-
description: 'Dialog color (success, danger, warning, etc.)',
|
|
2372
|
-
schema: {
|
|
2373
|
-
dataType: 'string',
|
|
2374
|
-
},
|
|
2375
|
-
},
|
|
2376
|
-
],
|
|
2377
|
-
outputs: [
|
|
2378
|
-
{
|
|
2379
|
-
name: 'result',
|
|
2380
|
-
title: 'Result',
|
|
2381
|
-
description: 'Dialog result (always true)',
|
|
2382
|
-
schema: {
|
|
2383
|
-
dataType: 'boolean',
|
|
2384
|
-
},
|
|
2385
|
-
},
|
|
2386
|
-
{
|
|
2387
|
-
name: 'action',
|
|
2388
|
-
title: 'Action',
|
|
2389
|
-
description: 'Action clicked by user (always ok)',
|
|
2390
|
-
schema: {
|
|
2391
|
-
dataType: 'string',
|
|
2392
|
-
},
|
|
2393
|
-
},
|
|
2394
|
-
],
|
|
2395
|
-
outcomes: ['Done'],
|
|
2396
|
-
isBrowsable: true,
|
|
2397
|
-
isContainer: false,
|
|
2398
|
-
},
|
|
2399
|
-
});
|
|
2400
|
-
// ============================================
|
|
2401
|
-
// NOTIFICATION ACTIVITIES
|
|
2402
|
-
// ============================================
|
|
2403
|
-
context.registerActivity({
|
|
2404
|
-
key: 'workflow-activity:show-toast',
|
|
2405
|
-
descriptor: {
|
|
2406
|
-
type: 'workflow-activity:show-toast',
|
|
2407
|
-
displayName: 'Show Toast',
|
|
2408
|
-
description: 'Displays a toast notification',
|
|
2409
|
-
category: 'Notification',
|
|
2410
|
-
icon: 'fa-light fa-comment-dots',
|
|
2411
|
-
executionMode: 'frontend', // Frontend activity - shows UI toast
|
|
2412
|
-
inputs: [
|
|
2413
|
-
{
|
|
2414
|
-
name: 'color',
|
|
2415
|
-
title: 'Color',
|
|
2416
|
-
description: 'Toast color (success, error, warning, info)',
|
|
2417
|
-
schema: {
|
|
2418
|
-
dataType: 'string',
|
|
2419
|
-
},
|
|
2420
|
-
},
|
|
2421
|
-
{
|
|
2422
|
-
name: 'title',
|
|
2423
|
-
title: 'Title',
|
|
2424
|
-
description: 'Toast title',
|
|
2425
|
-
schema: {
|
|
2426
|
-
dataType: 'string',
|
|
2427
|
-
},
|
|
2428
|
-
},
|
|
2429
|
-
{
|
|
2430
|
-
name: 'message',
|
|
2431
|
-
title: 'Message',
|
|
2432
|
-
description: 'Toast message',
|
|
2433
|
-
schema: {
|
|
2434
|
-
dataType: 'string',
|
|
2435
|
-
},
|
|
2436
|
-
},
|
|
2437
|
-
{
|
|
2438
|
-
name: 'duration',
|
|
2439
|
-
title: 'Duration',
|
|
2440
|
-
description: 'Display duration in milliseconds',
|
|
2441
|
-
schema: {
|
|
2442
|
-
dataType: 'number',
|
|
2443
|
-
},
|
|
2444
|
-
},
|
|
2445
|
-
],
|
|
2446
|
-
outputs: [],
|
|
2447
|
-
outcomes: ['Done'],
|
|
2448
|
-
isBrowsable: true,
|
|
2449
|
-
isContainer: false,
|
|
2450
|
-
},
|
|
2451
|
-
});
|
|
2452
|
-
// ============================================
|
|
2453
|
-
// EVENT ACTIVITIES
|
|
2454
|
-
// ============================================
|
|
2455
|
-
context.registerActivity({
|
|
2456
|
-
key: 'workflow-activity:dispatch-event',
|
|
2457
|
-
descriptor: {
|
|
2458
|
-
type: 'workflow-activity:dispatch-event',
|
|
2459
|
-
displayName: 'Dispatch Event',
|
|
2460
|
-
description: 'Broadcasts an event through the platform event system',
|
|
2461
|
-
category: 'Event',
|
|
2462
|
-
icon: 'fa-light fa-broadcast-tower',
|
|
2463
|
-
executionMode: 'frontend', // Frontend activity - dispatches events in browser
|
|
2464
|
-
inputs: [
|
|
2465
|
-
{
|
|
2466
|
-
name: 'eventName',
|
|
2467
|
-
title: 'Event Name',
|
|
2468
|
-
description: 'Name of the event to dispatch',
|
|
2469
|
-
schema: {
|
|
2470
|
-
dataType: 'string',
|
|
2471
|
-
},
|
|
2472
|
-
validations: [{ rule: 'required' }],
|
|
2473
|
-
},
|
|
2474
|
-
{
|
|
2475
|
-
name: 'payload',
|
|
2476
|
-
title: 'Payload',
|
|
2477
|
-
description: 'Event payload data',
|
|
2478
|
-
schema: {
|
|
2479
|
-
dataType: 'object',
|
|
2480
|
-
},
|
|
2481
|
-
},
|
|
2482
|
-
],
|
|
2483
|
-
outputs: [],
|
|
2484
|
-
outcomes: ['Done'],
|
|
2485
|
-
isBrowsable: true,
|
|
2486
|
-
isContainer: false,
|
|
2487
|
-
},
|
|
2488
|
-
});
|
|
2489
|
-
// ============================================
|
|
2490
|
-
// VARIABLE ACTIVITIES
|
|
2491
|
-
// ============================================
|
|
2492
|
-
context.registerActivity({
|
|
2493
|
-
key: 'workflow-activity:set-variable',
|
|
2494
|
-
descriptor: {
|
|
2495
|
-
type: 'workflow-activity:set-variable',
|
|
2496
|
-
displayName: 'Set Variable',
|
|
2497
|
-
description: 'Sets a workflow variable value',
|
|
2498
|
-
category: 'Variable',
|
|
2499
|
-
icon: 'fa-light fa-box',
|
|
2500
|
-
executionMode: 'backend', // Backend activity - sets workflow state variables
|
|
2501
|
-
inputs: [
|
|
2502
|
-
{
|
|
2503
|
-
name: 'variableName',
|
|
2504
|
-
title: 'Variable Name',
|
|
2505
|
-
description: 'Name of the variable to set',
|
|
2506
|
-
schema: {
|
|
2507
|
-
dataType: 'string',
|
|
2508
|
-
},
|
|
2509
|
-
validations: [{ rule: 'required' }],
|
|
2510
|
-
},
|
|
2511
|
-
{
|
|
2512
|
-
name: 'value',
|
|
2513
|
-
title: 'Value',
|
|
2514
|
-
description: 'Value to set',
|
|
2515
|
-
schema: {
|
|
2516
|
-
dataType: 'any',
|
|
2517
|
-
},
|
|
2518
|
-
},
|
|
2519
|
-
{
|
|
2520
|
-
name: 'expression',
|
|
2521
|
-
title: 'Expression',
|
|
2522
|
-
description: 'Expression to evaluate (alternative to value)',
|
|
2523
|
-
schema: {
|
|
2524
|
-
dataType: 'string',
|
|
2525
|
-
},
|
|
2526
|
-
},
|
|
2527
|
-
],
|
|
2528
|
-
outputs: [],
|
|
2529
|
-
outcomes: ['Done'],
|
|
2530
|
-
isBrowsable: true,
|
|
2531
|
-
isContainer: false,
|
|
2532
|
-
},
|
|
2533
|
-
});
|
|
2534
|
-
// ============================================
|
|
2535
|
-
// ADVANCED CONTROL FLOW
|
|
2536
|
-
// ============================================
|
|
2537
|
-
context.registerActivity({
|
|
2538
|
-
key: 'workflow-activity:parallel',
|
|
2539
|
-
descriptor: {
|
|
2540
|
-
type: 'workflow-activity:parallel',
|
|
2541
|
-
displayName: 'Parallel',
|
|
2542
|
-
description: 'Executes multiple activities in parallel',
|
|
2543
|
-
category: 'ControlFlow',
|
|
2544
|
-
icon: 'fa-light fa-code-fork',
|
|
2545
|
-
executionMode: 'backend', // Control flow activities are handled by backend
|
|
2546
|
-
inputs: [
|
|
2547
|
-
{
|
|
2548
|
-
name: 'branches',
|
|
2549
|
-
title: 'Branches',
|
|
2550
|
-
description: 'Activities to execute in parallel',
|
|
2551
|
-
schema: {
|
|
2552
|
-
dataType: 'array',
|
|
2553
|
-
},
|
|
2554
|
-
validations: [{ rule: 'required' }],
|
|
2555
|
-
},
|
|
2556
|
-
{
|
|
2557
|
-
name: 'waitForAll',
|
|
2558
|
-
title: 'Wait for All',
|
|
2559
|
-
description: 'Wait for all branches to complete',
|
|
2560
|
-
schema: {
|
|
2561
|
-
dataType: 'boolean',
|
|
2562
|
-
},
|
|
2563
|
-
},
|
|
2564
|
-
],
|
|
2565
|
-
outputs: [],
|
|
2566
|
-
outcomes: ['Done', 'Faulted'],
|
|
2567
|
-
isBrowsable: true,
|
|
2568
|
-
isContainer: true,
|
|
2569
|
-
},
|
|
2570
|
-
});
|
|
2571
|
-
context.registerActivity({
|
|
2572
|
-
key: 'workflow-activity:switch',
|
|
2573
|
-
descriptor: {
|
|
2574
|
-
type: 'workflow-activity:switch',
|
|
2575
|
-
displayName: 'Switch',
|
|
2576
|
-
description: 'Multi-way branching based on expression value',
|
|
2577
|
-
category: 'ControlFlow',
|
|
2578
|
-
icon: 'fa-light fa-split',
|
|
2579
|
-
executionMode: 'backend', // Control flow activities are handled by backend
|
|
2580
|
-
inputs: [
|
|
2581
|
-
{
|
|
2582
|
-
name: 'expression',
|
|
2583
|
-
title: 'Expression',
|
|
2584
|
-
description: 'Expression to evaluate',
|
|
2585
|
-
schema: {
|
|
2586
|
-
dataType: 'any',
|
|
2587
|
-
},
|
|
2588
|
-
validations: [{ rule: 'required' }],
|
|
2589
|
-
},
|
|
2590
|
-
{
|
|
2591
|
-
name: 'cases',
|
|
2592
|
-
title: 'Cases',
|
|
2593
|
-
description: 'Cases to match against',
|
|
2594
|
-
schema: {
|
|
2595
|
-
dataType: 'array',
|
|
2596
|
-
},
|
|
2597
|
-
validations: [{ rule: 'required' }],
|
|
2598
|
-
},
|
|
2599
|
-
{
|
|
2600
|
-
name: 'default',
|
|
2601
|
-
title: 'Default',
|
|
2602
|
-
description: 'Default activity if no match',
|
|
2603
|
-
schema: {
|
|
2604
|
-
dataType: 'activity',
|
|
2605
|
-
},
|
|
2606
|
-
},
|
|
2607
|
-
],
|
|
2608
|
-
outputs: [],
|
|
2609
|
-
outcomes: ['Matched', 'Default', 'NoMatch'],
|
|
2610
|
-
isBrowsable: true,
|
|
2611
|
-
isContainer: true,
|
|
2612
|
-
},
|
|
2613
|
-
});
|
|
2614
|
-
context.registerActivity({
|
|
2615
|
-
key: 'workflow-activity:try-catch',
|
|
2616
|
-
descriptor: {
|
|
2617
|
-
type: 'workflow-activity:try-catch',
|
|
2618
|
-
displayName: 'Try/Catch',
|
|
2619
|
-
description: 'Exception handling for workflows',
|
|
2620
|
-
category: 'ControlFlow',
|
|
2621
|
-
icon: 'fa-light fa-shield-check',
|
|
2622
|
-
executionMode: 'backend', // Control flow activities are handled by backend
|
|
2623
|
-
inputs: [
|
|
2624
|
-
{
|
|
2625
|
-
name: 'try',
|
|
2626
|
-
title: 'Try',
|
|
2627
|
-
description: 'Activity to execute in try block',
|
|
2628
|
-
schema: {
|
|
2629
|
-
dataType: 'activity',
|
|
2630
|
-
},
|
|
2631
|
-
validations: [{ rule: 'required' }],
|
|
2632
|
-
},
|
|
2633
|
-
{
|
|
2634
|
-
name: 'catch',
|
|
2635
|
-
title: 'Catch',
|
|
2636
|
-
description: 'Activity to execute if error occurs',
|
|
2637
|
-
schema: {
|
|
2638
|
-
dataType: 'activity',
|
|
2639
|
-
},
|
|
2640
|
-
},
|
|
2641
|
-
{
|
|
2642
|
-
name: 'finally',
|
|
2643
|
-
title: 'Finally',
|
|
2644
|
-
description: 'Activity to always execute',
|
|
2645
|
-
schema: {
|
|
2646
|
-
dataType: 'activity',
|
|
2647
|
-
},
|
|
2648
|
-
},
|
|
2649
|
-
],
|
|
2650
|
-
outputs: [
|
|
2651
|
-
{
|
|
2652
|
-
name: 'error',
|
|
2653
|
-
title: 'Error',
|
|
2654
|
-
description: 'The error that occurred',
|
|
2655
|
-
schema: {
|
|
2656
|
-
dataType: 'object',
|
|
2657
|
-
},
|
|
2658
|
-
},
|
|
2659
|
-
{
|
|
2660
|
-
name: 'errorMessage',
|
|
2661
|
-
title: 'Error Message',
|
|
2662
|
-
description: 'Error message',
|
|
2663
|
-
schema: {
|
|
2664
|
-
dataType: 'string',
|
|
2665
|
-
},
|
|
2666
|
-
},
|
|
2667
|
-
],
|
|
2668
|
-
outcomes: ['Success', 'Caught', 'Faulted'],
|
|
2669
|
-
isBrowsable: true,
|
|
2670
|
-
isContainer: true,
|
|
2671
|
-
},
|
|
2672
|
-
});
|
|
2673
|
-
// ============================================
|
|
2674
|
-
// SECURITY ACTIVITIES
|
|
2675
|
-
// ============================================
|
|
2676
|
-
context.registerActivity({
|
|
2677
|
-
key: 'workflow-activity:check-permission',
|
|
2678
|
-
descriptor: {
|
|
2679
|
-
type: 'workflow-activity:check-permission',
|
|
2680
|
-
displayName: 'Check Permission',
|
|
2681
|
-
description: 'Checks if current user has specific permission',
|
|
2682
|
-
category: 'Security',
|
|
2683
|
-
icon: 'fa-light fa-shield-check',
|
|
2684
|
-
executionMode: 'backend', // Backend activity - permission check on server
|
|
2685
|
-
inputs: [
|
|
2686
|
-
{
|
|
2687
|
-
name: 'permission',
|
|
2688
|
-
title: 'Permission',
|
|
2689
|
-
description: 'Permission key to check (e.g., "Users.Create")',
|
|
2690
|
-
schema: {
|
|
2691
|
-
dataType: 'string',
|
|
2692
|
-
},
|
|
2693
|
-
validations: [{ rule: 'required' }],
|
|
2694
|
-
},
|
|
2695
|
-
{
|
|
2696
|
-
name: 'userId',
|
|
2697
|
-
title: 'User ID',
|
|
2698
|
-
description: 'User ID to check (optional, defaults to current user)',
|
|
2699
|
-
schema: {
|
|
2700
|
-
dataType: 'string',
|
|
2701
|
-
},
|
|
2702
|
-
},
|
|
2703
|
-
],
|
|
2704
|
-
outputs: [
|
|
2705
|
-
{
|
|
2706
|
-
name: 'hasPermission',
|
|
2707
|
-
title: 'Has Permission',
|
|
2708
|
-
description: 'Whether user has the permission',
|
|
2709
|
-
schema: {
|
|
2710
|
-
dataType: 'boolean',
|
|
2711
|
-
},
|
|
2712
|
-
},
|
|
2713
|
-
],
|
|
2714
|
-
outcomes: ['HasPermission', 'NoPermission'],
|
|
2715
|
-
isBrowsable: true,
|
|
2716
|
-
isContainer: false,
|
|
2717
|
-
},
|
|
2718
|
-
});
|
|
2719
|
-
// ============================================
|
|
2720
|
-
// FORM ACTIVITIES
|
|
2721
|
-
// ============================================
|
|
2722
|
-
context.registerActivity({
|
|
2723
|
-
key: 'workflow-activity:show-dialog',
|
|
2724
|
-
descriptor: {
|
|
2725
|
-
type: 'workflow-activity:show-dialog',
|
|
2726
|
-
displayName: 'Show Dialog',
|
|
2727
|
-
description: 'Shows a dialog with form or custom content',
|
|
2728
|
-
category: 'Dialog',
|
|
2729
|
-
icon: 'fa-light fa-window',
|
|
2730
|
-
executionMode: 'frontend', // Frontend activity - shows UI dialog
|
|
2731
|
-
inputs: [
|
|
2732
|
-
{
|
|
2733
|
-
name: 'title',
|
|
2734
|
-
title: 'Title',
|
|
2735
|
-
description: 'Dialog title',
|
|
2736
|
-
schema: {
|
|
2737
|
-
dataType: 'string',
|
|
2738
|
-
},
|
|
2739
|
-
},
|
|
2740
|
-
{
|
|
2741
|
-
name: 'formDefinition',
|
|
2742
|
-
title: 'Form Definition',
|
|
2743
|
-
description: 'Form definition key or inline definition',
|
|
2744
|
-
schema: {
|
|
2745
|
-
dataType: 'string',
|
|
2746
|
-
},
|
|
2747
|
-
},
|
|
2748
|
-
{
|
|
2749
|
-
name: 'size',
|
|
2750
|
-
title: 'Size',
|
|
2751
|
-
description: 'Dialog size (sm, md, lg, xl)',
|
|
2752
|
-
schema: {
|
|
2753
|
-
dataType: 'string',
|
|
2754
|
-
},
|
|
2755
|
-
},
|
|
2756
|
-
{
|
|
2757
|
-
name: 'closeButton',
|
|
2758
|
-
title: 'Close Button',
|
|
2759
|
-
description: 'Show close button',
|
|
2760
|
-
schema: {
|
|
2761
|
-
dataType: 'boolean',
|
|
2762
|
-
},
|
|
2763
|
-
},
|
|
2764
|
-
],
|
|
2765
|
-
outputs: [
|
|
2766
|
-
{
|
|
2767
|
-
name: 'formData',
|
|
2768
|
-
title: 'Form Data',
|
|
2769
|
-
description: 'Form data submitted by user',
|
|
2770
|
-
schema: {
|
|
2771
|
-
dataType: 'object',
|
|
2772
|
-
},
|
|
2773
|
-
},
|
|
2774
|
-
{
|
|
2775
|
-
name: 'action',
|
|
2776
|
-
title: 'Action',
|
|
2777
|
-
description: 'Action taken by user',
|
|
2778
|
-
schema: {
|
|
2779
|
-
dataType: 'string',
|
|
2780
|
-
},
|
|
2781
|
-
},
|
|
2782
|
-
],
|
|
2783
|
-
outcomes: ['Submitted', 'Cancelled'],
|
|
2784
|
-
isBrowsable: true,
|
|
2785
|
-
isContainer: false,
|
|
2786
|
-
},
|
|
2787
|
-
});
|
|
2788
|
-
context.registerActivity({
|
|
2789
|
-
key: 'workflow-activity:show-form',
|
|
2790
|
-
descriptor: {
|
|
2791
|
-
type: 'workflow-activity:show-form',
|
|
2792
|
-
displayName: 'Show Form',
|
|
2793
|
-
description: 'Displays a form dialog to the user using Layout Builder',
|
|
2794
|
-
category: 'Dialog',
|
|
2795
|
-
icon: 'fa-light fa-rectangle-list',
|
|
2796
|
-
executionMode: 'frontend', // Frontend activity - shows UI form dialog
|
|
2797
|
-
inputs: [
|
|
2798
|
-
{
|
|
2799
|
-
name: 'title',
|
|
2800
|
-
title: 'Title',
|
|
2801
|
-
description: 'Form dialog title',
|
|
2802
|
-
schema: {
|
|
2803
|
-
dataType: 'string',
|
|
2804
|
-
},
|
|
2805
|
-
},
|
|
2806
|
-
{
|
|
2807
|
-
name: 'formDefinition',
|
|
2808
|
-
title: 'Form Definition',
|
|
2809
|
-
description: 'Form definition (fields array or widget node)',
|
|
2810
|
-
schema: {
|
|
2811
|
-
dataType: 'object',
|
|
2812
|
-
},
|
|
2813
|
-
validations: [{ rule: 'required' }],
|
|
2814
|
-
},
|
|
2815
|
-
{
|
|
2816
|
-
name: 'context',
|
|
2817
|
-
title: 'Context',
|
|
2818
|
-
description: 'Initial form context/data',
|
|
2819
|
-
schema: {
|
|
2820
|
-
dataType: 'object',
|
|
2821
|
-
},
|
|
2822
|
-
},
|
|
2823
|
-
{
|
|
2824
|
-
name: 'size',
|
|
2825
|
-
title: 'Size',
|
|
2826
|
-
description: 'Dialog size (sm, md, lg, xl)',
|
|
2827
|
-
schema: {
|
|
2828
|
-
dataType: 'string',
|
|
2829
|
-
},
|
|
2830
|
-
},
|
|
2831
|
-
{
|
|
2832
|
-
name: 'closeButton',
|
|
2833
|
-
title: 'Close Button',
|
|
2834
|
-
description: 'Show close button',
|
|
2835
|
-
schema: {
|
|
2836
|
-
dataType: 'boolean',
|
|
2837
|
-
},
|
|
2838
|
-
},
|
|
2839
|
-
{
|
|
2840
|
-
name: 'actions',
|
|
2841
|
-
title: 'Actions',
|
|
2842
|
-
description: 'Form actions (submit, cancel, custom)',
|
|
2843
|
-
schema: {
|
|
2844
|
-
dataType: 'object',
|
|
2845
|
-
},
|
|
2846
|
-
},
|
|
2847
|
-
],
|
|
2848
|
-
outputs: [
|
|
2849
|
-
{
|
|
2850
|
-
name: 'formData',
|
|
2851
|
-
title: 'Form Data',
|
|
2852
|
-
description: 'Form data submitted by user',
|
|
2853
|
-
schema: {
|
|
2854
|
-
dataType: 'object',
|
|
2855
|
-
},
|
|
2856
|
-
},
|
|
2857
|
-
{
|
|
2858
|
-
name: 'action',
|
|
2859
|
-
title: 'Action',
|
|
2860
|
-
description: 'Action taken by user (submit, cancel, or custom)',
|
|
2861
|
-
schema: {
|
|
2862
|
-
dataType: 'string',
|
|
2863
|
-
},
|
|
2864
|
-
},
|
|
2865
|
-
{
|
|
2866
|
-
name: 'cancelled',
|
|
2867
|
-
title: 'Cancelled',
|
|
2868
|
-
description: 'Whether form was cancelled',
|
|
2869
|
-
schema: {
|
|
2870
|
-
dataType: 'boolean',
|
|
2871
|
-
},
|
|
2872
|
-
},
|
|
2873
|
-
],
|
|
2874
|
-
outcomes: ['Submitted', 'Cancelled'],
|
|
2875
|
-
isBrowsable: true,
|
|
2876
|
-
isContainer: false,
|
|
2877
|
-
},
|
|
2878
|
-
});
|
|
2879
|
-
// ============================================
|
|
2880
|
-
// STATE MACHINE
|
|
2881
|
-
// ============================================
|
|
2882
|
-
context.registerActivity({
|
|
2883
|
-
key: 'workflow-activity:state-machine',
|
|
2884
|
-
descriptor: {
|
|
2885
|
-
type: 'workflow-activity:state-machine',
|
|
2886
|
-
displayName: 'State Machine',
|
|
2887
|
-
description: 'Workflow-based state machine for status management',
|
|
2888
|
-
category: 'ControlFlow',
|
|
2889
|
-
icon: 'fa-light fa-diagram-project',
|
|
2890
|
-
executionMode: 'backend', // Control flow activities are handled by backend
|
|
2891
|
-
inputs: [
|
|
2892
|
-
{
|
|
2893
|
-
name: 'initialState',
|
|
2894
|
-
title: 'Initial State',
|
|
2895
|
-
description: 'Initial state ID',
|
|
2896
|
-
schema: {
|
|
2897
|
-
dataType: 'string',
|
|
2898
|
-
},
|
|
2899
|
-
},
|
|
2900
|
-
{
|
|
2901
|
-
name: 'currentStateVariable',
|
|
2902
|
-
title: 'State Variable',
|
|
2903
|
-
description: 'Variable name to store current state',
|
|
2904
|
-
schema: {
|
|
2905
|
-
dataType: 'string',
|
|
2906
|
-
},
|
|
2907
|
-
},
|
|
2908
|
-
{
|
|
2909
|
-
name: 'states',
|
|
2910
|
-
title: 'States',
|
|
2911
|
-
description: 'Array of state definitions',
|
|
2912
|
-
schema: {
|
|
2913
|
-
dataType: 'array',
|
|
2914
|
-
},
|
|
2915
|
-
validations: [{ rule: 'required' }],
|
|
2916
|
-
},
|
|
2917
|
-
{
|
|
2918
|
-
name: 'transitions',
|
|
2919
|
-
title: 'Transitions',
|
|
2920
|
-
description: 'Array of transition definitions',
|
|
2921
|
-
schema: {
|
|
2922
|
-
dataType: 'array',
|
|
2923
|
-
},
|
|
2924
|
-
validations: [{ rule: 'required' }],
|
|
2925
|
-
},
|
|
2926
|
-
{
|
|
2927
|
-
name: 'trackHistory',
|
|
2928
|
-
title: 'Track History',
|
|
2929
|
-
description: 'Track state change history',
|
|
2930
|
-
schema: {
|
|
2931
|
-
dataType: 'boolean',
|
|
2932
|
-
},
|
|
2933
|
-
},
|
|
2934
|
-
{
|
|
2935
|
-
name: 'executeTransition',
|
|
2936
|
-
title: 'Execute Transition',
|
|
2937
|
-
description: 'Transition ID to execute',
|
|
2938
|
-
schema: {
|
|
2939
|
-
dataType: 'string',
|
|
2940
|
-
},
|
|
2941
|
-
},
|
|
2942
|
-
],
|
|
2943
|
-
outputs: [
|
|
2944
|
-
{
|
|
2945
|
-
name: 'currentState',
|
|
2946
|
-
title: 'Current State',
|
|
2947
|
-
description: 'Current state ID',
|
|
2948
|
-
schema: {
|
|
2949
|
-
dataType: 'string',
|
|
2950
|
-
},
|
|
2951
|
-
},
|
|
2952
|
-
{
|
|
2953
|
-
name: 'availableTransitions',
|
|
2954
|
-
title: 'Available Transitions',
|
|
2955
|
-
description: 'Available transitions from current state',
|
|
2956
|
-
schema: {
|
|
2957
|
-
dataType: 'array',
|
|
2958
|
-
},
|
|
2959
|
-
},
|
|
2960
|
-
{
|
|
2961
|
-
name: 'stateHistory',
|
|
2962
|
-
title: 'State History',
|
|
2963
|
-
description: 'History of state changes',
|
|
2964
|
-
schema: {
|
|
2965
|
-
dataType: 'array',
|
|
2966
|
-
},
|
|
2967
|
-
},
|
|
2968
|
-
],
|
|
2969
|
-
outcomes: ['Done'],
|
|
2970
|
-
isBrowsable: true,
|
|
2971
|
-
isContainer: false,
|
|
2972
|
-
},
|
|
2973
|
-
});
|
|
2974
|
-
console.log('[AXPBuiltinActivityProvider] Registered 19 built-in activities');
|
|
2975
|
-
}
|
|
2976
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCActivityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2977
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCActivityProvider }); }
|
|
2978
|
-
}
|
|
2979
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCActivityProvider, decorators: [{
|
|
2980
|
-
type: Injectable
|
|
2981
|
-
}] });
|
|
2982
|
-
|
|
2983
1897
|
//#region ---- Dexie DB ----
|
|
2984
1898
|
/**
|
|
2985
1899
|
* Dexie database for workflow instances.
|
|
@@ -3498,10 +2412,10 @@ class AXCWorkflowExecutionService {
|
|
|
3498
2412
|
return activity.executionMode;
|
|
3499
2413
|
}
|
|
3500
2414
|
// 2. Check ActivityDescriptor from ActivityProviderService
|
|
3501
|
-
const descriptor = this.activityProviderService.
|
|
3502
|
-
if (descriptor?.executionMode) {
|
|
3503
|
-
|
|
3504
|
-
}
|
|
2415
|
+
// const descriptor = this.activityProviderService.getMetadata(activityType);
|
|
2416
|
+
// if (descriptor?.executionMode) {
|
|
2417
|
+
// return descriptor.executionMode;
|
|
2418
|
+
// }
|
|
3505
2419
|
// 3. Default to frontend (UI activities are more common)
|
|
3506
2420
|
return 'frontend';
|
|
3507
2421
|
}
|
|
@@ -4897,11 +3811,11 @@ class AXCCommonMockModule {
|
|
|
4897
3811
|
useClass: AXCCategoryProvider,
|
|
4898
3812
|
multi: true,
|
|
4899
3813
|
},
|
|
4900
|
-
{
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
},
|
|
3814
|
+
// {
|
|
3815
|
+
// provide: AXP_ACTIVITY_PROVIDER,
|
|
3816
|
+
// useClass: AXCActivityProvider,
|
|
3817
|
+
// multi: true,
|
|
3818
|
+
// },
|
|
4905
3819
|
{
|
|
4906
3820
|
provide: AXPWorkflowExecutionService,
|
|
4907
3821
|
useClass: AXCWorkflowExecutionService,
|
|
@@ -4948,11 +3862,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
4948
3862
|
useClass: AXCCategoryProvider,
|
|
4949
3863
|
multi: true,
|
|
4950
3864
|
},
|
|
4951
|
-
{
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
},
|
|
3865
|
+
// {
|
|
3866
|
+
// provide: AXP_ACTIVITY_PROVIDER,
|
|
3867
|
+
// useClass: AXCActivityProvider,
|
|
3868
|
+
// multi: true,
|
|
3869
|
+
// },
|
|
4956
3870
|
{
|
|
4957
3871
|
provide: AXPWorkflowExecutionService,
|
|
4958
3872
|
useClass: AXCWorkflowExecutionService,
|