Class ActivatedJobImpl
java.lang.Object
io.camunda.zeebe.client.impl.response.ActivatedJobImpl
- All Implemented Interfaces:
ActivatedJob
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
long
long
getKey()
long
int
long
int
getType()
getVariable
(String name) <T> T
getVariablesAsType
(Class<T> variableType) toJson()
toString()
-
Constructor Details
-
ActivatedJobImpl
-
-
Method Details
-
getKey
public long getKey()- Specified by:
getKey
in interfaceActivatedJob
- Returns:
- the unique key of the job
-
getType
- Specified by:
getType
in interfaceActivatedJob
- Returns:
- the type of the job
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKey
in interfaceActivatedJob
- Returns:
- key of the process instance
-
getBpmnProcessId
- Specified by:
getBpmnProcessId
in interfaceActivatedJob
- Returns:
- BPMN process id of the process
-
getProcessDefinitionVersion
public int getProcessDefinitionVersion()- Specified by:
getProcessDefinitionVersion
in interfaceActivatedJob
- Returns:
- version of the process
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKey
in interfaceActivatedJob
- Returns:
- key of the process
-
getElementId
- Specified by:
getElementId
in interfaceActivatedJob
- Returns:
- id of the process element
-
getElementInstanceKey
public long getElementInstanceKey()- Specified by:
getElementInstanceKey
in interfaceActivatedJob
- Returns:
- key of the element instance
-
getCustomHeaders
- Specified by:
getCustomHeaders
in interfaceActivatedJob
- Returns:
- user-defined headers associated with this job
-
getWorker
- Specified by:
getWorker
in interfaceActivatedJob
- Returns:
- the assigned worker to complete the job
-
getRetries
public int getRetries()- Specified by:
getRetries
in interfaceActivatedJob
- Returns:
- remaining retries
-
getDeadline
public long getDeadline()- Specified by:
getDeadline
in 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:
getVariables
in interfaceActivatedJob
- Returns:
- JSON-formatted variables
-
getVariablesAsMap
- Specified by:
getVariablesAsMap
in interfaceActivatedJob
- Returns:
- de-serialized variables as map
-
getVariablesAsType
- Specified by:
getVariablesAsType
in interfaceActivatedJob
- Returns:
- de-serialized variables as the given type
-
getVariable
- Specified by:
getVariable
in 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:
toJson
in interfaceActivatedJob
- Returns:
- the record encoded as JSON
-
getTenantId
- Specified by:
getTenantId
in interfaceActivatedJob
- Returns:
- the identifier of the tenant that owns the job
-
toString
-