Package org.camunda.bpm.client.impl
Class EngineClient
- java.lang.Object
 - 
- org.camunda.bpm.client.impl.EngineClient
 
 
- 
public class EngineClient extends Object
- Author:
 - Tassilo Weidner
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected LongasyncResponseTimeoutprotected StringbaseUrlstatic StringBPMN_ERROR_RESOURCE_PATHstatic StringCOMPLETE_RESOURCE_PATHprotected RequestExecutorengineInteractionstatic StringEXECUTION_ID_RESOURCE_PATHstatic StringEXECUTION_RESOURCE_PATHstatic StringEXTEND_LOCK_RESOURCE_PATHprotected static StringEXTERNAL_TASK__PROCESS_RESOURCE_PATHprotected static StringEXTERNAL_TASK_RESOURCE_PATHstatic StringFAILURE_RESOURCE_PATHprotected static StringFETCH_AND_LOCK_RESOURCE_PATHstatic StringGET_LOCAL_BINARY_VARIABLEstatic StringGET_LOCAL_VARIABLEstatic StringID_PATH_PARAMprotected static StringID_RESOURCE_PATHstatic StringLOCK_RESOURCE_PATHprotected intmaxTasksstatic StringNAME_PATH_PARAMstatic StringSET_VARIABLES_RESOURCE_PATHprotected TypedValuestypedValuesstatic StringUNLOCK_RESOURCE_PATHprotected booleanusePriorityprotected StringworkerId 
- 
Constructor Summary
Constructors Constructor Description EngineClient(String workerId, int maxTasks, Long asyncResponseTimeout, String baseUrl, RequestExecutor engineInteraction)EngineClient(String workerId, int maxTasks, Long asyncResponseTimeout, String baseUrl, RequestExecutor engineInteraction, boolean usePriority) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbpmnError(String taskId, String errorCode, String errorMessage, Map<String,Object> variables)voidcomplete(String taskId, Map<String,Object> variables, Map<String,Object> localVariables)voidextendLock(String taskId, long newDuration)voidfailure(String taskId, String errorMessage, String errorDetails, int retries, long retryTimeout, Map<String,Object> variables, Map<String,Object> localVariables)List<ExternalTask>fetchAndLock(List<TopicRequestDto> topics)StringgetBaseUrl()byte[]getLocalBinaryVariable(String variableName, String processInstanceId)StringgetWorkerId()booleanisUsePriority()voidlock(String taskId, long lockDuration)voidsetTypedValues(TypedValues typedValues)voidsetVariables(String proccessId, Map<String,Object> variables)voidunlock(String taskId) 
 - 
 
- 
- 
Field Detail
- 
EXTERNAL_TASK_RESOURCE_PATH
protected static final String EXTERNAL_TASK_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
EXTERNAL_TASK__PROCESS_RESOURCE_PATH
protected static final String EXTERNAL_TASK__PROCESS_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
FETCH_AND_LOCK_RESOURCE_PATH
protected static final String FETCH_AND_LOCK_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
ID_PATH_PARAM
public static final String ID_PATH_PARAM
- See Also:
 - Constant Field Values
 
 
- 
ID_RESOURCE_PATH
protected static final String ID_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
LOCK_RESOURCE_PATH
public static final String LOCK_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
EXTEND_LOCK_RESOURCE_PATH
public static final String EXTEND_LOCK_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
SET_VARIABLES_RESOURCE_PATH
public static final String SET_VARIABLES_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
UNLOCK_RESOURCE_PATH
public static final String UNLOCK_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
COMPLETE_RESOURCE_PATH
public static final String COMPLETE_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
FAILURE_RESOURCE_PATH
public static final String FAILURE_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
BPMN_ERROR_RESOURCE_PATH
public static final String BPMN_ERROR_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
NAME_PATH_PARAM
public static final String NAME_PATH_PARAM
- See Also:
 - Constant Field Values
 
 
- 
EXECUTION_RESOURCE_PATH
public static final String EXECUTION_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
EXECUTION_ID_RESOURCE_PATH
public static final String EXECUTION_ID_RESOURCE_PATH
- See Also:
 - Constant Field Values
 
 
- 
GET_LOCAL_VARIABLE
public static final String GET_LOCAL_VARIABLE
- See Also:
 - Constant Field Values
 
 
- 
GET_LOCAL_BINARY_VARIABLE
public static final String GET_LOCAL_BINARY_VARIABLE
- See Also:
 - Constant Field Values
 
 
- 
baseUrl
protected String baseUrl
 
- 
workerId
protected String workerId
 
- 
maxTasks
protected int maxTasks
 
- 
usePriority
protected boolean usePriority
 
- 
asyncResponseTimeout
protected Long asyncResponseTimeout
 
- 
engineInteraction
protected RequestExecutor engineInteraction
 
- 
typedValues
protected TypedValues typedValues
 
 - 
 
- 
Constructor Detail
- 
EngineClient
public EngineClient(String workerId, int maxTasks, Long asyncResponseTimeout, String baseUrl, RequestExecutor engineInteraction)
 
- 
EngineClient
public EngineClient(String workerId, int maxTasks, Long asyncResponseTimeout, String baseUrl, RequestExecutor engineInteraction, boolean usePriority)
 
 - 
 
- 
Method Detail
- 
fetchAndLock
public List<ExternalTask> fetchAndLock(List<TopicRequestDto> topics) throws EngineClientException
- Throws:
 EngineClientException
 
- 
lock
public void lock(String taskId, long lockDuration) throws EngineClientException
- Throws:
 EngineClientException
 
- 
unlock
public void unlock(String taskId) throws EngineClientException
- Throws:
 EngineClientException
 
- 
complete
public void complete(String taskId, Map<String,Object> variables, Map<String,Object> localVariables) throws EngineClientException
- Throws:
 EngineClientException
 
- 
setVariables
public void setVariables(String proccessId, Map<String,Object> variables) throws EngineClientException
- Throws:
 EngineClientException
 
- 
failure
public void failure(String taskId, String errorMessage, String errorDetails, int retries, long retryTimeout, Map<String,Object> variables, Map<String,Object> localVariables) throws EngineClientException
- Throws:
 EngineClientException
 
- 
bpmnError
public void bpmnError(String taskId, String errorCode, String errorMessage, Map<String,Object> variables) throws EngineClientException
- Throws:
 EngineClientException
 
- 
extendLock
public void extendLock(String taskId, long newDuration) throws EngineClientException
- Throws:
 EngineClientException
 
- 
getLocalBinaryVariable
public byte[] getLocalBinaryVariable(String variableName, String processInstanceId) throws EngineClientException
- Throws:
 EngineClientException
 
- 
getBaseUrl
public String getBaseUrl()
 
- 
getWorkerId
public String getWorkerId()
 
- 
setTypedValues
public void setTypedValues(TypedValues typedValues)
 
- 
isUsePriority
public boolean isUsePriority()
 
 - 
 
 -