FlowMint WorkflowsFlowMint Workflowsactions filters hooks do_action apply_filters extend developer php
FlowMint fires these actions and filters. Step types themselves cannot be
added from outside the plugin.
| Hook | Type | Arguments | When |
|---|
fmw_workflow_run_started | Action | run id, workflow id, entry id | A run begins. |
fmw_workflow_run_completed | Action | run id, workflow id, entry id, context | A run completes. |
fmw_workflow_run_failed | Action | run id, workflow id, entry id, error code, error message | A run is marked failed for good. |
fmw_should_run_workflow | Filter | true, workflow id, entry id | Before the steps run. Return false to skip them; the run is marked completed. |
The entry id is 0 for a scheduled run.
| Hook | Type | Arguments | When |
|---|
fmw_step_completed | Action | run id, step name, step type, output | A step succeeds. |
fmw_step_failed | Action | run id, step name, step type, error code, message | A step fails, whatever its on_error. |
fmw_step_output | Filter | output, step object, context | Before a step’s output is stored for later steps. The run history keeps the unfiltered output. |
| Hook | Type | Arguments | When |
|---|
fmw_workflow_saved | Action | FMW_Workflow object | A workflow is created or updated. |
fmw_workflow_disabled | Action | workflow id | An update switches a workflow off. |
fmw_workflow_deleted | Action | workflow id, previous row | A workflow is deleted. |
fmw_init | Action | plugin instance | FlowMint has started. |
| Hook | Type | Arguments | Use |
|---|
fmw_log | Action | level, message, context | Receive every log message, for example to send it to a monitoring service. |
fmw_log_min_level | Filter | info | Lowest level written: debug, info, warning or error. Debug messages also need the FMW_DEBUG constant. |
fmw_failure_notification_enabled | Filter | true, run id, workflow id | Return false to send no alert. |
fmw_failure_notification_message | Filter | message, run id, workflow id, entry id, error code, error message | Change the alert text. |
fmw_credential | Filter | null, key | Return a value to use instead of the stored credential. |
| Hook | Type | Arguments | Use |
|---|
fmw_retry_delay_seconds | Filter | delay, attempt, run id | Seconds before a retry. Default 60, 300, then 900. |
fmw_run_time_limit | Filter | 300 | Seconds of PHP time asked for each run. |
fmw_interrupted_run_after_seconds | Filter | 1800 | How long a run may stay RUNNING before it is treated as interrupted. |
fmw_drive_upload_chunk_size | Filter | 8 MB in bytes | Size of each part of a large Drive upload, rounded to a multiple of 256 KB. |
fmw_drive_http_client | Filter | null | Return a Guzzle client to send every Google Drive request through, for testing a workflow without Google. |
| Hook | Type | Arguments | Use |
|---|
flowmint_manage_workflows_capability | Filter | flowmint_manage_workflows | The capability the REST API and connector check. The admin screens always check flowmint_manage_workflows. |
flowmint_default_manage_workflows_roles | Filter | ['administrator'] | Roles given the capability on activation and on database upgrades. |