[One Workflow] Execute workflow from historical#253396
Conversation
|
/ci |
|
@elasticmachine merge upstream |
|
Nice work @semd! A few things I noticed locally:
Screen.Recording.2026-02-20.at.15.21.40.mov
|
…lay_executions' into 14694_workflows/replay_executions
|
Hey @Kiryous
Yes, that is planned.
That would be cool! I think users would also benefit from a status filter as well, and a time range filter would be even more important, imo. None of these was in the requirements, though. |
|
Hey, nice catch. I completely missed that case and updated the mocks accordingly. |
Yes, I see, Pavel just added this variant, with just a wider Replay button, should be a little change, maybe we can squeeze it into this PR? |
…lay_executions' into 14694_workflows/replay_executions
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
cc @semd |
…ps-config-rebase * commit 'f135f030951237c5e9b0251931441aee3121b31d': (163 commits) [CPS] Support data view requests and do not sanitize project_routing in data plugin/resolve indices (elastic#253654) [One Workflow] Execute workflow from historical (elastic#253396) [streams][background tasks] gracefully handle non existing stream (elastic#254683) [Lens API] Waffle/Mosaic get green as a default color (elastic#254304) [Security Solution] Remove prebuilt rules customization callout on Rule Management page (elastic#254386) [Workflows] support passing attachments to run_agent step (elastic#251291) [One Discover][Logs UX] Update OpenTelemetry Semantic Conventions (elastic#254367) [kbn-es] Add --docker flag to yarn es snapshot (elastic#254306) [Workplace AI] Remove Data Source Config (elastic#254521) [Entity Store v2] Add CRUD API (elastic#252052) [CI] Increase type checking machine (elastic#254676) [main] Sync bundled packages with Package Storage (elastic#254232) Skip flaky test elastic#254625 (elastic#254662) Upgrade `@elastic/elasticsearch` to 9.3.1 (elastic#253660) [One Workflow] Migrate http step to new connector (elastic#249004) [Entity Store] Store EUID Scripts (elastic#254515) [APM] Fix Otel missing fields undefined errors (elastic#254271) [Console] Add support for documentation links on Serverless (elastic#254489) Create edit ILM flow (elastic#253393) [Agent Builder] Mid term: minimal recommended model set elastic#12875 (elastic#254560) ...
## Summary Adds a "Historical" trigger tab to the Test/Run Workflow modal, allowing users to re-run a workflow using input data from a previous execution. Also introduces a "Run again" button in the execution detail panel, and cleans up trigger-related types, translations, and icons. ### Changes **Historical trigger tab (new feature)** - New `WorkflowExecuteHistoricalForm` component: lets the user pick a past execution from a combo box, fetches its context, and populates a JSON editor with the original input data. - New `useWorkflowExecution` hook for fetching a single execution by ID. - The modal now renders four trigger cards (Alert, Document, Manual, Historical) driven by a shared `ENABLED_TRIGGER_TABS` constant and a `WorkflowTriggerTab` type. - All four trigger forms share the same `executionInput`/`executionInputErrors` state — no special-cased branches for historical. **"Run again" button** - Added a replay button (`EuiButtonIcon` with refresh icon) to `WorkflowExecutionPanel`, next to the existing "Done" button. - Clicking it stores the execution ID in Redux (`replayExecutionId`) and opens the test modal with the Historical tab pre-selected. - New Redux state (`replayExecutionId`), selector (`selectReplayExecutionId`), and action (`setReplayExecutionId`) in the workflow detail slice. **Trigger types & translations cleanup** - Moved `WorkflowTriggerTab` from telemetry types into a dedicated `features/run_workflow/ui/types.ts`, derived from `ENABLED_TRIGGER_TABS` constant. - Removed old `MANUAL_TRIGGERS_DESCRIPTIONS` from `common/translations.ts`; replaced with feature-scoped `TRIGGER_TABS_LABELS` and `TRIGGER_TABS_DESCRIPTIONS`. - Renamed "Index" trigger label to "Document" for clarity. - Updated telemetry schema description to include `'historical'`. **Icon & trigger type improvements** - Extracted `getTriggerTypeIconType()` from `getStepIconType()` so trigger icons are resolved separately from step icons. - Added `'document'` trigger type to `workflow_pseudo_step_context.ts` (distinguishes alert vs document events). - Added `aria-hidden` attributes to decorative icons. **Minor UI tweaks** - Wrapped `AlertsSearchBar` in a transparent `EuiPanel` for consistent spacing. - Adjusted triggers forms gutterSize and padding for alignment. ### Files touched | Area | Files | |------|-------| | Historical form | `workflow_execute_historical_form.tsx` (new) | | Data hook | `use_workflow_execution.ts` (new) | | Constants & types | `constants.ts` (new), `types.ts` (new), `translations.ts` (new) | | Modal | `workflow_execute_modal.tsx` | | Execution panel | `workflow_execution_panel.tsx` | | Redux store | `slice.ts`, `selectors.ts`, `types.ts` | | Test modal | `workflow_detail_test_modal.tsx` | | Workflow list | `workflow_list.tsx` | | Telemetry | `execution/types.ts`, `execution/index.ts`, `telemetry.ts` | | Trigger context | `workflow_pseudo_step_context.ts` | | Icons | `get_step_icon_type.ts`, `step_icon.tsx` | | Event form | `workflow_execute_event_form.tsx` | | Index form | `workflow_execute_index_form.tsx` | | Use workflow actions | `use_workflow_actions.ts` | | Removed translations | `common/translations.ts` | | Tests | `workflow_execute_modal.test.tsx`, `workflow_detail_test_modal.test.tsx` | ## Screenshots ### Before <img width="1212" height="756" alt="Captura de pantalla 2026-02-17 a les 11 08 48" src="https://github.com/user-attachments/assets/5aef8910-1421-4470-be3e-a3da4dbd2c7b" /> ### After https://github.com/user-attachments/assets/28481963-7403-456b-9384-aae339e25a38 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Tal <tal.borenstein@elastic.co>
## Summary Adds a "Historical" trigger tab to the Test/Run Workflow modal, allowing users to re-run a workflow using input data from a previous execution. Also introduces a "Run again" button in the execution detail panel, and cleans up trigger-related types, translations, and icons. ### Changes **Historical trigger tab (new feature)** - New `WorkflowExecuteHistoricalForm` component: lets the user pick a past execution from a combo box, fetches its context, and populates a JSON editor with the original input data. - New `useWorkflowExecution` hook for fetching a single execution by ID. - The modal now renders four trigger cards (Alert, Document, Manual, Historical) driven by a shared `ENABLED_TRIGGER_TABS` constant and a `WorkflowTriggerTab` type. - All four trigger forms share the same `executionInput`/`executionInputErrors` state — no special-cased branches for historical. **"Run again" button** - Added a replay button (`EuiButtonIcon` with refresh icon) to `WorkflowExecutionPanel`, next to the existing "Done" button. - Clicking it stores the execution ID in Redux (`replayExecutionId`) and opens the test modal with the Historical tab pre-selected. - New Redux state (`replayExecutionId`), selector (`selectReplayExecutionId`), and action (`setReplayExecutionId`) in the workflow detail slice. **Trigger types & translations cleanup** - Moved `WorkflowTriggerTab` from telemetry types into a dedicated `features/run_workflow/ui/types.ts`, derived from `ENABLED_TRIGGER_TABS` constant. - Removed old `MANUAL_TRIGGERS_DESCRIPTIONS` from `common/translations.ts`; replaced with feature-scoped `TRIGGER_TABS_LABELS` and `TRIGGER_TABS_DESCRIPTIONS`. - Renamed "Index" trigger label to "Document" for clarity. - Updated telemetry schema description to include `'historical'`. **Icon & trigger type improvements** - Extracted `getTriggerTypeIconType()` from `getStepIconType()` so trigger icons are resolved separately from step icons. - Added `'document'` trigger type to `workflow_pseudo_step_context.ts` (distinguishes alert vs document events). - Added `aria-hidden` attributes to decorative icons. **Minor UI tweaks** - Wrapped `AlertsSearchBar` in a transparent `EuiPanel` for consistent spacing. - Adjusted triggers forms gutterSize and padding for alignment. ### Files touched | Area | Files | |------|-------| | Historical form | `workflow_execute_historical_form.tsx` (new) | | Data hook | `use_workflow_execution.ts` (new) | | Constants & types | `constants.ts` (new), `types.ts` (new), `translations.ts` (new) | | Modal | `workflow_execute_modal.tsx` | | Execution panel | `workflow_execution_panel.tsx` | | Redux store | `slice.ts`, `selectors.ts`, `types.ts` | | Test modal | `workflow_detail_test_modal.tsx` | | Workflow list | `workflow_list.tsx` | | Telemetry | `execution/types.ts`, `execution/index.ts`, `telemetry.ts` | | Trigger context | `workflow_pseudo_step_context.ts` | | Icons | `get_step_icon_type.ts`, `step_icon.tsx` | | Event form | `workflow_execute_event_form.tsx` | | Index form | `workflow_execute_index_form.tsx` | | Use workflow actions | `use_workflow_actions.ts` | | Removed translations | `common/translations.ts` | | Tests | `workflow_execute_modal.test.tsx`, `workflow_detail_test_modal.test.tsx` | ## Screenshots ### Before <img width="1212" height="756" alt="Captura de pantalla 2026-02-17 a les 11 08 48" src="https://github.com/user-attachments/assets/5aef8910-1421-4470-be3e-a3da4dbd2c7b" /> ### After https://github.com/user-attachments/assets/28481963-7403-456b-9384-aae339e25a38 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Tal <tal.borenstein@elastic.co>

Summary
Adds a "Historical" trigger tab to the Test/Run Workflow modal, allowing users to re-run a workflow using input data from a previous execution.
Also introduces a "Run again" button in the execution detail panel, and cleans up trigger-related types, translations, and icons.
Changes
Historical trigger tab (new feature)
WorkflowExecuteHistoricalFormcomponent: lets the user pick a past execution from a combo box, fetches its context, and populates a JSON editor with the original input data.useWorkflowExecutionhook for fetching a single execution by ID.ENABLED_TRIGGER_TABSconstant and aWorkflowTriggerTabtype.executionInput/executionInputErrorsstate — no special-cased branches for historical."Run again" button
EuiButtonIconwith refresh icon) toWorkflowExecutionPanel, next to the existing "Done" button.replayExecutionId) and opens the test modal with the Historical tab pre-selected.replayExecutionId), selector (selectReplayExecutionId), and action (setReplayExecutionId) in the workflow detail slice.Trigger types & translations cleanup
WorkflowTriggerTabfrom telemetry types into a dedicatedfeatures/run_workflow/ui/types.ts, derived fromENABLED_TRIGGER_TABSconstant.MANUAL_TRIGGERS_DESCRIPTIONSfromcommon/translations.ts; replaced with feature-scopedTRIGGER_TABS_LABELSandTRIGGER_TABS_DESCRIPTIONS.'historical'.Icon & trigger type improvements
getTriggerTypeIconType()fromgetStepIconType()so trigger icons are resolved separately from step icons.'document'trigger type toworkflow_pseudo_step_context.ts(distinguishes alert vs document events).aria-hiddenattributes to decorative icons.Minor UI tweaks
AlertsSearchBarin a transparentEuiPanelfor consistent spacing.Files touched
workflow_execute_historical_form.tsx(new)use_workflow_execution.ts(new)constants.ts(new),types.ts(new),translations.ts(new)workflow_execute_modal.tsxworkflow_execution_panel.tsxslice.ts,selectors.ts,types.tsworkflow_detail_test_modal.tsxworkflow_list.tsxexecution/types.ts,execution/index.ts,telemetry.tsworkflow_pseudo_step_context.tsget_step_icon_type.ts,step_icon.tsxworkflow_execute_event_form.tsxworkflow_execute_index_form.tsxuse_workflow_actions.tscommon/translations.tsworkflow_execute_modal.test.tsx,workflow_detail_test_modal.test.tsxScreenshots
Before
After
Gravacio.de.pantalla.2026-02-18.a.les.11.39.13.mov