Package org.camunda.bpm.client.impl
Class EngineClient
- java.lang.Object
-
- org.camunda.bpm.client.impl.EngineClient
-
public class EngineClient extends java.lang.Object
- Author:
- Tassilo Weidner
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Long
asyncResponseTimeout
protected java.lang.String
baseUrl
static java.lang.String
BPMN_ERROR_RESOURCE_PATH
static java.lang.String
COMPLETE_RESOURCE_PATH
protected RequestExecutor
engineInteraction
static java.lang.String
EXECUTION_ID_RESOURCE_PATH
static java.lang.String
EXECUTION_RESOURCE_PATH
static java.lang.String
EXTEND_LOCK_RESOURCE_PATH
protected static java.lang.String
EXTERNAL_TASK__PROCESS_RESOURCE_PATH
protected static java.lang.String
EXTERNAL_TASK_RESOURCE_PATH
static java.lang.String
FAILURE_RESOURCE_PATH
protected static java.lang.String
FETCH_AND_LOCK_RESOURCE_PATH
static java.lang.String
GET_LOCAL_BINARY_VARIABLE
static java.lang.String
GET_LOCAL_VARIABLE
static java.lang.String
ID_PATH_PARAM
protected static java.lang.String
ID_RESOURCE_PATH
static java.lang.String
LOCK_RESOURCE_PATH
protected int
maxTasks
static java.lang.String
NAME_PATH_PARAM
static java.lang.String
SET_VARIABLES_RESOURCE_PATH
protected TypedValues
typedValues
static java.lang.String
UNLOCK_RESOURCE_PATH
protected boolean
usePriority
protected java.lang.String
workerId
-
Constructor Summary
Constructors Constructor Description EngineClient(java.lang.String workerId, int maxTasks, java.lang.Long asyncResponseTimeout, java.lang.String baseUrl, RequestExecutor engineInteraction)
EngineClient(java.lang.String workerId, int maxTasks, java.lang.Long asyncResponseTimeout, java.lang.String baseUrl, RequestExecutor engineInteraction, boolean usePriority)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bpmnError(java.lang.String taskId, java.lang.String errorCode, java.lang.String errorMessage, java.util.Map<java.lang.String,java.lang.Object> variables)
void
complete(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.Map<java.lang.String,java.lang.Object> localVariables)
void
extendLock(java.lang.String taskId, long newDuration)
void
failure(java.lang.String taskId, java.lang.String errorMessage, java.lang.String errorDetails, int retries, long retryTimeout, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.Map<java.lang.String,java.lang.Object> localVariables)
java.util.List<ExternalTask>
fetchAndLock(java.util.List<TopicRequestDto> topics)
java.lang.String
getBaseUrl()
byte[]
getLocalBinaryVariable(java.lang.String variableName, java.lang.String processInstanceId)
java.lang.String
getWorkerId()
boolean
isUsePriority()
void
lock(java.lang.String taskId, long lockDuration)
void
setTypedValues(TypedValues typedValues)
void
setVariables(java.lang.String proccessId, java.util.Map<java.lang.String,java.lang.Object> variables)
void
unlock(java.lang.String taskId)
-
-
-
Field Detail
-
EXTERNAL_TASK_RESOURCE_PATH
protected static final java.lang.String EXTERNAL_TASK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
EXTERNAL_TASK__PROCESS_RESOURCE_PATH
protected static final java.lang.String EXTERNAL_TASK__PROCESS_RESOURCE_PATH
- See Also:
- Constant Field Values
-
FETCH_AND_LOCK_RESOURCE_PATH
protected static final java.lang.String FETCH_AND_LOCK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
ID_PATH_PARAM
public static final java.lang.String ID_PATH_PARAM
- See Also:
- Constant Field Values
-
ID_RESOURCE_PATH
protected static final java.lang.String ID_RESOURCE_PATH
- See Also:
- Constant Field Values
-
LOCK_RESOURCE_PATH
public static final java.lang.String LOCK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
EXTEND_LOCK_RESOURCE_PATH
public static final java.lang.String EXTEND_LOCK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
SET_VARIABLES_RESOURCE_PATH
public static final java.lang.String SET_VARIABLES_RESOURCE_PATH
- See Also:
- Constant Field Values
-
UNLOCK_RESOURCE_PATH
public static final java.lang.String UNLOCK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
COMPLETE_RESOURCE_PATH
public static final java.lang.String COMPLETE_RESOURCE_PATH
- See Also:
- Constant Field Values
-
FAILURE_RESOURCE_PATH
public static final java.lang.String FAILURE_RESOURCE_PATH
- See Also:
- Constant Field Values
-
BPMN_ERROR_RESOURCE_PATH
public static final java.lang.String BPMN_ERROR_RESOURCE_PATH
- See Also:
- Constant Field Values
-
NAME_PATH_PARAM
public static final java.lang.String NAME_PATH_PARAM
- See Also:
- Constant Field Values
-
EXECUTION_RESOURCE_PATH
public static final java.lang.String EXECUTION_RESOURCE_PATH
- See Also:
- Constant Field Values
-
EXECUTION_ID_RESOURCE_PATH
public static final java.lang.String EXECUTION_ID_RESOURCE_PATH
- See Also:
- Constant Field Values
-
GET_LOCAL_VARIABLE
public static final java.lang.String GET_LOCAL_VARIABLE
- See Also:
- Constant Field Values
-
GET_LOCAL_BINARY_VARIABLE
public static final java.lang.String GET_LOCAL_BINARY_VARIABLE
- See Also:
- Constant Field Values
-
baseUrl
protected java.lang.String baseUrl
-
workerId
protected java.lang.String workerId
-
maxTasks
protected int maxTasks
-
usePriority
protected boolean usePriority
-
asyncResponseTimeout
protected java.lang.Long asyncResponseTimeout
-
engineInteraction
protected RequestExecutor engineInteraction
-
typedValues
protected TypedValues typedValues
-
-
Constructor Detail
-
EngineClient
public EngineClient(java.lang.String workerId, int maxTasks, java.lang.Long asyncResponseTimeout, java.lang.String baseUrl, RequestExecutor engineInteraction)
-
EngineClient
public EngineClient(java.lang.String workerId, int maxTasks, java.lang.Long asyncResponseTimeout, java.lang.String baseUrl, RequestExecutor engineInteraction, boolean usePriority)
-
-
Method Detail
-
fetchAndLock
public java.util.List<ExternalTask> fetchAndLock(java.util.List<TopicRequestDto> topics) throws EngineClientException
- Throws:
EngineClientException
-
lock
public void lock(java.lang.String taskId, long lockDuration) throws EngineClientException
- Throws:
EngineClientException
-
unlock
public void unlock(java.lang.String taskId) throws EngineClientException
- Throws:
EngineClientException
-
complete
public void complete(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.Map<java.lang.String,java.lang.Object> localVariables) throws EngineClientException
- Throws:
EngineClientException
-
setVariables
public void setVariables(java.lang.String proccessId, java.util.Map<java.lang.String,java.lang.Object> variables) throws EngineClientException
- Throws:
EngineClientException
-
failure
public void failure(java.lang.String taskId, java.lang.String errorMessage, java.lang.String errorDetails, int retries, long retryTimeout, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.Map<java.lang.String,java.lang.Object> localVariables) throws EngineClientException
- Throws:
EngineClientException
-
bpmnError
public void bpmnError(java.lang.String taskId, java.lang.String errorCode, java.lang.String errorMessage, java.util.Map<java.lang.String,java.lang.Object> variables) throws EngineClientException
- Throws:
EngineClientException
-
extendLock
public void extendLock(java.lang.String taskId, long newDuration) throws EngineClientException
- Throws:
EngineClientException
-
getLocalBinaryVariable
public byte[] getLocalBinaryVariable(java.lang.String variableName, java.lang.String processInstanceId) throws EngineClientException
- Throws:
EngineClientException
-
getBaseUrl
public java.lang.String getBaseUrl()
-
getWorkerId
public java.lang.String getWorkerId()
-
setTypedValues
public void setTypedValues(TypedValues typedValues)
-
isUsePriority
public boolean isUsePriority()
-
-