pub struct Workflow {Show 28 fields
pub workflow_id: String,
pub workflow_name: String,
pub workflow_version: i32,
pub status: WorkflowStatus,
pub input: HashMap<String, Value>,
pub output: HashMap<String, Value>,
pub correlation_id: Option<String>,
pub tasks: Vec<Task>,
pub parent_workflow_id: Option<String>,
pub parent_workflow_task_id: Option<String>,
pub start_time: i64,
pub end_time: i64,
pub update_time: i64,
pub create_time: i64,
pub created_by: Option<String>,
pub updated_by: Option<String>,
pub reason_for_incompletion: Option<String>,
pub variables: HashMap<String, Value>,
pub external_input_payload_storage_path: Option<String>,
pub external_output_payload_storage_path: Option<String>,
pub priority: i32,
pub owner_app: Option<String>,
pub task_to_domain: HashMap<String, String>,
pub workflow_definition: Option<WorkflowDef>,
pub failed_reference_task_names: Vec<String>,
pub failed_task_names: Vec<String>,
pub last_retried_time: i64,
pub event: Option<String>,
}Expand description
A workflow execution instance.
Fields§
§workflow_id: StringUnique workflow ID.
workflow_name: StringWorkflow type/name.
workflow_version: i32Workflow version.
status: WorkflowStatusWorkflow status.
input: HashMap<String, Value>Workflow input (may be empty if returned as string from search API).
output: HashMap<String, Value>Workflow output (may be empty if returned as string from search API).
correlation_id: Option<String>Correlation ID.
tasks: Vec<Task>Tasks in this workflow execution (may be empty from search API).
parent_workflow_id: Option<String>Parent workflow ID (if this is a subworkflow).
parent_workflow_task_id: Option<String>Parent workflow task ID.
start_time: i64Start time (epoch ms or ISO 8601 string).
end_time: i64End time (epoch ms or ISO 8601 string).
update_time: i64Update time (epoch ms or ISO 8601 string).
create_time: i64Created time (epoch ms or ISO 8601 string).
created_by: Option<String>Created by.
updated_by: Option<String>Updated by.
reason_for_incompletion: Option<String>Reason for incompletion (if failed/terminated).
variables: HashMap<String, Value>Workflow variables.
external_input_payload_storage_path: Option<String>External input payload storage path.
external_output_payload_storage_path: Option<String>External output payload storage path.
priority: i32Priority.
owner_app: Option<String>Owner app.
task_to_domain: HashMap<String, String>Task to domain mapping.
workflow_definition: Option<WorkflowDef>Workflow definition.
failed_reference_task_names: Vec<String>Failed reference task names.
failed_task_names: Vec<String>Failed task names.
last_retried_time: i64Last retried time (epoch ms or ISO 8601 string).
event: Option<String>Event.
Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Check if workflow is terminal (completed, failed, terminated, timed out).
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if workflow is running (not terminal).
Sourcepub fn is_successful(&self) -> bool
pub fn is_successful(&self) -> bool
Check if workflow succeeded.
Sourcepub fn get_output<T>(&self, key: &str) -> Option<T>where
T: DeserializeOwned,
pub fn get_output<T>(&self, key: &str) -> Option<T>where
T: DeserializeOwned,
Get an output value.
Sourcepub fn get_output_string(&self, key: &str) -> Option<String>
pub fn get_output_string(&self, key: &str) -> Option<String>
Get output as string.
Sourcepub fn get_variable<T>(&self, key: &str) -> Option<T>where
T: DeserializeOwned,
pub fn get_variable<T>(&self, key: &str) -> Option<T>where
T: DeserializeOwned,
Get a variable value.