public class MicroserviceRestAdapter extends RestServiceAdapter
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
changedIsolation |
protected java.lang.Long |
requestId |
AUTH_APP_ID, AUTH_PASSWORD, AUTH_PROVIDER, AUTH_USER, ENDPOINT_URI, HEADERS_VARIABLE, HTTP_METHODCONNECT_TIMEOUT, DEFAULT_ERROR_HTTP_CODE, DEFAULT_RETRY_HTTP_CODE, ERROR_HTTP_CODES, PROP_PASS, PROP_USER, READ_TIMEOUT, RETRY_HTTP_CODESDISABLED, GROOVY, JAVA_EL, JAVASCRIPT, logger, OUTPUTDOCSCOMPCODE_AUTO_RETRY, DEFAULT_STUBBER_PORT, DEFAULT_STUBBER_TIMEOUT, DO_LOGGING, MAKE_ACTUAL_CALL, PROP_MAX_TRIES, PROP_RETRY_INTERVAL, PROP_SYNCHRONOUS_RESPONSE, PROP_TIMEOUT, REQUEST_VARIABLE, REQUEST_XSD, RESPONSE_VARIABLE, RESPONSE_XSD| Constructor and Description |
|---|
MicroserviceRestAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getMicroservice(ServiceSummary summary)
Standard behavior is to read from a String variable (defaultName='microservice').
|
protected java.lang.String |
getMicroserviceById(ServiceSummary summary) |
java.util.Map<java.lang.String,java.lang.String> |
getRequestHeaders()
Overridden to append JSON headers.
|
java.lang.Long |
getRequestId()
Returns the requestId that we will use to populate the serviceSummary
|
protected ServiceSummary |
getServiceSummary(boolean forUpdate) |
protected java.lang.String |
getServiceSummaryVariableName()
You'd need a custom .impl asset to set this through designer
|
protected java.lang.Long |
logRequest(com.centurylink.mdw.model.request.Request request)
TODO: Do we really have to save requestId var? Or can we get it from db?
|
protected java.lang.Long |
logResponse(com.centurylink.mdw.model.Response response)
Populates serviceSummary
|
protected void |
notifyServiceSummaryUpdate(ServiceSummary serviceSummary)
Standard behavior is to publish event fitting standard pattern of default event
used in DependenciesWaitActivity (Microservice Dependencies Wait)
|
void |
updateServiceSummary(com.centurylink.mdw.model.Status status,
java.lang.Long responseId) |
getAdapterInvocationErrorMessage, getAuthProvider, getEndpointUri, getHttpHelper, getHttpMethod, getRequestData, getRequestMeta, getRequestParameters, getResponseHeaders, getResponseMeta, getStubRequest, getUrlEncoding, invoke, invoke, openConnection, openConnection, openConnection, performHttpAction, setResponseHeaderscanBeAsynchronous, canBeSynchronous, closeConnection, getConnectTimeout, getReadTimeout, getResponse, init, setRequestHeadersdirectInvoke, doInvoke, doLogging, execute, executePostScript, executePreScript, filterStubResponse, getAttribute, getErrorCode, getMaxTries, getRetryInterval, getStubbedResponse, getStubResponse, getTimeoutForResponse, handleConnectionException, handleException, handleRetry, hasPostScript, hasPreScript, isRetryable, isStubMode, isSynchronous, logRequest, logResponse, onFailure, onSuccessexecutecloseDatabaseAccess, createDocument, createDocument, createDocument, createDocument, doCompatibilityCodeSubstitutions, evaluateExpression, executeScript, getActivityId, getActivityInstance, getActivityInstanceId, getActivityName, getAsset, getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValueAsVariableName, getAttributeValueSmart, getDocument, getDocumentContent, getDocumentForUpdate, getEngine, getEntryCode, getExternalEventInstanceDetails, getMainProcessDefinition, getMasterRequestId, getOutputDocuments, getPackage, getParameterId, getParameters, getParameterStringValue, getParameterType, getParameterValue, getParameterValue, getParentProcessId, getPerformanceLevel, getProcessDefinition, getProcessId, getProcessInstance, getProcessInstanceId, getProcessInstanceOwner, getProcessInstanceOwnerId, getProperty, getRequiredAttribute, getRequiredVariableValue, getReturnCode, getReturnMessage, getRuntimeContext, getScriptEvaluator, getScriptExecClassName, getScriptExecutor, getValue, getValueSmart, getVariableInstance, getVariableValue, getVariableValueSmart, getWorkTransitionInstanceId, initialize, isDisabled, isLogDebugEnabled, isLogInfoEnabled, isOutputDocument, lockActivityInstance, lockProcessInstance, logdebug, logexception, loginfo, logsevere, logtag, logwarn, openDatabaseAccess, prepare, setOutputDocuments, setParameterValue, setParameterValue, setParameterValueAsDocument, setParameterValues, setProcessInstanceCompletionCode, setReturnCode, setReturnMessage, setValue, setVariableValue, setVariableValue, startTransaction, stopTransaction, translatePlaceHolder, updateDocumentContent, updateDocumentInfo, updateDocumentInfo, valueIsJavaExpression, valueIsVariableprotected java.lang.Long requestId
protected boolean changedIsolation
public java.util.Map<java.lang.String,java.lang.String> getRequestHeaders()
getRequestHeaders in interface com.centurylink.mdw.adapter.HeaderAwareAdaptergetRequestHeaders in class RestServiceAdapterprotected java.lang.Long logResponse(com.centurylink.mdw.model.Response response)
logResponse in class TextAdapterActivityprotected java.lang.Long logRequest(com.centurylink.mdw.model.request.Request request)
logRequest in class RestServiceAdapterpublic void updateServiceSummary(com.centurylink.mdw.model.Status status,
java.lang.Long responseId)
throws com.centurylink.mdw.activity.ActivityException,
java.sql.SQLException
com.centurylink.mdw.activity.ActivityExceptionjava.sql.SQLExceptionprotected void notifyServiceSummaryUpdate(ServiceSummary serviceSummary) throws com.centurylink.mdw.activity.ActivityException
com.centurylink.mdw.activity.ActivityExceptionprotected java.lang.String getMicroservice(ServiceSummary summary) throws com.centurylink.mdw.activity.ActivityException
com.centurylink.mdw.activity.ActivityExceptionprotected java.lang.String getMicroserviceById(ServiceSummary summary)
protected ServiceSummary getServiceSummary(boolean forUpdate) throws com.centurylink.mdw.activity.ActivityException
com.centurylink.mdw.activity.ActivityExceptionprotected java.lang.String getServiceSummaryVariableName()
public java.lang.Long getRequestId()
throws com.centurylink.mdw.activity.ActivityException
com.centurylink.mdw.activity.ActivityException