a9cd7750f4
CI / unit-test (push) Has been cancelled
CI / detect-changes (push) Has been cancelled
CI / build (push) Has been cancelled
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
CI / test-harness (push) Has been cancelled
CI / generate-e2e-matrix (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / build-ui (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
UI v2 Integration CI / E2E (Integration) (push) Has been cancelled
UI v2 CI / Lint, Format & Test (push) Has been cancelled
UI v2 CI / E2E (Mocked) (push) Has been cancelled
30 lines
1.4 KiB
JSON
30 lines
1.4 KiB
JSON
{
|
|
"name": "input_param_demo_workflow",
|
|
"description": "Demonstrates that the scheduler injects scheduledTime and executionTime into every workflow's input automatically. Uses an INLINE task to compute a 24-hour reporting window ending at the scheduled time, suitable for nightly report generation patterns.",
|
|
"version": 1,
|
|
"tasks": [
|
|
{
|
|
"name": "compute_report_window",
|
|
"taskReferenceName": "compute_report_window",
|
|
"type": "INLINE",
|
|
"inputParameters": {
|
|
"scheduledTime": "${workflow.input._scheduledTime}",
|
|
"executionTime": "${workflow.input._executedTime}",
|
|
"evaluatorType": "javascript",
|
|
"expression": "function toISO(ms) { return new Date(ms).toISOString(); } ({ reportWindowStart: toISO($.scheduledTime - 86400000), reportWindowEnd: toISO($.scheduledTime), scheduledAt: toISO($.scheduledTime), triggeredAt: toISO($.executionTime) })"
|
|
}
|
|
}
|
|
],
|
|
"outputParameters": {
|
|
"reportWindowStart": "${compute_report_window.output.result.reportWindowStart}",
|
|
"reportWindowEnd": "${compute_report_window.output.result.reportWindowEnd}",
|
|
"scheduledAt": "${compute_report_window.output.result.scheduledAt}",
|
|
"triggeredAt": "${compute_report_window.output.result.triggeredAt}"
|
|
},
|
|
"schemaVersion": 2,
|
|
"restartable": true,
|
|
"ownerEmail": "demo@example.com",
|
|
"timeoutPolicy": "ALERT_ONLY",
|
|
"timeoutSeconds": 30
|
|
}
|