Create a Listener Workflow v2
A listener Workflow remains active and waits for a supported Node Method to receive an external event or batch.
Build the listener
- Create a Workflow in the Test Environment.
- Select the Cluster on which the entire Workflow must run.
- Add a supported listener Node Method as the root trigger Step.
- Select or create its Connection when required.
- Map the trigger Returns into the processing Steps.
- Add bounded error handling and log-safe operational context.
The exact listener Parameters and Returns come from its Node Method contract. Confirm that the Node and Connection both support the Workflow's selected Cluster. The Runtime does not route a single listener Step through a v1 Runtime DropPoint.
Test and publish
- Use Debug with a safe event source or representative samples where the listener supports it.
- Inspect Problems and logs.
- Save the Workflow.
- Publish or promote it to the target Environment.
- Configure the Connection values for that Environment.
- Enable the Workflow.
Verify activation
Allow a short refresh period after publishing or changing the status, Connection, or Cluster selection. Confirm the listener from Workflow logs and a controlled source event.
Disabling the Workflow prevents new listener starts and causes its continuous listener instance to drain during reconciliation. If it does not become active, check publish, Environment status, Cluster hosts, Connection validity, Node placement support, and capacity.
Worked example: watch a local folder
Use the File Listen Method on a Run Anywhere Cluster that can access a test folder. The path is on the Cluster host, so each eligible host must have the intended filesystem access.
- Create a Workflow with
New Workflowin Test and select the Run Anywhere Cluster. - Add
File→Listenat the root and name the StepwatchFiles. - Set
Pathto an accessible test folder,Maskto*.txt,PollIntervalto5,FolderDepthLimitto0, andFindMatchesOnStarttofalse. - Add a For Each Step named
processFilesand mapItemsto{watchFiles.Files}. Retain the String fieldChangedFilePathin its item schema. - Add
File→Readinside the loop and map itsPathParameter to{processFiles.Items.ChangedFilePath}. - Start Debug and create a small
.txtfile in the test folder. Inspect the listener result and the nested read Step in Logs, then stop Debug.
The listener returns the matching file path and the loop runs the read Step for that item. With a five-second polling interval, allow time for the next poll. Use a disposable folder and avoid editing the same file repeatedly during this first test.
Save, publish, and enable the Workflow when the test succeeds. Create another file and confirm a published listener activation processes it. File notifications are not a business-level exactly-once guarantee: use a stable record identifier and idempotent processing when a repeated notification could duplicate a write.
See also
See Triggers, Workflow Status, and Local System Integration.