Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust-SDK: Make PendingChildWorkflow and StartedChildWorkflow public #644

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
6 changes: 5 additions & 1 deletion sdk/src/workflow_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,11 @@ pub struct ChildWfCommon {
result_future: CancellableWFCommandFut<ChildWorkflowResult, ()>,
}

/// 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 {
Expand All @@ -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,
}
Expand Down
Loading