@acorex/modules 21.0.0-next.0 → 21.0.0-next.1
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.
|
@@ -1971,30 +1971,32 @@ class AXMWorkflowDefinitionProvider {
|
|
|
1971
1971
|
try {
|
|
1972
1972
|
// Dynamic import of JSON file
|
|
1973
1973
|
// The path is relative to the provider file location
|
|
1974
|
-
const module = await import(`./definitions/${name}.json`);
|
|
1975
|
-
const jsonDefinition = module.default || module;
|
|
1974
|
+
//// const module = await import(`./definitions/${name}.json`);
|
|
1975
|
+
// const jsonDefinition: AXPWorkflowDefinitionJson = module.default || module;
|
|
1976
1976
|
// Use name from JSON, or fallback to filename
|
|
1977
|
-
const workflowName = jsonDefinition.name || name;
|
|
1977
|
+
// const workflowName = jsonDefinition.name || name;
|
|
1978
1978
|
// Validate that name matches filename (if provided)
|
|
1979
|
-
if (jsonDefinition.name && jsonDefinition.name !== name) {
|
|
1980
|
-
|
|
1981
|
-
}
|
|
1979
|
+
// if (jsonDefinition.name && jsonDefinition.name !== name) {
|
|
1980
|
+
// console.warn(
|
|
1981
|
+
// `[AXMWorkflowDefinitionProvider] Name mismatch: filename is ${name}, but JSON has name ${jsonDefinition.name}. Using name from JSON.`
|
|
1982
|
+
// );
|
|
1983
|
+
// }
|
|
1982
1984
|
// Convert JSON definition to workflow definition (without system fields)
|
|
1983
1985
|
// System fields are managed by entity system
|
|
1984
|
-
const definition = {
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
};
|
|
1997
|
-
return
|
|
1986
|
+
// const definition: AXPWorkflowDefinition = {
|
|
1987
|
+
// // From JSON - name is the unique key
|
|
1988
|
+
// name: workflowName,
|
|
1989
|
+
// title: jsonDefinition.title || null,
|
|
1990
|
+
// description: jsonDefinition.description || null,
|
|
1991
|
+
// variables: jsonDefinition.variables || [],
|
|
1992
|
+
// inputs: jsonDefinition.inputs || [],
|
|
1993
|
+
// outputs: jsonDefinition.outputs || [],
|
|
1994
|
+
// outcomes: jsonDefinition.outcomes || [],
|
|
1995
|
+
// customProperties: jsonDefinition.customProperties || {},
|
|
1996
|
+
// options: jsonDefinition.options,
|
|
1997
|
+
// root: jsonDefinition.root,
|
|
1998
|
+
// };
|
|
1999
|
+
return null;
|
|
1998
2000
|
}
|
|
1999
2001
|
catch (error) {
|
|
2000
2002
|
// File not found or invalid JSON
|