Package org.camunda.bpm.client.task.impl
Class ExternalTaskImpl
- java.lang.Object
-
- org.camunda.bpm.client.task.impl.ExternalTaskImpl
-
- All Implemented Interfaces:
ExternalTask
public class ExternalTaskImpl extends Object implements ExternalTask
- Author:
- Tassilo Weidner
-
-
Field Summary
Fields Modifier and Type Field Description protected StringactivityIdprotected StringactivityInstanceIdprotected StringbusinessKeyprotected StringerrorDetailsprotected StringerrorMessageprotected StringexecutionIdprotected Map<String,String>extensionPropertiesprotected Stringidprotected DatelockExpirationTimeprotected longpriorityprotected StringprocessDefinitionIdprotected StringprocessDefinitionKeyprotected StringprocessDefinitionVersionTagprotected StringprocessInstanceIdprotected Map<String,VariableValue>receivedVariableMapprotected Integerretriesprotected StringtenantIdprotected StringtopicNameprotected Map<String,TypedValueField>variablesprotected StringworkerId
-
Constructor Summary
Constructors Constructor Description ExternalTaskImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetActivityId()StringgetActivityInstanceId()Map<String,Object>getAllVariables()Returns untyped variables that exist in the task's ancestor execution hierarchyorg.camunda.bpm.engine.variable.VariableMapgetAllVariablesTyped()Returns typed variables that exist in the task's ancestor execution hierarchyorg.camunda.bpm.engine.variable.VariableMapgetAllVariablesTyped(boolean deserializeObjectValues)Returns typed variables that exist in the task's ancestor execution hierarchyStringgetBusinessKey()Returns the business key of the process instance the external task is associated withStringgetErrorDetails()StringgetErrorMessage()StringgetExecutionId()Map<String,String>getExtensionProperties()Returns all available extension properties.StringgetExtensionProperty(String propertyKey)Returns the value of the extension property for a given key ornullif the property was not available.StringgetId()DategetLockExpirationTime()longgetPriority()StringgetProcessDefinitionId()StringgetProcessDefinitionKey()StringgetProcessDefinitionVersionTag()StringgetProcessInstanceId()IntegergetRetries()StringgetTenantId()StringgetTopicName()<T> TgetVariable(String variableName)Returns an untyped variable of the task's ancestor execution hierarchyMap<String,TypedValueField>getVariables()<T extends org.camunda.bpm.engine.variable.value.TypedValue>
TgetVariableTyped(String variableName)Returns a typed variable of the task's ancestor execution hierarchy<T extends org.camunda.bpm.engine.variable.value.TypedValue>
TgetVariableTyped(String variableName, boolean deserializeObjectValues)Returns a typed variable of the task's ancestor execution hierarchyStringgetWorkerId()voidsetActivityId(String activityId)voidsetActivityInstanceId(String activityInstanceId)voidsetBusinessKey(String businessKey)voidsetErrorDetails(String errorDetails)voidsetErrorMessage(String errorMessage)voidsetExecutionId(String executionId)voidsetExtensionProperties(Map<String,String> extensionProperties)voidsetId(String id)voidsetLockExpirationTime(Date lockExpirationTime)voidsetPriority(long priority)voidsetProcessDefinitionId(String processDefinitionId)voidsetProcessDefinitionKey(String processDefinitionKey)voidsetProcessDefinitionVersionTag(String processDefinitionVersionTag)voidsetProcessInstanceId(String processInstanceId)voidsetReceivedVariableMap(Map<String,VariableValue> receivedVariableMap)voidsetRetries(Integer retries)voidsetTenantId(String tenantId)voidsetTopicName(String topicName)voidsetVariables(Map<String,TypedValueField> variables)voidsetWorkerId(String workerId)StringtoString()
-
-
-
Field Detail
-
activityId
protected String activityId
-
activityInstanceId
protected String activityInstanceId
-
errorMessage
protected String errorMessage
-
errorDetails
protected String errorDetails
-
executionId
protected String executionId
-
id
protected String id
-
lockExpirationTime
protected Date lockExpirationTime
-
processDefinitionId
protected String processDefinitionId
-
processDefinitionKey
protected String processDefinitionKey
-
processDefinitionVersionTag
protected String processDefinitionVersionTag
-
processInstanceId
protected String processInstanceId
-
retries
protected Integer retries
-
workerId
protected String workerId
-
topicName
protected String topicName
-
tenantId
protected String tenantId
-
priority
protected long priority
-
variables
protected Map<String,TypedValueField> variables
-
businessKey
protected String businessKey
-
receivedVariableMap
protected Map<String,VariableValue> receivedVariableMap
-
-
Method Detail
-
setActivityId
public void setActivityId(String activityId)
-
setActivityInstanceId
public void setActivityInstanceId(String activityInstanceId)
-
setErrorMessage
public void setErrorMessage(String errorMessage)
-
setErrorDetails
public void setErrorDetails(String errorDetails)
-
setExecutionId
public void setExecutionId(String executionId)
-
setId
public void setId(String id)
-
setLockExpirationTime
public void setLockExpirationTime(Date lockExpirationTime)
-
setProcessDefinitionId
public void setProcessDefinitionId(String processDefinitionId)
-
setProcessDefinitionKey
public void setProcessDefinitionKey(String processDefinitionKey)
-
setProcessDefinitionVersionTag
public void setProcessDefinitionVersionTag(String processDefinitionVersionTag)
-
setProcessInstanceId
public void setProcessInstanceId(String processInstanceId)
-
setRetries
public void setRetries(Integer retries)
-
setWorkerId
public void setWorkerId(String workerId)
-
setTopicName
public void setTopicName(String topicName)
-
setTenantId
public void setTenantId(String tenantId)
-
setPriority
public void setPriority(long priority)
-
setVariables
public void setVariables(Map<String,TypedValueField> variables)
-
setBusinessKey
public void setBusinessKey(String businessKey)
-
getVariables
public Map<String,TypedValueField> getVariables()
-
setReceivedVariableMap
public void setReceivedVariableMap(Map<String,VariableValue> receivedVariableMap)
-
getActivityId
public String getActivityId()
- Specified by:
getActivityIdin interfaceExternalTask- Returns:
- the id of the activity that this external task belongs to
-
getActivityInstanceId
public String getActivityInstanceId()
- Specified by:
getActivityInstanceIdin interfaceExternalTask- Returns:
- the id of the activity instance that the external task belongs to
-
getErrorMessage
public String getErrorMessage()
- Specified by:
getErrorMessagein interfaceExternalTask- Returns:
- the error message that was supplied when the last failure of this task was reported
-
getErrorDetails
public String getErrorDetails()
- Specified by:
getErrorDetailsin interfaceExternalTask- Returns:
- the error details submitted with the latest reported failure executing this task
-
getExecutionId
public String getExecutionId()
- Specified by:
getExecutionIdin interfaceExternalTask- Returns:
- the id of the execution that the external task belongs to
-
getId
public String getId()
- Specified by:
getIdin interfaceExternalTask- Returns:
- the id of the external task
-
getLockExpirationTime
public Date getLockExpirationTime()
- Specified by:
getLockExpirationTimein interfaceExternalTask- Returns:
- the date that the task's most recent lock expires or has expired
-
getProcessDefinitionId
public String getProcessDefinitionId()
- Specified by:
getProcessDefinitionIdin interfaceExternalTask- Returns:
- the id of the process definition the external task is defined in
-
getProcessDefinitionKey
public String getProcessDefinitionKey()
- Specified by:
getProcessDefinitionKeyin interfaceExternalTask- Returns:
- the key of the process definition the external task is defined in
-
getProcessDefinitionVersionTag
public String getProcessDefinitionVersionTag()
- Specified by:
getProcessDefinitionVersionTagin interfaceExternalTask- Returns:
- the version tag of the process definition the tasks activity belongs to
-
getProcessInstanceId
public String getProcessInstanceId()
- Specified by:
getProcessInstanceIdin interfaceExternalTask- Returns:
- the id of the process instance the external task belongs to
-
getRetries
public Integer getRetries()
- Specified by:
getRetriesin interfaceExternalTask- Returns:
- the number of retries the task currently has left
-
getWorkerId
public String getWorkerId()
- Specified by:
getWorkerIdin interfaceExternalTask- Returns:
- the id of the worker that possesses or possessed the most recent lock
-
getTopicName
public String getTopicName()
- Specified by:
getTopicNamein interfaceExternalTask- Returns:
- the topic name of the external task
-
getTenantId
public String getTenantId()
- Specified by:
getTenantIdin interfaceExternalTask- Returns:
- the id of the tenant the external task belongs to
-
getPriority
public long getPriority()
- Specified by:
getPriorityin interfaceExternalTask- Returns:
- the priority of the external task
-
getBusinessKey
public String getBusinessKey()
Description copied from interface:ExternalTaskReturns the business key of the process instance the external task is associated with- Specified by:
getBusinessKeyin interfaceExternalTask- Returns:
- the business key
-
getAllVariables
public Map<String,Object> getAllVariables()
Description copied from interface:ExternalTaskReturns untyped variables that exist in the task's ancestor execution hierarchy- Specified by:
getAllVariablesin interfaceExternalTask- Returns:
- a map of untyped variables that contains an entry for each variable
-
getVariable
public <T> T getVariable(String variableName)
Description copied from interface:ExternalTaskReturns an untyped variable of the task's ancestor execution hierarchy- Specified by:
getVariablein interfaceExternalTask- Type Parameters:
T- the type of the variable- Parameters:
variableName- of the variable to be returned- Returns:
- an untyped variable if such a named variable exists
- null if such a named variable not exists
-
getAllVariablesTyped
public org.camunda.bpm.engine.variable.VariableMap getAllVariablesTyped()
Description copied from interface:ExternalTaskReturns typed variables that exist in the task's ancestor execution hierarchy- Specified by:
getAllVariablesTypedin interfaceExternalTask- Returns:
- a map of typed variables that contains an entry for each variable
-
getAllVariablesTyped
public org.camunda.bpm.engine.variable.VariableMap getAllVariablesTyped(boolean deserializeObjectValues)
Description copied from interface:ExternalTaskReturns typed variables that exist in the task's ancestor execution hierarchy- Specified by:
getAllVariablesTypedin interfaceExternalTask- Parameters:
deserializeObjectValues--
falseto retrieve the object without deserialization -
trueto retrieve the deserialized object
-
- Returns:
- a map of typed variables that contains an entry for each variable
-
getVariableTyped
public <T extends org.camunda.bpm.engine.variable.value.TypedValue> T getVariableTyped(String variableName)
Description copied from interface:ExternalTaskReturns a typed variable of the task's ancestor execution hierarchy- Specified by:
getVariableTypedin interfaceExternalTask- Type Parameters:
T- the type of the variable- Parameters:
variableName- of the variable to be returned- Returns:
- a typed variable if such a named variable exists
- null if such a named variable not exists
-
getVariableTyped
public <T extends org.camunda.bpm.engine.variable.value.TypedValue> T getVariableTyped(String variableName, boolean deserializeObjectValues)
Description copied from interface:ExternalTaskReturns a typed variable of the task's ancestor execution hierarchy- Specified by:
getVariableTypedin interfaceExternalTask- Type Parameters:
T- the type of the variable- Parameters:
variableName- of the variable to be returneddeserializeObjectValues--
falseto retrieve the object without deserialization -
trueto retrieve the deserialized object
-
- Returns:
- a typed variable if such a named variable exists
- null if such a named variable not exists
-
getExtensionProperties
public Map<String,String> getExtensionProperties()
Description copied from interface:ExternalTaskReturns all available extension properties. Extension properties must be defined at the external task activity inside the BPMN model and explicitly fetched (e.g. by callingTopicSubscriptionBuilder.includeExtensionProperties(boolean)) to be available. If no extension properties are available the returned map will be empty.- Specified by:
getExtensionPropertiesin interfaceExternalTask- Returns:
- a map of available extension properties, never
null
-
getExtensionProperty
public String getExtensionProperty(String propertyKey)
Description copied from interface:ExternalTaskReturns the value of the extension property for a given key ornullif the property was not available.- Specified by:
getExtensionPropertyin interfaceExternalTask- Returns:
- the extension property, or
nullif not available - See Also:
ExternalTask.getExtensionProperties()
-
-