-
Notifications
You must be signed in to change notification settings - Fork 808
Open
Description
When an Exception is raised within an @app.workflow_run-wrapped function, it results in a Workflow Task Failed in temporal but the run itself stays in 'Running' state. For example:
@app.workflow
class PauseResumeWorkflow(Workflow[str]):
"""
A workflow that demonstrates Temporal's signaling capabilities.
This workflow pauses execution and waits for a signal before continuing.
"""
@app.workflow_run
async def run(
self, message: str = "This workflow demonstrates pause and resume functionality"
) -> WorkflowResult[str]:
"""
Run the pause-resume workflow.
Args:
message: A message to include in the workflow result.
Returns:
WorkflowResult containing the processed data.
"""
print(f"Starting PauseResumeWorkflow with message: {message}")
print(f"Workflow is pausing, workflow_id: {self.id}, run_id: {self.run_id}")
print(
"To resume this workflow, use the 'workflows-resume' tool or the Temporal UI"
)
raise RuntimeError("TEST")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels