pub fn as_poll_wft_response(&self, task_q: impl Into<String>) -> PollWorkflowTaskQueueResponse {
        let task_token: [u8; 16] = thread_rng().gen();
        PollWorkflowTaskQueueResponse {
            history: Some(History {
                events: self.events.clone(),
            }),
            task_token: task_token.to_vec(),
            workflow_type: Some(WorkflowType {
                name: self.wf_type.clone(),
            }),
            workflow_execution_task_queue: Some(TaskQueue {
                name: task_q.into(),
                kind: TaskQueueKind::Normal as i32,
            }),
            previous_started_event_id: self.previous_started_event_id,
            started_event_id: self.workflow_task_started_event_id,
            ..Default::default()
        }
    }
/// Create a workflow task polling response containing all the events in this history and a
/// randomly generated task token. Caller should attach a meaningful `workflow_execution` if
/// needed.
Create a workflow task polling response containing all the events in this history and a
randomly generated task token. Caller should attach a meaningful `workflow_execution` if
needed.
Create a workflow task polling response containing all the events in this history and a randomly generated task token . Caller should attach a meaningful ` workflow_execution ` if needed .
pub fn as_poll_wft_response(&self, task_q: impl Into<String>) -> PollWorkflowTaskQueueResponse {
        let task_token: [u8; 16] = thread_rng().gen();
        PollWorkflowTaskQueueResponse {
            history: Some(History {
                events: self.events.clone(),
            }),
            task_token: task_token.to_vec(),
            workflow_type: Some(WorkflowType {
                name: self.wf_type.clone(),
            }),
            workflow_execution_task_queue: Some(TaskQueue {
                name: task_q.into(),
                kind: TaskQueueKind::Normal as i32,
            }),
            previous_started_event_id: self.previous_started_event_id,
            started_event_id: self.workflow_task_started_event_id,
            ..Default::default()
        }
    }
pub fn as_poll_wft_response ( & self , task_q : impl Into < String > ) -> PollWorkflowTaskQueueResponse { let task_token : [ u8 ; 16 ] = thread_rng ( ) . gen ( ) ; PollWorkflowTaskQueueResponse { history : Some ( History { events : self . events . clone ( ) , } ) , task_token : task_token . to_vec ( ) , workflow_type : Some ( WorkflowType { name : self . wf_type . clone ( ) , } ) , workflow_execution_task_queue : Some ( TaskQueue { name : task_q . into ( ) , kind : TaskQueueKind :: Normal as i32 , } ) , previous_started_event_id : self . previous_started_event_id , started_event_id : self . workflow_task_started_event_id , .. Default :: default ( ) } }
Create a workflow task polling response containing all the events in this history and a
randomly generated task token.
Create a workflow task polling response containing all the events in this history and a randomly generated task token .
&self
task_q
impl Into<String>
&self
task_q
impl Into<String>