Package org.camunda.bpm.client.topic
Interface TopicSubscriptionBuilder
-
- All Known Implementing Classes:
TopicSubscriptionBuilderImpl
public interface TopicSubscriptionBuilder
A fluent builder to configure the topic subscription
- Author:
- Tassilo Weidner
-
-
Method Summary
-
-
-
Method Detail
-
lockDuration
TopicSubscriptionBuilder lockDuration(long lockDuration)
- Parameters:
lockDuration
-- in milliseconds to lock the external tasks
- must be greater than zero
- the default lock duration is 20 seconds (20,000 milliseconds)
- overrides the lock duration configured on bootstrapping the client
- Returns:
- the builder
-
handler
TopicSubscriptionBuilder handler(ExternalTaskHandler handler)
- Parameters:
handler
- which will be executed for the external task- Returns:
- the builder
-
variables
TopicSubscriptionBuilder variables(String... variableNames)
- Parameters:
variableNames
- of variables which are supposed to be retrieved- Returns:
- the builder
-
localVariables
TopicSubscriptionBuilder localVariables(boolean localVariables)
- Parameters:
localVariables
- whether or not variables from greater scope than the external task should be fetched.false
means all variables visible in the scope of the external task will be fetched,true
means only local variables (to the scope of the external task) will be fetched- Returns:
- the builder
-
businessKey
TopicSubscriptionBuilder businessKey(String businessKey)
- Parameters:
businessKey
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionId
TopicSubscriptionBuilder processDefinitionId(String processDefinitionId)
- Parameters:
processDefinitionId
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionIdIn
TopicSubscriptionBuilder processDefinitionIdIn(String... processDefinitionIds)
- Parameters:
processDefinitionIds
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionKey
TopicSubscriptionBuilder processDefinitionKey(String processDefinitionKey)
- Parameters:
processDefinitionKey
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionKeyIn
TopicSubscriptionBuilder processDefinitionKeyIn(String... processDefinitionKeys)
- Parameters:
processDefinitionKeys
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionVersionTag
TopicSubscriptionBuilder processDefinitionVersionTag(String processDefinitionVersionTag)
- Parameters:
processDefinitionKeys
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processVariablesEqualsIn
TopicSubscriptionBuilder processVariablesEqualsIn(Map<String,Object> processVariables)
- Parameters:
processVariables
- of which the external tasks to be retrieved are related to- Returns:
- the builder
-
processVariableEquals
TopicSubscriptionBuilder processVariableEquals(String name, Object value)
- Parameters:
processVariables
- of which the external tasks to be retrieved are related to When called more than once, retrieves tasks related to ANY of the given processVariables In such cases, consider usingprocessVariablesEqualsIn(Map
instead) - Returns:
- the builder
-
withoutTenantId
TopicSubscriptionBuilder withoutTenantId()
Filter for external tasks without tenant- Returns:
- the builder
-
tenantIdIn
TopicSubscriptionBuilder tenantIdIn(String... tenantIds)
- Parameters:
tenantIds
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
includeExtensionProperties
TopicSubscriptionBuilder includeExtensionProperties(boolean includeExtensionProperties)
- Parameters:
includeExtensionProperties
- whether or not to include custom extension properties for fetched external tasks.true
means all extensionProperties defined in the external task activity will be provided.false
means custom extension properties are not available within the external-task-client. The default isfalse
.- Returns:
- the builder
-
open
TopicSubscription open()
Release the topic subscription for being executed asynchronously- Returns:
- the builder
- Throws:
ExternalTaskClientException
-- if topic name is null or an empty string
- if lock duration is not greater than zero
- if external task handler is null
- if topic name has already been subscribed
-
-