Class ActivatedJobImpl

java.lang.Object
io.camunda.client.impl.response.ActivatedJobImpl
All Implemented Interfaces:
ActivatedJob

public final class ActivatedJobImpl extends Object implements ActivatedJob
  • Constructor Details

  • Method Details

    • getKey

      public long getKey()
      Specified by:
      getKey in interface ActivatedJob
      Returns:
      the unique key of the job
    • getType

      public String getType()
      Specified by:
      getType in interface ActivatedJob
      Returns:
      the type of the job
    • getProcessInstanceKey

      public long getProcessInstanceKey()
      Specified by:
      getProcessInstanceKey in interface ActivatedJob
      Returns:
      key of the process instance
    • getBpmnProcessId

      public String getBpmnProcessId()
      Specified by:
      getBpmnProcessId in interface ActivatedJob
      Returns:
      BPMN process id of the process
    • getProcessDefinitionVersion

      public int getProcessDefinitionVersion()
      Specified by:
      getProcessDefinitionVersion in interface ActivatedJob
      Returns:
      version of the process
    • getProcessDefinitionKey

      public long getProcessDefinitionKey()
      Specified by:
      getProcessDefinitionKey in interface ActivatedJob
      Returns:
      key of the process
    • getElementId

      public String getElementId()
      Specified by:
      getElementId in interface ActivatedJob
      Returns:
      id of the process element
    • getElementInstanceKey

      public long getElementInstanceKey()
      Specified by:
      getElementInstanceKey in interface ActivatedJob
      Returns:
      key of the element instance
    • getCustomHeaders

      public Map<String,String> getCustomHeaders()
      Specified by:
      getCustomHeaders in interface ActivatedJob
      Returns:
      user-defined headers associated with this job
    • getWorker

      public String getWorker()
      Specified by:
      getWorker in interface ActivatedJob
      Returns:
      the assigned worker to complete the job
    • getRetries

      public int getRetries()
      Specified by:
      getRetries in interface ActivatedJob
      Returns:
      remaining retries
    • getDeadline

      public long getDeadline()
      Specified by:
      getDeadline in interface ActivatedJob
      Returns:
      the unix timestamp until when the job is exclusively assigned to this worker (time unit * is milliseconds since unix epoch). If the deadline is exceeded, it can happen that the job is handed to another worker and the work is performed twice.
    • getVariables

      public String getVariables()
      Specified by:
      getVariables in interface ActivatedJob
      Returns:
      JSON-formatted variables
    • getVariablesAsMap

      public Map<String,Object> getVariablesAsMap()
      Specified by:
      getVariablesAsMap in interface ActivatedJob
      Returns:
      de-serialized variables as map
    • getVariablesAsType

      public <T> T getVariablesAsType(Class<T> variableType)
      Specified by:
      getVariablesAsType in interface ActivatedJob
      Returns:
      de-serialized variables as the given type
    • getVariable

      public Object getVariable(String name)
      Specified by:
      getVariable in interface ActivatedJob
      Returns:
      de-serialized variable value or null if the provided variable name is present among the available variables
    • getUserTask

      public UserTaskProperties getUserTask()
      Specified by:
      getUserTask in interface ActivatedJob
      Returns:
      user task properties associated with this job. Present only if the job is of kind TASK_LISTENER; returns null for other job kinds such as BPMN_ELEMENT or EXECUTION_LISTENER.
    • getKind

      public JobKind getKind()
      Specified by:
      getKind in interface ActivatedJob
      Returns:
      the kind of the job.
    • getListenerEventType

      public ListenerEventType getListenerEventType()
      Specified by:
      getListenerEventType in interface ActivatedJob
      Returns:
      the listener event type of the job.
    • toJson

      public String toJson()
      Specified by:
      toJson in interface ActivatedJob
      Returns:
      the record encoded as JSON
    • getTenantId

      public String getTenantId()
      Specified by:
      getTenantId in interface ActivatedJob
      Returns:
      the identifier of the tenant that owns the job
    • getDocumentReferences

      public List<DocumentReferenceResponse> getDocumentReferences(String name)
      Specified by:
      getDocumentReferences in interface ActivatedJob
      Returns:
      de-serialized document references if the provided variable name is present among the available variables and can be parsed as document reference
    • getTags

      public Set<String> getTags()
      Specified by:
      getTags in interface ActivatedJob
      Returns:
      the tags associated with the job inherited from the process instance on job creation.
    • toString

      public String toString()
      Overrides:
      toString in class Object