class documentation
class WorkflowHistory: (source)
Constructor: WorkflowHistory.from_json(workflow_id, history)
A workflow's ID and immutable history.
| Static Method | from |
Construct a WorkflowHistory from an ID and a json dump of history. |
| Method | to |
Convert this history to JSON. |
| Method | to |
Convert this history to JSON-compatible dict. |
| Class Variable | events |
History events for the workflow. |
| Class Variable | workflow |
ID of the workflow. |
| Property | run |
Run ID extracted from the first event. |
@staticmethod
def from_json(workflow_id:
def from_json(workflow_id:
str, history: str | dict[ str, Any]) -> WorkflowHistory:
(source)
¶
Construct a WorkflowHistory from an ID and a json dump of history.
This is built to work both with Temporal UI/CLI JSON as well as
to_json even though they are slightly different.
| Parameters | |
workflowstr | The workflow's ID |
history:str | dict[ | A string or parsed-to-dict representation of workflow history |
| Returns | |
WorkflowHistory | Workflow history |