> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ja/llms.txt # Run クラス `Run` クラスは Workflow の実行インスタンスを表し、Workflow の実行を開始、再開、ストリーミング、監視するためのメソッドを提供します。 ## 使用例 ```typescript const run = await workflow.createRun() const result = await run.start({ inputData: { value: 'initial data' }, }) if (result.status === 'suspended') { const resumedResult = await run.resume({ resumeData: { value: 'resume data' }, }) } ``` ## Run メソッド **start** (`(options?: StartOptions) => Promise`): 入力データを使用して Workflow の実行を開始します **resume** (`(options?: ResumeOptions) => Promise`): 中断された Workflow を特定のステップから再開します **stream** (`(options?: StreamOptions) => MastraWorkflowStream`): 拡張ストリーミング機能を使用し、Workflow の実行をイベントストリームとして監視します **resumeStream** (`(options?: ResumeStreamOptions) => MastraWorkflowStream`): ストリーミングを使用して、中断された Workflow を再開します **cancel** (`() => Promise<{ message: string }>`): Workflow の実行をキャンセルし、実行中のステップを停止して、後続のステップが実行されないようにします **restart** (`(options?: RestartOptions) => Promise`): 最後にアクティブだったステップから Workflow の実行を再起動します **timeTravel** (`(options?: TimeTravelOptions) => Promise`): 保存されたスナップショットデータまたは指定したカスタムコンテキストを使用し、任意のステップから Workflow を再実行します。 **timeTravelStream** (`(options?: TimeTravelOptions) => MastraWorkflowStream`): ストリーミングを使用して Workflow の実行をタイムトラベルします ## Run のステータス Workflow Run の `status` は、現在の実行状態を示します。指定できる値は次のとおりです。 **success** (`string`): すべてのステップが正常に実行を完了し、有効な結果が出力されました **failed** (`string`): Workflow の実行中にエラーが発生し、エラーの詳細を確認できます **suspended** (`string`): Workflow の実行が再開を待って一時停止しており、中断されたステップの情報を確認できます **canceled** (`string`): Workflow の実行が cancel() メソッドによってキャンセルされ、実行中のステップが停止し、後続のステップが実行されない状態です ## 関連項目 - [Run.start()](https://mastra.zisheng.pro/ja/reference/workflows/run-methods/start) - [Run.resume()](https://mastra.zisheng.pro/ja/reference/workflows/run-methods/resume) - [Run.cancel()](https://mastra.zisheng.pro/ja/reference/workflows/run-methods/cancel) - [Run.restart()](https://mastra.zisheng.pro/ja/reference/workflows/run-methods/restart) - [Run.timeTravel()](https://mastra.zisheng.pro/ja/reference/workflows/run-methods/timeTravel) - [Run.stream()](https://mastra.zisheng.pro/ja/docs/workflows/overview) - [Run.timeTravelStream()](https://mastra.zisheng.pro/ja/reference/streaming/workflows/timeTravelStream)