Package org.camunda.bpm.client.task
Interface ExternalTask
-
- All Known Implementing Classes:
ExternalTaskImpl
public interface ExternalTaskRepresents an external task
- Author:
- Tassilo Weidner
-
-
Method Summary
All Methods Instance Methods Abstract 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 hierarchy<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 deserializeObjectValue)Returns a typed variable of the task's ancestor execution hierarchyStringgetWorkerId()
-
-
-
Method Detail
-
getActivityId
String getActivityId()
- Returns:
- the id of the activity that this external task belongs to
-
getActivityInstanceId
String getActivityInstanceId()
- Returns:
- the id of the activity instance that the external task belongs to
-
getErrorMessage
String getErrorMessage()
- Returns:
- the error message that was supplied when the last failure of this task was reported
-
getErrorDetails
String getErrorDetails()
- Returns:
- the error details submitted with the latest reported failure executing this task
-
getExecutionId
String getExecutionId()
- Returns:
- the id of the execution that the external task belongs to
-
getId
String getId()
- Returns:
- the id of the external task
-
getLockExpirationTime
Date getLockExpirationTime()
- Returns:
- the date that the task's most recent lock expires or has expired
-
getProcessDefinitionId
String getProcessDefinitionId()
- Returns:
- the id of the process definition the external task is defined in
-
getProcessDefinitionKey
String getProcessDefinitionKey()
- Returns:
- the key of the process definition the external task is defined in
-
getProcessDefinitionVersionTag
String getProcessDefinitionVersionTag()
- Returns:
- the version tag of the process definition the tasks activity belongs to
-
getProcessInstanceId
String getProcessInstanceId()
- Returns:
- the id of the process instance the external task belongs to
-
getRetries
Integer getRetries()
- Returns:
- the number of retries the task currently has left
-
getWorkerId
String getWorkerId()
- Returns:
- the id of the worker that possesses or possessed the most recent lock
-
getTopicName
String getTopicName()
- Returns:
- the topic name of the external task
-
getTenantId
String getTenantId()
- Returns:
- the id of the tenant the external task belongs to
-
getPriority
long getPriority()
- Returns:
- the priority of the external task
-
getVariable
<T> T getVariable(String variableName)
Returns an untyped variable of the task's ancestor execution hierarchy- 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
- Throws:
ValueMapperException- if an object cannot be deserialized
-
getVariableTyped
<T extends org.camunda.bpm.engine.variable.value.TypedValue> T getVariableTyped(String variableName)
Returns a typed variable of the task's ancestor execution hierarchy- 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
- Throws:
ValueMapperException- if an object cannot be deserialized
-
getVariableTyped
<T extends org.camunda.bpm.engine.variable.value.TypedValue> T getVariableTyped(String variableName, boolean deserializeObjectValue)
Returns a typed variable of the task's ancestor execution hierarchy- Type Parameters:
T- the type of the variable- Parameters:
variableName- of the variable to be returneddeserializeObjectValue--
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
- Throws:
ValueMapperException- if an object cannot be deserialized
-
getAllVariables
Map<String,Object> getAllVariables()
Returns untyped variables that exist in the task's ancestor execution hierarchy- Returns:
- a map of untyped variables that contains an entry for each variable
- Throws:
ValueMapperException- if an object cannot be deserialized
-
getAllVariablesTyped
org.camunda.bpm.engine.variable.VariableMap getAllVariablesTyped()
Returns typed variables that exist in the task's ancestor execution hierarchy- Returns:
- a map of typed variables that contains an entry for each variable
- Throws:
ValueMapperException- if an object cannot be deserialized
-
getAllVariablesTyped
org.camunda.bpm.engine.variable.VariableMap getAllVariablesTyped(boolean deserializeObjectValues)
Returns typed variables that exist in the task's ancestor execution hierarchy- 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
- Throws:
ValueMapperException- if an object cannot be deserialized
-
getBusinessKey
String getBusinessKey()
Returns the business key of the process instance the external task is associated with- Returns:
- the business key
-
getExtensionProperty
String getExtensionProperty(String propertyKey)
Returns the value of the extension property for a given key ornullif the property was not available.- Returns:
- the extension property, or
nullif not available - See Also:
getExtensionProperties()
-
getExtensionProperties
Map<String,String> getExtensionProperties()
Returns 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.- Returns:
- a map of available extension properties, never
null
-
-