Package io.zeebe.client.impl.response
Class ActivatedJobImpl
- java.lang.Object
-
- io.zeebe.client.impl.response.ActivatedJobImpl
-
- All Implemented Interfaces:
ActivatedJob
public final class ActivatedJobImpl extends Object implements ActivatedJob
-
-
Constructor Summary
Constructors Constructor Description ActivatedJobImpl(ZeebeObjectMapper objectMapper, GatewayOuterClass.ActivatedJob job)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBpmnProcessId()
Map<String,String>
getCustomHeaders()
long
getDeadline()
String
getElementId()
long
getElementInstanceKey()
long
getKey()
int
getRetries()
String
getType()
String
getVariables()
Map<String,Object>
getVariablesAsMap()
<T> T
getVariablesAsType(Class<T> variableType)
String
getWorker()
int
getWorkflowDefinitionVersion()
long
getWorkflowInstanceKey()
long
getWorkflowKey()
String
toJson()
String
toString()
-
-
-
Constructor Detail
-
ActivatedJobImpl
public ActivatedJobImpl(ZeebeObjectMapper objectMapper, GatewayOuterClass.ActivatedJob job)
-
-
Method Detail
-
getKey
public long getKey()
- Specified by:
getKey
in interfaceActivatedJob
- Returns:
- the unique key of the job
-
getType
public String getType()
- Specified by:
getType
in interfaceActivatedJob
- Returns:
- the type of the job
-
getWorkflowInstanceKey
public long getWorkflowInstanceKey()
- Specified by:
getWorkflowInstanceKey
in interfaceActivatedJob
- Returns:
- key of the workflow instance
-
getBpmnProcessId
public String getBpmnProcessId()
- Specified by:
getBpmnProcessId
in interfaceActivatedJob
- Returns:
- BPMN process id of the workflow
-
getWorkflowDefinitionVersion
public int getWorkflowDefinitionVersion()
- Specified by:
getWorkflowDefinitionVersion
in interfaceActivatedJob
- Returns:
- version of the workflow
-
getWorkflowKey
public long getWorkflowKey()
- Specified by:
getWorkflowKey
in interfaceActivatedJob
- Returns:
- key of the workflow
-
getElementId
public String getElementId()
- Specified by:
getElementId
in interfaceActivatedJob
- Returns:
- id of the workflow element
-
getElementInstanceKey
public long getElementInstanceKey()
- Specified by:
getElementInstanceKey
in interfaceActivatedJob
- Returns:
- key of the element instance
-
getCustomHeaders
public Map<String,String> getCustomHeaders()
- Specified by:
getCustomHeaders
in interfaceActivatedJob
- Returns:
- user-defined headers associated with this job
-
getWorker
public String 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
public String getVariables()
- Specified by:
getVariables
in interfaceActivatedJob
- Returns:
- JSON-formatted variables
-
getVariablesAsMap
public Map<String,Object> getVariablesAsMap()
- Specified by:
getVariablesAsMap
in interfaceActivatedJob
- Returns:
- de-serialized variables as map
-
getVariablesAsType
public <T> T getVariablesAsType(Class<T> variableType)
- Specified by:
getVariablesAsType
in interfaceActivatedJob
- Returns:
- de-serialized variables as the given type
-
toJson
public String toJson()
- Specified by:
toJson
in interfaceActivatedJob
- Returns:
- the record encoded as JSON
-
-