diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 3020fa1b6..c4bdb7f16 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -55,13 +55,11 @@ pub use activity_context::ActContext; pub use temporal_client::Namespace; pub use workflow_context::{ ActivityOptions, CancellableFuture, ChildWorkflow, ChildWorkflowOptions, LocalActivityOptions, - Signal, SignalData, SignalWorkflowOptions, WfContext, + PendingChildWorkflow, Signal, SignalData, SignalWorkflowOptions, StartedChildWorkflow, + WfContext, }; -use crate::{ - interceptors::WorkerInterceptor, - workflow_context::{ChildWfCommon, PendingChildWorkflow}, -}; +use crate::{interceptors::WorkerInterceptor, workflow_context::ChildWfCommon}; use anyhow::{anyhow, bail, Context}; use app_data::AppData; use futures::{future::BoxFuture, FutureExt, StreamExt, TryFutureExt, TryStreamExt}; diff --git a/sdk/src/workflow_context.rs b/sdk/src/workflow_context.rs index e14d7b58c..861559ed6 100644 --- a/sdk/src/workflow_context.rs +++ b/sdk/src/workflow_context.rs @@ -635,9 +635,11 @@ pub struct ChildWfCommon { result_future: CancellableWFCommandFut, } +/// Child workflow in pending state pub struct PendingChildWorkflow { + /// The status of the child workflow start pub status: ChildWorkflowStartStatus, - pub common: ChildWfCommon, + pub(crate) common: ChildWfCommon, } impl PendingChildWorkflow { @@ -654,7 +656,9 @@ impl PendingChildWorkflow { } } +/// Child workflow in started state pub struct StartedChildWorkflow { + /// Run ID of the child workflow pub run_id: String, common: ChildWfCommon, }