Package io.camunda.client.impl.response
Class ActivatedJobImpl
java.lang.Object
io.camunda.client.impl.response.ActivatedJobImpl
- All Implemented Interfaces:
ActivatedJob
-
Constructor Summary
ConstructorsConstructorDescriptionActivatedJobImpl(JsonMapper jsonMapper, ActivatedJobResult job) ActivatedJobImpl(JsonMapper jsonMapper, GatewayOuterClass.ActivatedJob job) -
Method Summary
Modifier and TypeMethodDescriptionlonglonglonggetKey()longintlongintgetType()getVariable(String name) <T> TgetVariablesAsType(Class<T> variableType) toJson()toString()
-
Constructor Details
-
ActivatedJobImpl
-
ActivatedJobImpl
-
-
Method Details
-
getKey
public long getKey()- Specified by:
getKeyin interfaceActivatedJob- Returns:
- the unique key of the job
-
getType
- Specified by:
getTypein interfaceActivatedJob- Returns:
- the type of the job
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceActivatedJob- Returns:
- key of the process instance
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceActivatedJob- Returns:
- BPMN process id of the process
-
getProcessDefinitionVersion
public int getProcessDefinitionVersion()- Specified by:
getProcessDefinitionVersionin interfaceActivatedJob- Returns:
- version of the process
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceActivatedJob- Returns:
- key of the process
-
getElementId
- Specified by:
getElementIdin interfaceActivatedJob- Returns:
- id of the process element
-
getElementInstanceKey
public long getElementInstanceKey()- Specified by:
getElementInstanceKeyin interfaceActivatedJob- Returns:
- key of the element instance
-
getCustomHeaders
- Specified by:
getCustomHeadersin interfaceActivatedJob- Returns:
- user-defined headers associated with this job
-
getWorker
- Specified by:
getWorkerin interfaceActivatedJob- Returns:
- the assigned worker to complete the job
-
getRetries
public int getRetries()- Specified by:
getRetriesin interfaceActivatedJob- Returns:
- remaining retries
-
getDeadline
public long getDeadline()- Specified by:
getDeadlinein interfaceActivatedJob- 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
- Specified by:
getVariablesin interfaceActivatedJob- Returns:
- JSON-formatted variables
-
getVariablesAsMap
- Specified by:
getVariablesAsMapin interfaceActivatedJob- Returns:
- de-serialized variables as map
-
getVariablesAsType
- Specified by:
getVariablesAsTypein interfaceActivatedJob- Returns:
- de-serialized variables as the given type
-
getVariable
- Specified by:
getVariablein interfaceActivatedJob- Returns:
- de-serialized variable value or null if the provided variable name is present among the
available variables, otherwise throw a
ClientException
-
toJson
- Specified by:
toJsonin interfaceActivatedJob- Returns:
- the record encoded as JSON
-
getTenantId
- Specified by:
getTenantIdin interfaceActivatedJob- Returns:
- the identifier of the tenant that owns the job
-
toString
-