eventListenerJob

On-prem only

The eventListenerJob task pauses a workflow and waits for an event that matches a specified topic and schema. Job variables can also be used with this task.

Potential use case

Suppose you have an email queue that requires all relevant information in a form to be filled out. The eventListenerJob task could be used to pause the request if the correct information is not present when the request is passed through.

Properties

IncomingTypeRequiredDescription
job_idStringYesThe job ID.
sourceStringYesThe source that provides the topic.
topicStringYesThe event topic.
schemaObjectYesA valid JSON schema that uniquely identifies an event.
OutgoingTypeDescription
resultObjectThe payload of the captured event.

Example

In this example:

  • The source string refers to @itential/app-workflow_engine to pull job information.
  • The event topic is jobPause. The job completes once it is paused on the Jobs page, where the result is shown.
  • The schema from the source being listened for is {"type":"object","required":["job"],"properties":{"job":{}}}.
eventListenerJob task configuration

The result returns information relevant to the workflow — specifically the job _id, name, type, and tasks.

eventListenerJob result