Class TaskVariableApi

java.lang.Object
org.camunda.community.rest.client.api.TaskVariableApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-06-04T13:43:01.451833574Z[Etc/UTC]") public class TaskVariableApi extends Object
  • Constructor Details

    • TaskVariableApi

      public TaskVariableApi()
    • TaskVariableApi

      public TaskVariableApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • deleteTaskVariable

      public void deleteTaskVariable(String id, String varName) throws ApiException
      Delete Task Variable Removes a variable that is visible to a task. A variable is visible to a task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to delete the variable from. (required)
      varName - The name of the variable to be removed. (required)
      Throws:
      ApiException - if fails to make API call
    • deleteTaskVariable

      public void deleteTaskVariable(String id, String varName, Map<String,String> additionalHeaders) throws ApiException
      Delete Task Variable Removes a variable that is visible to a task. A variable is visible to a task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to delete the variable from. (required)
      varName - The name of the variable to be removed. (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getTaskVariable

      public VariableValueDto getTaskVariable(String id, String varName, Boolean deserializeValue) throws ApiException
      Get Task Variable Retrieves a variable from the context of a given task. The variable must be visible from the task. It is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to retrieve the variable from. (required)
      varName - The name of the variable to get. (required)
      deserializeValue - Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on the server side (default `true`). If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath. If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML. Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this parameter to `false` when developing web applications that are independent of the Java process applications deployed to the engine. (optional, default to true)
      Returns:
      VariableValueDto
      Throws:
      ApiException - if fails to make API call
    • getTaskVariable

      public VariableValueDto getTaskVariable(String id, String varName, Boolean deserializeValue, Map<String,String> additionalHeaders) throws ApiException
      Get Task Variable Retrieves a variable from the context of a given task. The variable must be visible from the task. It is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to retrieve the variable from. (required)
      varName - The name of the variable to get. (required)
      deserializeValue - Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on the server side (default `true`). If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath. If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML. Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this parameter to `false` when developing web applications that are independent of the Java process applications deployed to the engine. (optional, default to true)
      additionalHeaders - additionalHeaders for this call
      Returns:
      VariableValueDto
      Throws:
      ApiException - if fails to make API call
    • getTaskVariableBinary

      public File getTaskVariableBinary(String id, String varName) throws ApiException
      Get Task Variable (Binary) Retrieves a binary variable from the context of a given task. Applicable for byte array and file variables. The variable must be visible from the task. It is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to retrieve the variable for. (required)
      varName - The name of the variable to retrieve. (required)
      Returns:
      File
      Throws:
      ApiException - if fails to make API call
    • getTaskVariableBinary

      public File getTaskVariableBinary(String id, String varName, Map<String,String> additionalHeaders) throws ApiException
      Get Task Variable (Binary) Retrieves a binary variable from the context of a given task. Applicable for byte array and file variables. The variable must be visible from the task. It is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to retrieve the variable for. (required)
      varName - The name of the variable to retrieve. (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      File
      Throws:
      ApiException - if fails to make API call
    • getTaskVariables

      public Map<String,VariableValueDto> getTaskVariables(String id, Boolean deserializeValues) throws ApiException
      Get Task Variables Retrieves all variables visible from the task. A variable is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to retrieve the variables from. (required)
      deserializeValues - Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on the server side (default `true`). If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath. If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML. Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this parameter to `false` when developing web applications that are independent of the Java process applications deployed to the engine. (optional, default to true)
      Returns:
      Map<String, VariableValueDto>
      Throws:
      ApiException - if fails to make API call
    • getTaskVariables

      public Map<String,VariableValueDto> getTaskVariables(String id, Boolean deserializeValues, Map<String,String> additionalHeaders) throws ApiException
      Get Task Variables Retrieves all variables visible from the task. A variable is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to retrieve the variables from. (required)
      deserializeValues - Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on the server side (default `true`). If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath. If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML. Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this parameter to `false` when developing web applications that are independent of the Java process applications deployed to the engine. (optional, default to true)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Map<String, VariableValueDto>
      Throws:
      ApiException - if fails to make API call
    • modifyTaskVariables

      public void modifyTaskVariables(String id, PatchVariablesDto patchVariablesDto) throws ApiException
      Update/Delete Task Variables Updates or deletes the variables visible from the task. Updates precede deletions. So, if a variable is updated AND deleted, the deletion overrides the update. A variable is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to set variables for. (required)
      patchVariablesDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • modifyTaskVariables

      public void modifyTaskVariables(String id, PatchVariablesDto patchVariablesDto, Map<String,String> additionalHeaders) throws ApiException
      Update/Delete Task Variables Updates or deletes the variables visible from the task. Updates precede deletions. So, if a variable is updated AND deleted, the deletion overrides the update. A variable is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to set variables for. (required)
      patchVariablesDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • putTaskVariable

      public void putTaskVariable(String id, String varName, VariableValueDto variableValueDto) throws ApiException
      Update Task Variable Updates a process variable that is visible from the Task scope. A variable is visible from the task if it is a local task variable, or declared in a parent scope of the task. See the documentation on [variable scopes and visibility](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables#variable-scopes-and-variable-visibility). **Note**: If a variable doesn't exist, the variable is created in the top-most scope visible from the task.
      Parameters:
      id - The id of the task to set the variable for. (required)
      varName - The name of the variable to set. (required)
      variableValueDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • putTaskVariable

      public void putTaskVariable(String id, String varName, VariableValueDto variableValueDto, Map<String,String> additionalHeaders) throws ApiException
      Update Task Variable Updates a process variable that is visible from the Task scope. A variable is visible from the task if it is a local task variable, or declared in a parent scope of the task. See the documentation on [variable scopes and visibility](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables#variable-scopes-and-variable-visibility). **Note**: If a variable doesn't exist, the variable is created in the top-most scope visible from the task.
      Parameters:
      id - The id of the task to set the variable for. (required)
      varName - The name of the variable to set. (required)
      variableValueDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • setBinaryTaskVariable

      public void setBinaryTaskVariable(String id, String varName, File data, String valueType) throws ApiException
      Update Task Variable (Binary) Sets the serialized value for a binary variable or the binary value for a file variable visible from the task. A variable is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to retrieve the variable for. (required)
      varName - The name of the variable to retrieve. (required)
      data - The binary data to be set. For File variables, this multipart can contain the filename, binary value and MIME type of the file variable to be set Only the filename is mandatory. (optional)
      valueType - The name of the variable type. Either Bytes for a byte array variable or File for a file variable. (optional)
      Throws:
      ApiException - if fails to make API call
    • setBinaryTaskVariable

      public void setBinaryTaskVariable(String id, String varName, File data, String valueType, Map<String,String> additionalHeaders) throws ApiException
      Update Task Variable (Binary) Sets the serialized value for a binary variable or the binary value for a file variable visible from the task. A variable is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.21/user-guide/process-engine/variables/).
      Parameters:
      id - The id of the task to retrieve the variable for. (required)
      varName - The name of the variable to retrieve. (required)
      data - The binary data to be set. For File variables, this multipart can contain the filename, binary value and MIME type of the file variable to be set Only the filename is mandatory. (optional)
      valueType - The name of the variable type. Either Bytes for a byte array variable or File for a file variable. (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call