Skip to main content

workflow


id: py-workflow​

workflow

const workflow: Workflow

The current workflow instance. Provides access to workflow-level metadata and the data dictionary.


At a Glance​

def on_init():
workflow_name = workflow.getName()
stream.logInfo(f'Running in workflow: {workflow_name}')

def on_message():
# Attach workflow info to message
message.data.WORKFLOW_NAME = workflow.getName()
stream.emit(message, OUTPUT_PORT)

Common Tasks​

TaskMethod
Get workflow nameworkflow.getName()
Get data dictionaryworkflow.getDataDictionary()

See Also​