operaton_task_worker/structures/
service_task.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Clone, Debug)]
5#[serde(rename_all = "camelCase")]
6pub struct ServiceTask {
7 id: String,
9 activity_id: String,
11 process_instance_id: String,
12 suspended: bool,
13 topic_name: String,
14 priority: usize,
15 business_key: Option<String>,
16 worker_id: Option<String>,
17}
18
19impl ServiceTask {
20 pub fn id(&self) -> &str { &self.id }
21
22 pub fn activity_id(&self) -> &str {
23 &self.activity_id
24 }
25
26 pub fn process_instance_id(&self) -> &str {
27 &self.process_instance_id
28 }
29
30 pub fn suspended(&self) -> bool {
31 self.suspended
32 }
33
34 pub fn topic_name(&self) -> &str {
35 &self.topic_name
36 }
37
38 pub fn priority(&self) -> usize {
39 self.priority
40 }
41
42 pub fn business_key(&self) -> Option<String> {
43 self.business_key.clone()
44 }
45}