camunda_client/models/
process_instance_modification_instruction_dto.rs

1/*
2 * Camunda BPM REST API
3 *
4 * OpenApi Spec for Camunda BPM REST API.
5 *
6 * The version of the OpenAPI document: 7.13.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ProcessInstanceModificationInstructionDto {
16    /// **Mandatory**. One of the following values: `cancel`, `startBeforeActivity`, `startAfterActivity`, `startTransition`.  * A cancel instruction requests cancellation of a single activity instance or all instances of one activity. * A startBeforeActivity instruction requests to enter a given activity. * A startAfterActivity instruction requests to execute the single outgoing sequence flow of a given activity. * A startTransition instruction requests to execute a specific sequence flow.
17    #[serde(rename = "type")]
18    pub _type: Type,
19    #[serde(rename = "variables", skip_serializing_if = "Option::is_none")]
20    pub variables: Option<crate::models::TriggerVariableValueDto>,
21    /// Can be used with instructions of types `startTransition`. Specifies the sequence flow to start.
22    #[serde(rename = "activityId", skip_serializing_if = "Option::is_none")]
23    pub activity_id: Option<String>,
24    /// Can be used with instructions of types `startTransition`. Specifies the sequence flow to start.
25    #[serde(rename = "transitionId", skip_serializing_if = "Option::is_none")]
26    pub transition_id: Option<String>,
27    /// Can be used with instructions of type `cancel`. Specifies the activity instance to cancel. Valid values are the activity instance IDs supplied by the [Get Activity Instance request](https://docs.camunda.org/manual/7.13/reference/rest/process-instance/get-activity-instances/).
28    #[serde(rename = "activityInstanceId", skip_serializing_if = "Option::is_none")]
29    pub activity_instance_id: Option<String>,
30    /// Can be used with instructions of type `cancel`. Specifies the transition instance to cancel. Valid values are the transition instance IDs supplied by the [Get Activity Instance request](https://docs.camunda.org/manual/7.13/reference/rest/process-instance/get-activity-instances/).
31    #[serde(rename = "transitionInstanceId", skip_serializing_if = "Option::is_none")]
32    pub transition_instance_id: Option<String>,
33    /// Can be used with instructions of type `startBeforeActivity`, `startAfterActivity`, and `startTransition`. Valid values are the activity instance IDs supplied by the Get Activity Instance request. If there are multiple parent activity instances of the targeted activity, this specifies the ancestor scope in which hierarchy the activity/transition is to be instantiated.  Example: When there are two instances of a subprocess and an activity contained in the subprocess is to be started, this parameter allows to specifiy under which subprocess instance the activity should be started.
34    #[serde(rename = "ancestorActivityInstanceId", skip_serializing_if = "Option::is_none")]
35    pub ancestor_activity_instance_id: Option<String>,
36    /// Can be used with instructions of type cancel. Prevents the deletion of new created activity instances.
37    #[serde(rename = "cancelCurrentActiveActivityInstances", skip_serializing_if = "Option::is_none")]
38    pub cancel_current_active_activity_instances: Option<bool>,
39}
40
41impl ProcessInstanceModificationInstructionDto {
42    pub fn new(_type: Type) -> ProcessInstanceModificationInstructionDto {
43        ProcessInstanceModificationInstructionDto {
44            _type,
45            variables: None,
46            activity_id: None,
47            transition_id: None,
48            activity_instance_id: None,
49            transition_instance_id: None,
50            ancestor_activity_instance_id: None,
51            cancel_current_active_activity_instances: None,
52        }
53    }
54}
55
56/// **Mandatory**. One of the following values: `cancel`, `startBeforeActivity`, `startAfterActivity`, `startTransition`.  * A cancel instruction requests cancellation of a single activity instance or all instances of one activity. * A startBeforeActivity instruction requests to enter a given activity. * A startAfterActivity instruction requests to execute the single outgoing sequence flow of a given activity. * A startTransition instruction requests to execute a specific sequence flow.
57#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
58pub enum Type {
59    #[serde(rename = "cancel")]
60    Cancel,
61    #[serde(rename = "startBeforeActivity")]
62    StartBeforeActivity,
63    #[serde(rename = "startAfterActivity")]
64    StartAfterActivity,
65    #[serde(rename = "startTransition")]
66    StartTransition,
67}
68