feat(server): implement workflow triggering and enhance script execution
- Added support for triggering workflows via a new triggerWorkflow function, allowing for fire-and-forget execution of workflows with optional data transformation using JSONata. - Introduced a $workflows API in the script sandbox for accessing workflow triggers. - Enhanced existing script execution functions to accommodate the new workflow triggering capabilities. - Updated workflow-mermaid.js and WorkflowsPage to reflect the new workflow type in labels for better clarity.
This commit is contained in:
@@ -47,6 +47,7 @@ function mermaidLabel(text) {
|
||||
function triggerLabel(t) {
|
||||
const type = String(t?.type ?? "").toLowerCase();
|
||||
if (type === "cron") return `cron ${t.schedule ?? ""}`.trim();
|
||||
if (type === "workflow") return "workflow";
|
||||
const method = t?.method ?? "POST";
|
||||
const path = t?.path ?? "";
|
||||
return `${method} ${path}`.trim();
|
||||
|
||||
Reference in New Issue
Block a user