Skip to content
Open
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
4 changes: 2 additions & 2 deletions crates/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ where
.and_then(|d| d.try_into().ok()),
workflow_run_timeout: options.run_timeout.and_then(|d| d.try_into().ok()),
workflow_task_timeout: options.task_timeout.and_then(|d| d.try_into().ok()),
search_attributes: options.search_attributes.map(|d| d.into()),
search_attributes: options.search_attributes.map(|t| t.into_proto()),
cron_schedule: options.cron_schedule.unwrap_or_default(),
header: options.header.or(start_signal.header),
user_metadata,
Expand Down Expand Up @@ -1185,7 +1185,7 @@ where
.and_then(|d| d.try_into().ok()),
workflow_run_timeout: options.run_timeout.and_then(|d| d.try_into().ok()),
workflow_task_timeout: options.task_timeout.and_then(|d| d.try_into().ok()),
search_attributes: options.search_attributes.map(|d| d.into()),
search_attributes: options.search_attributes.map(|t| t.into_proto()),
cron_schedule: options.cron_schedule.unwrap_or_default(),
request_eager_execution: options.enable_eager_workflow_start,
retry_policy: options.retry_policy,
Expand Down
7 changes: 4 additions & 3 deletions crates/client/src/options_structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use temporalio_common::{
protos::temporal::api::{
common::{
self,
v1::{Header, Payload, Payloads},
v1::{Header, Payloads},
},
enums::v1::{
ArchivalState, HistoryEventFilterType, QueryRejectCondition, WorkflowIdConflictPolicy,
Expand All @@ -15,6 +15,7 @@ use temporalio_common::{
replication::v1::ClusterReplicationConfig,
workflowservice::v1::RegisterNamespaceRequest,
},
search_attributes::SearchAttributes,
telemetry::metrics::TemporalMeter,
};
use tokio_rustls::rustls::client::danger::ServerCertVerifier;
Expand Down Expand Up @@ -286,8 +287,8 @@ pub struct WorkflowStartOptions {
/// Optionally set a cron schedule for the workflow
pub cron_schedule: Option<String>,

/// Optionally associate extra search attributes with a workflow
pub search_attributes: Option<HashMap<String, Payload>>,
/// Additional search attributes for the workflow.
pub search_attributes: Option<SearchAttributes>,

/// Optionally enable Eager Workflow Start, a latency optimization using local workers
/// NOTE: Experimental
Expand Down
5 changes: 5 additions & 0 deletions crates/common-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ bon = { workspace = true }
crc32fast = "1"
derive_more = { workspace = true }
erased-serde = "0.4"
# Only the `alloc` feature is needed for RFC3339 formatting. Do NOT use
# Utc::now() or other clock functions — they are unavailable in
# wasm32-unknown-unknown without the `wasmbind` feature.
chrono = { version = "0.4", default-features = false, features = ["alloc"] }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
parking_lot = { version = "0.12" }
prost = { workspace = true }
prost-types = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
Expand Down
5 changes: 5 additions & 0 deletions crates/common-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ pub mod protos {

pub use temporalio_protos::*;
}
pub mod search_attributes;
pub mod worker;
mod workflow_definition;

pub use activity_definition::{ActivityDefinition, ActivityError};
pub use priority::Priority;
pub use search_attributes::{
SearchAttributeError, SearchAttributeKey, SearchAttributeUpdate, SearchAttributeValue,
SearchAttributes, Timestamp,
};
pub use worker::WorkerDeploymentVersion;
pub use workflow_definition::{
HasWorkflowDefinition, QueryDefinition, SignalDefinition, UntypedWorkflow, UpdateDefinition,
Expand Down
Loading
Loading