workflow
id: py-workflow
workflow
constworkflow: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
| Task | Method |
|---|---|
| Get workflow name | workflow.getName() |
| Get data dictionary | workflow.getDataDictionary() |
See Also
Workflow— Full class referencedataDictionary— Direct access to the data dictionary