1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//// An instruction to the lang sdk to run some workflow code, whether for the first time or from
//// a cached state.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WfActivation {
    /// A unique identifier for this task
    #[prost(bytes = "vec", tag = "1")]
    pub task_token: ::prost::alloc::vec::Vec<u8>,
    //// The current time as understood by the workflow, which is set by workflow task started events
    #[prost(message, optional, tag = "2")]
    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
    //// The id of the currently active run of the workflow
    #[prost(string, tag = "3")]
    pub run_id: ::prost::alloc::string::String,
    //// The things to do upon activating the workflow
    #[prost(message, repeated, tag = "4")]
    pub jobs: ::prost::alloc::vec::Vec<WfActivationJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WfActivationJob {
    #[prost(oneof = "wf_activation_job::Variant", tags = "1, 2, 4, 5, 6, 7, 8, 50")]
    pub variant: ::core::option::Option<wf_activation_job::Variant>,
}
/// Nested message and enum types in `WFActivationJob`.
pub mod wf_activation_job {
    #[derive(::derive_more::From, Clone, PartialEq, ::prost::Oneof)]
    pub enum Variant {
        //// Begin a workflow for the first time
        #[prost(message, tag = "1")]
        StartWorkflow(super::StartWorkflow),
        //// A timer has fired, allowing whatever was waiting on it (if anything) to proceed
        #[prost(message, tag = "2")]
        FireTimer(super::FireTimer),
        //// Workflow was reset. The randomness seed must be updated.
        #[prost(message, tag = "4")]
        UpdateRandomSeed(super::UpdateRandomSeed),
        //// A request to query the workflow was received.
        #[prost(message, tag = "5")]
        QueryWorkflow(super::QueryWorkflow),
        //// A request to cancel the workflow was received.
        #[prost(message, tag = "6")]
        CancelWorkflow(super::CancelWorkflow),
        //// A request to signal the workflow was received.
        #[prost(message, tag = "7")]
        SignalWorkflow(super::SignalWorkflow),
        //// An activity was resolved with, result could be completed, failed or cancelled
        #[prost(message, tag = "8")]
        ResolveActivity(super::ResolveActivity),
        //// Remove the workflow identified by the [WFActivation] containing this job from the cache
        //// after performing the activation.
        ////
        //// If other job variant are present in the list, this variant will be the last job in the
        //// job list. The boolean value is irrelevant, since the variant type is what matters. It
        //// will be set to true if this is the variant.
        #[prost(bool, tag = "50")]
        RemoveFromCache(bool),
    }
}
//// Start a new workflow
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartWorkflow {
    //// The identifier the lang-specific sdk uses to execute workflow code
    #[prost(string, tag = "1")]
    pub workflow_type: ::prost::alloc::string::String,
    //// The workflow id used on the temporal server
    #[prost(string, tag = "2")]
    pub workflow_id: ::prost::alloc::string::String,
    //// Inputs to the workflow code
    #[prost(message, repeated, tag = "3")]
    pub arguments: ::prost::alloc::vec::Vec<super::common::Payload>,
    //// The seed must be used to initialize the random generator used by SDK.
    //// RandomSeedUpdatedAttributes are used to deliver seed updates.
    #[prost(uint64, tag = "4")]
    pub randomness_seed: u64,
}
//// Notify a workflow that a timer has fired
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FireTimer {
    #[prost(string, tag = "1")]
    pub timer_id: ::prost::alloc::string::String,
}
//// Notify a workflow that an activity has been resolved
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolveActivity {
    #[prost(string, tag = "1")]
    pub activity_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub result: ::core::option::Option<super::activity_result::ActivityResult>,
}
//// Update the workflow's random seed
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRandomSeed {
    #[prost(uint64, tag = "1")]
    pub randomness_seed: u64,
}
//// Query a workflow
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryWorkflow {
    #[prost(string, tag = "1")]
    pub query_type: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub arguments: ::prost::alloc::vec::Vec<super::common::Payload>,
}
//// Cancel a running workflow
///
/// TODO: add attributes here
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelWorkflow {}
//// Send a signal to a workflow
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignalWorkflow {
    #[prost(string, tag = "1")]
    pub signal_name: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub input: ::prost::alloc::vec::Vec<super::common::Payload>,
    #[prost(string, tag = "3")]
    pub identity: ::prost::alloc::string::String,
}