
rapture.kernel.DecisionApiImplWrapper Maven / Gradle / Ivy
/**
* The MIT License (MIT)
*
* Copyright (C) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* This is an autogenerated file. You should not edit this file as any changes
* will be overwritten.
*/
package rapture.kernel;
import org.apache.log4j.Logger;
import java.util.List;
import java.util.Map;
import rapture.common.api.DecisionApi;
import rapture.common.CallingContext;
import rapture.common.RaptureEntitlementsContext;
import rapture.common.hooks.CallName;
import rapture.common.model.BasePayload;
import rapture.common.EntitlementSet;
import rapture.kernel.context.ContextValidator;
import rapture.common.AppStatus;
import rapture.common.CreateResponse;
import rapture.common.RaptureFolderInfo;
import rapture.common.dp.WorkOrderStatus;
import rapture.common.dp.Workflow;
import rapture.common.dp.Step;
import rapture.common.dp.WorkOrderCancellation;
import rapture.common.LogQueryResponse;
import rapture.common.dp.WorkOrderDebug;
import rapture.common.dp.WorkOrder;
import rapture.common.dp.AppStatusDetails;
import rapture.common.dp.Transition;
import rapture.common.dp.Worker;
import rapture.common.dp.WorkflowHistoricalMetrics;
import rapture.common.ErrorWrapper;
import rapture.common.shared.decision.GetAllWorkflowsPayload;
import rapture.common.shared.decision.GetWorkflowChildrenPayload;
import rapture.common.shared.decision.GetWorkOrderChildrenPayload;
import rapture.common.shared.decision.PutWorkflowPayload;
import rapture.common.shared.decision.GetWorkflowPayload;
import rapture.common.shared.decision.GetWorkflowStepPayload;
import rapture.common.shared.decision.GetStepCategoryPayload;
import rapture.common.shared.decision.AddStepPayload;
import rapture.common.shared.decision.RemoveStepPayload;
import rapture.common.shared.decision.AddTransitionPayload;
import rapture.common.shared.decision.RemoveTransitionPayload;
import rapture.common.shared.decision.DeleteWorkflowPayload;
import rapture.common.shared.decision.CreateWorkOrderPayload;
import rapture.common.shared.decision.CreateWorkOrderPPayload;
import rapture.common.shared.decision.ReleaseWorkOrderLockPayload;
import rapture.common.shared.decision.GetWorkOrderStatusPayload;
import rapture.common.shared.decision.WriteWorkflowAuditEntryPayload;
import rapture.common.shared.decision.GetWorkOrdersByDayPayload;
import rapture.common.shared.decision.GetWorkOrdersByWorkflowPayload;
import rapture.common.shared.decision.GetWorkOrderPayload;
import rapture.common.shared.decision.GetWorkerPayload;
import rapture.common.shared.decision.CancelWorkOrderPayload;
import rapture.common.shared.decision.ResumeWorkOrderPayload;
import rapture.common.shared.decision.WasCancelCalledPayload;
import rapture.common.shared.decision.GetCancellationDetailsPayload;
import rapture.common.shared.decision.GetWorkOrderDebugPayload;
import rapture.common.shared.decision.SetWorkOrderIdGenConfigPayload;
import rapture.common.shared.decision.SetContextLiteralPayload;
import rapture.common.shared.decision.SetContextLinkPayload;
import rapture.common.shared.decision.GetContextValuePayload;
import rapture.common.shared.decision.AddErrorToContextPayload;
import rapture.common.shared.decision.GetErrorsFromContextPayload;
import rapture.common.shared.decision.GetExceptionInfoPayload;
import rapture.common.shared.decision.ReportStepProgressPayload;
import rapture.common.shared.decision.GetAppStatusesPayload;
import rapture.common.shared.decision.GetAppStatusDetailsPayload;
import rapture.common.shared.decision.GetMonthlyMetricsPayload;
import rapture.common.shared.decision.QueryLogsPayload;
/**
* This class is a wrapper around the class {@link DecisionApiImpl}. This is an auto-generated class that gives us the ability to add hooks such as entitlmeent
* checks before each function call in the implementation. Since we always want to call these hooks, an instance of this class should be used
* (in {@link Kernel}) instead of using the implementation directly.
* implementation directly.
*
*/
@SuppressWarnings("all")
public class DecisionApiImplWrapper implements DecisionApi, KernelApi {
private static final Logger log = Logger.getLogger(DecisionApiImplWrapper.class);
private DecisionApiImpl apiImpl;
public DecisionApiImplWrapper(Kernel kernel) {
apiImpl = new DecisionApiImpl(kernel);
}
/**
* Returns the underlying implementation object. This should be used when a call is deliberately bypassing entitlement checks.
* @return {@link Decision}
*/
public DecisionApiImpl getTrusted() {
return apiImpl;
}
@Override
public void start() {
apiImpl.start();
}
/**
*
*/
@Override
public List getAllWorkflows(CallingContext context) {
long functionStartTime = System.currentTimeMillis();
GetAllWorkflowsPayload requestObj = new GetAllWorkflowsPayload();
requestObj.setContext(context);
ContextValidator.validateContext(context, EntitlementSet.Decision_getAllWorkflows, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getAllWorkflows);
List returnValue = apiImpl.getAllWorkflows(context); Kernel.getApiHooksService().post(context, CallName.Decision_getAllWorkflows);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getAllWorkflows.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getAllWorkflows.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public List getWorkflowChildren(CallingContext context, String workflowURI) {
long functionStartTime = System.currentTimeMillis();
GetWorkflowChildrenPayload requestObj = new GetWorkflowChildrenPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkflowChildren, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkflowChildren);
List returnValue = apiImpl.getWorkflowChildren(context, workflowURI); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkflowChildren);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkflowChildren.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkflowChildren.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public List getWorkOrderChildren(CallingContext context, String parentPath) {
long functionStartTime = System.currentTimeMillis();
GetWorkOrderChildrenPayload requestObj = new GetWorkOrderChildrenPayload();
requestObj.setContext(context);
requestObj.setParentPath(parentPath);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkOrderChildren, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkOrderChildren);
List returnValue = apiImpl.getWorkOrderChildren(context, parentPath); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkOrderChildren);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrderChildren.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrderChildren.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public void putWorkflow(CallingContext context, Workflow workflow) {
long functionStartTime = System.currentTimeMillis();
PutWorkflowPayload requestObj = new PutWorkflowPayload();
requestObj.setContext(context);
requestObj.setWorkflow(workflow);
ContextValidator.validateContext(context, EntitlementSet.Decision_putWorkflow, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_putWorkflow);
apiImpl.putWorkflow(context, workflow); Kernel.getApiHooksService().post(context, CallName.Decision_putWorkflow);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.putWorkflow.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.putWorkflow.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public Workflow getWorkflow(CallingContext context, String workflowURI) {
long functionStartTime = System.currentTimeMillis();
GetWorkflowPayload requestObj = new GetWorkflowPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkflow, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkflow);
Workflow returnValue = apiImpl.getWorkflow(context, workflowURI); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkflow);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkflow.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkflow.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public Step getWorkflowStep(CallingContext context, String stepURI) {
long functionStartTime = System.currentTimeMillis();
GetWorkflowStepPayload requestObj = new GetWorkflowStepPayload();
requestObj.setContext(context);
requestObj.setStepURI(stepURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkflowStep, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkflowStep);
Step returnValue = apiImpl.getWorkflowStep(context, stepURI); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkflowStep);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkflowStep.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkflowStep.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public String getStepCategory(CallingContext context, String stepURI) {
long functionStartTime = System.currentTimeMillis();
GetStepCategoryPayload requestObj = new GetStepCategoryPayload();
requestObj.setContext(context);
requestObj.setStepURI(stepURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getStepCategory, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getStepCategory);
String returnValue = apiImpl.getStepCategory(context, stepURI); Kernel.getApiHooksService().post(context, CallName.Decision_getStepCategory);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getStepCategory.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getStepCategory.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public void addStep(CallingContext context, String workflowURI, Step step) {
long functionStartTime = System.currentTimeMillis();
AddStepPayload requestObj = new AddStepPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
requestObj.setStep(step);
ContextValidator.validateContext(context, EntitlementSet.Decision_addStep, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_addStep);
apiImpl.addStep(context, workflowURI, step); Kernel.getApiHooksService().post(context, CallName.Decision_addStep);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.addStep.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.addStep.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public void removeStep(CallingContext context, String workflowURI, String stepName) {
long functionStartTime = System.currentTimeMillis();
RemoveStepPayload requestObj = new RemoveStepPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
requestObj.setStepName(stepName);
ContextValidator.validateContext(context, EntitlementSet.Decision_removeStep, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_removeStep);
apiImpl.removeStep(context, workflowURI, stepName); Kernel.getApiHooksService().post(context, CallName.Decision_removeStep);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.removeStep.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.removeStep.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public void addTransition(CallingContext context, String workflowURI, String stepName, Transition transition) {
long functionStartTime = System.currentTimeMillis();
AddTransitionPayload requestObj = new AddTransitionPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
requestObj.setStepName(stepName);
requestObj.setTransition(transition);
ContextValidator.validateContext(context, EntitlementSet.Decision_addTransition, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_addTransition);
apiImpl.addTransition(context, workflowURI, stepName, transition); Kernel.getApiHooksService().post(context, CallName.Decision_addTransition);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.addTransition.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.addTransition.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public void removeTransition(CallingContext context, String workflowURI, String stepName, String transitionName) {
long functionStartTime = System.currentTimeMillis();
RemoveTransitionPayload requestObj = new RemoveTransitionPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
requestObj.setStepName(stepName);
requestObj.setTransitionName(transitionName);
ContextValidator.validateContext(context, EntitlementSet.Decision_removeTransition, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_removeTransition);
apiImpl.removeTransition(context, workflowURI, stepName, transitionName); Kernel.getApiHooksService().post(context, CallName.Decision_removeTransition);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.removeTransition.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.removeTransition.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public void deleteWorkflow(CallingContext context, String workflowURI) {
long functionStartTime = System.currentTimeMillis();
DeleteWorkflowPayload requestObj = new DeleteWorkflowPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_deleteWorkflow, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_deleteWorkflow);
apiImpl.deleteWorkflow(context, workflowURI); Kernel.getApiHooksService().post(context, CallName.Decision_deleteWorkflow);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.deleteWorkflow.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.deleteWorkflow.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public String createWorkOrder(CallingContext context, String workflowURI, Map argsMap) {
long functionStartTime = System.currentTimeMillis();
CreateWorkOrderPayload requestObj = new CreateWorkOrderPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
requestObj.setArgsMap(argsMap);
ContextValidator.validateContext(context, EntitlementSet.Decision_createWorkOrder, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_createWorkOrder);
String returnValue = apiImpl.createWorkOrder(context, workflowURI, argsMap); Kernel.getApiHooksService().post(context, CallName.Decision_createWorkOrder);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.createWorkOrder.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.createWorkOrder.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public CreateResponse createWorkOrderP(CallingContext context, String workflowURI, Map argsMap, String appStatusUriPattern) {
long functionStartTime = System.currentTimeMillis();
CreateWorkOrderPPayload requestObj = new CreateWorkOrderPPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
requestObj.setArgsMap(argsMap);
requestObj.setAppStatusUriPattern(appStatusUriPattern);
ContextValidator.validateContext(context, EntitlementSet.Decision_createWorkOrderP, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_createWorkOrderP);
CreateResponse returnValue = apiImpl.createWorkOrderP(context, workflowURI, argsMap, appStatusUriPattern); Kernel.getApiHooksService().post(context, CallName.Decision_createWorkOrderP);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.createWorkOrderP.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.createWorkOrderP.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public void releaseWorkOrderLock(CallingContext context, String workOrderURI) {
long functionStartTime = System.currentTimeMillis();
ReleaseWorkOrderLockPayload requestObj = new ReleaseWorkOrderLockPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_releaseWorkOrderLock, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_releaseWorkOrderLock);
apiImpl.releaseWorkOrderLock(context, workOrderURI); Kernel.getApiHooksService().post(context, CallName.Decision_releaseWorkOrderLock);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.releaseWorkOrderLock.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.releaseWorkOrderLock.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public WorkOrderStatus getWorkOrderStatus(CallingContext context, String workOrderURI) {
long functionStartTime = System.currentTimeMillis();
GetWorkOrderStatusPayload requestObj = new GetWorkOrderStatusPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkOrderStatus, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkOrderStatus);
WorkOrderStatus returnValue = apiImpl.getWorkOrderStatus(context, workOrderURI); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkOrderStatus);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrderStatus.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrderStatus.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public void writeWorkflowAuditEntry(CallingContext context, String workOrderURI, String message, Boolean error) {
long functionStartTime = System.currentTimeMillis();
WriteWorkflowAuditEntryPayload requestObj = new WriteWorkflowAuditEntryPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
requestObj.setMessage(message);
requestObj.setError(error);
ContextValidator.validateContext(context, EntitlementSet.Decision_writeWorkflowAuditEntry, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_writeWorkflowAuditEntry);
apiImpl.writeWorkflowAuditEntry(context, workOrderURI, message, error); Kernel.getApiHooksService().post(context, CallName.Decision_writeWorkflowAuditEntry);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.writeWorkflowAuditEntry.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.writeWorkflowAuditEntry.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public List getWorkOrdersByDay(CallingContext context, Long startTimeInstant) {
long functionStartTime = System.currentTimeMillis();
GetWorkOrdersByDayPayload requestObj = new GetWorkOrdersByDayPayload();
requestObj.setContext(context);
requestObj.setStartTimeInstant(startTimeInstant);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkOrdersByDay, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkOrdersByDay);
List returnValue = apiImpl.getWorkOrdersByDay(context, startTimeInstant); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkOrdersByDay);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrdersByDay.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrdersByDay.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public List getWorkOrdersByWorkflow(CallingContext context, Long startTimeInstant, String workflowUri) {
long functionStartTime = System.currentTimeMillis();
GetWorkOrdersByWorkflowPayload requestObj = new GetWorkOrdersByWorkflowPayload();
requestObj.setContext(context);
requestObj.setStartTimeInstant(startTimeInstant);
requestObj.setWorkflowUri(workflowUri);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkOrdersByWorkflow, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkOrdersByWorkflow);
List returnValue = apiImpl.getWorkOrdersByWorkflow(context, startTimeInstant, workflowUri); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkOrdersByWorkflow);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrdersByWorkflow.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrdersByWorkflow.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public WorkOrder getWorkOrder(CallingContext context, String workOrderURI) {
long functionStartTime = System.currentTimeMillis();
GetWorkOrderPayload requestObj = new GetWorkOrderPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkOrder, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkOrder);
WorkOrder returnValue = apiImpl.getWorkOrder(context, workOrderURI); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkOrder);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrder.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrder.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public Worker getWorker(CallingContext context, String workOrderURI, String workerId) {
long functionStartTime = System.currentTimeMillis();
GetWorkerPayload requestObj = new GetWorkerPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
requestObj.setWorkerId(workerId);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorker, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorker);
Worker returnValue = apiImpl.getWorker(context, workOrderURI, workerId); Kernel.getApiHooksService().post(context, CallName.Decision_getWorker);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorker.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorker.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public void cancelWorkOrder(CallingContext context, String workOrderURI) {
long functionStartTime = System.currentTimeMillis();
CancelWorkOrderPayload requestObj = new CancelWorkOrderPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_cancelWorkOrder, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_cancelWorkOrder);
apiImpl.cancelWorkOrder(context, workOrderURI); Kernel.getApiHooksService().post(context, CallName.Decision_cancelWorkOrder);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.cancelWorkOrder.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.cancelWorkOrder.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public CreateResponse resumeWorkOrder(CallingContext context, String workOrderURI, String resumeStepURI) {
long functionStartTime = System.currentTimeMillis();
ResumeWorkOrderPayload requestObj = new ResumeWorkOrderPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
requestObj.setResumeStepURI(resumeStepURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_resumeWorkOrder, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_resumeWorkOrder);
CreateResponse returnValue = apiImpl.resumeWorkOrder(context, workOrderURI, resumeStepURI); Kernel.getApiHooksService().post(context, CallName.Decision_resumeWorkOrder);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.resumeWorkOrder.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.resumeWorkOrder.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public Boolean wasCancelCalled(CallingContext context, String workOrderURI) {
long functionStartTime = System.currentTimeMillis();
WasCancelCalledPayload requestObj = new WasCancelCalledPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_wasCancelCalled, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_wasCancelCalled);
Boolean returnValue = apiImpl.wasCancelCalled(context, workOrderURI); Kernel.getApiHooksService().post(context, CallName.Decision_wasCancelCalled);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.wasCancelCalled.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.wasCancelCalled.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public WorkOrderCancellation getCancellationDetails(CallingContext context, String workOrderURI) {
long functionStartTime = System.currentTimeMillis();
GetCancellationDetailsPayload requestObj = new GetCancellationDetailsPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getCancellationDetails, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getCancellationDetails);
WorkOrderCancellation returnValue = apiImpl.getCancellationDetails(context, workOrderURI); Kernel.getApiHooksService().post(context, CallName.Decision_getCancellationDetails);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getCancellationDetails.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getCancellationDetails.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public WorkOrderDebug getWorkOrderDebug(CallingContext context, String workOrderURI) {
long functionStartTime = System.currentTimeMillis();
GetWorkOrderDebugPayload requestObj = new GetWorkOrderDebugPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getWorkOrderDebug, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getWorkOrderDebug);
WorkOrderDebug returnValue = apiImpl.getWorkOrderDebug(context, workOrderURI); Kernel.getApiHooksService().post(context, CallName.Decision_getWorkOrderDebug);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrderDebug.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getWorkOrderDebug.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public void setWorkOrderIdGenConfig(CallingContext context, String config, Boolean force) {
long functionStartTime = System.currentTimeMillis();
SetWorkOrderIdGenConfigPayload requestObj = new SetWorkOrderIdGenConfigPayload();
requestObj.setContext(context);
requestObj.setConfig(config);
requestObj.setForce(force);
ContextValidator.validateContext(context, EntitlementSet.Decision_setWorkOrderIdGenConfig, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_setWorkOrderIdGenConfig);
apiImpl.setWorkOrderIdGenConfig(context, config, force); Kernel.getApiHooksService().post(context, CallName.Decision_setWorkOrderIdGenConfig);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.setWorkOrderIdGenConfig.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.setWorkOrderIdGenConfig.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public void setContextLiteral(CallingContext context, String workerURI, String varAlias, String literalValue) {
long functionStartTime = System.currentTimeMillis();
SetContextLiteralPayload requestObj = new SetContextLiteralPayload();
requestObj.setContext(context);
requestObj.setWorkerURI(workerURI);
requestObj.setVarAlias(varAlias);
requestObj.setLiteralValue(literalValue);
ContextValidator.validateContext(context, EntitlementSet.Decision_setContextLiteral, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_setContextLiteral);
apiImpl.setContextLiteral(context, workerURI, varAlias, literalValue); Kernel.getApiHooksService().post(context, CallName.Decision_setContextLiteral);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.setContextLiteral.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.setContextLiteral.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public void setContextLink(CallingContext context, String workerURI, String varAlias, String expressionValue) {
long functionStartTime = System.currentTimeMillis();
SetContextLinkPayload requestObj = new SetContextLinkPayload();
requestObj.setContext(context);
requestObj.setWorkerURI(workerURI);
requestObj.setVarAlias(varAlias);
requestObj.setExpressionValue(expressionValue);
ContextValidator.validateContext(context, EntitlementSet.Decision_setContextLink, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_setContextLink);
apiImpl.setContextLink(context, workerURI, varAlias, expressionValue); Kernel.getApiHooksService().post(context, CallName.Decision_setContextLink);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.setContextLink.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.setContextLink.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public String getContextValue(CallingContext context, String workerURI, String varAlias) {
long functionStartTime = System.currentTimeMillis();
GetContextValuePayload requestObj = new GetContextValuePayload();
requestObj.setContext(context);
requestObj.setWorkerURI(workerURI);
requestObj.setVarAlias(varAlias);
ContextValidator.validateContext(context, EntitlementSet.Decision_getContextValue, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getContextValue);
String returnValue = apiImpl.getContextValue(context, workerURI, varAlias); Kernel.getApiHooksService().post(context, CallName.Decision_getContextValue);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getContextValue.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getContextValue.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public void addErrorToContext(CallingContext context, String workerURI, ErrorWrapper errorWrapper) {
long functionStartTime = System.currentTimeMillis();
AddErrorToContextPayload requestObj = new AddErrorToContextPayload();
requestObj.setContext(context);
requestObj.setWorkerURI(workerURI);
requestObj.setErrorWrapper(errorWrapper);
ContextValidator.validateContext(context, EntitlementSet.Decision_addErrorToContext, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_addErrorToContext);
apiImpl.addErrorToContext(context, workerURI, errorWrapper); Kernel.getApiHooksService().post(context, CallName.Decision_addErrorToContext);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.addErrorToContext.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.addErrorToContext.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public List getErrorsFromContext(CallingContext context, String workerURI) {
long functionStartTime = System.currentTimeMillis();
GetErrorsFromContextPayload requestObj = new GetErrorsFromContextPayload();
requestObj.setContext(context);
requestObj.setWorkerURI(workerURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getErrorsFromContext, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getErrorsFromContext);
List returnValue = apiImpl.getErrorsFromContext(context, workerURI); Kernel.getApiHooksService().post(context, CallName.Decision_getErrorsFromContext);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getErrorsFromContext.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getErrorsFromContext.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public List getExceptionInfo(CallingContext context, String workOrderURI) {
long functionStartTime = System.currentTimeMillis();
GetExceptionInfoPayload requestObj = new GetExceptionInfoPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
ContextValidator.validateContext(context, EntitlementSet.Decision_getExceptionInfo, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getExceptionInfo);
List returnValue = apiImpl.getExceptionInfo(context, workOrderURI); Kernel.getApiHooksService().post(context, CallName.Decision_getExceptionInfo);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getExceptionInfo.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getExceptionInfo.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public void reportStepProgress(CallingContext context, String workerURI, Long stepStartTime, String message, Long progress, Long max) {
long functionStartTime = System.currentTimeMillis();
ReportStepProgressPayload requestObj = new ReportStepProgressPayload();
requestObj.setContext(context);
requestObj.setWorkerURI(workerURI);
requestObj.setStepStartTime(stepStartTime);
requestObj.setMessage(message);
requestObj.setProgress(progress);
requestObj.setMax(max);
ContextValidator.validateContext(context, EntitlementSet.Decision_reportStepProgress, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_reportStepProgress);
apiImpl.reportStepProgress(context, workerURI, stepStartTime, message, progress, max); Kernel.getApiHooksService().post(context, CallName.Decision_reportStepProgress);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.reportStepProgress.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.reportStepProgress.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
}
/**
*
*/
@Override
public List getAppStatuses(CallingContext context, String prefix) {
long functionStartTime = System.currentTimeMillis();
GetAppStatusesPayload requestObj = new GetAppStatusesPayload();
requestObj.setContext(context);
requestObj.setPrefix(prefix);
ContextValidator.validateContext(context, EntitlementSet.Decision_getAppStatuses, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getAppStatuses);
List returnValue = apiImpl.getAppStatuses(context, prefix); Kernel.getApiHooksService().post(context, CallName.Decision_getAppStatuses);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getAppStatuses.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getAppStatuses.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public List getAppStatusDetails(CallingContext context, String prefix, List extraContextValues) {
long functionStartTime = System.currentTimeMillis();
GetAppStatusDetailsPayload requestObj = new GetAppStatusDetailsPayload();
requestObj.setContext(context);
requestObj.setPrefix(prefix);
requestObj.setExtraContextValues(extraContextValues);
ContextValidator.validateContext(context, EntitlementSet.Decision_getAppStatusDetails, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getAppStatusDetails);
List returnValue = apiImpl.getAppStatusDetails(context, prefix, extraContextValues); Kernel.getApiHooksService().post(context, CallName.Decision_getAppStatusDetails);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getAppStatusDetails.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getAppStatusDetails.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public WorkflowHistoricalMetrics getMonthlyMetrics(CallingContext context, String workflowURI, String jobURI, String argsHashValue, String state) {
long functionStartTime = System.currentTimeMillis();
GetMonthlyMetricsPayload requestObj = new GetMonthlyMetricsPayload();
requestObj.setContext(context);
requestObj.setWorkflowURI(workflowURI);
requestObj.setJobURI(jobURI);
requestObj.setArgsHashValue(argsHashValue);
requestObj.setState(state);
ContextValidator.validateContext(context, EntitlementSet.Decision_getMonthlyMetrics, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_getMonthlyMetrics);
WorkflowHistoricalMetrics returnValue = apiImpl.getMonthlyMetrics(context, workflowURI, jobURI, argsHashValue, state); Kernel.getApiHooksService().post(context, CallName.Decision_getMonthlyMetrics);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getMonthlyMetrics.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.getMonthlyMetrics.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
/**
*
*/
@Override
public LogQueryResponse queryLogs(CallingContext context, String workOrderURI, Long startTime, Long endTime, Long keepAlive, Long bufferSize, String nextBatchId, String stepName, String stepStartTime) {
long functionStartTime = System.currentTimeMillis();
QueryLogsPayload requestObj = new QueryLogsPayload();
requestObj.setContext(context);
requestObj.setWorkOrderURI(workOrderURI);
requestObj.setStartTime(startTime);
requestObj.setEndTime(endTime);
requestObj.setKeepAlive(keepAlive);
requestObj.setBufferSize(bufferSize);
requestObj.setNextBatchId(nextBatchId);
requestObj.setStepName(stepName);
requestObj.setStepStartTime(stepStartTime);
ContextValidator.validateContext(context, EntitlementSet.Decision_queryLogs, requestObj);
long preToPostStartTime = System.currentTimeMillis();
Kernel.getApiHooksService().pre(context, CallName.Decision_queryLogs);
LogQueryResponse returnValue = apiImpl.queryLogs(context, workOrderURI, startTime, endTime, keepAlive, bufferSize, nextBatchId, stepName, stepStartTime); Kernel.getApiHooksService().post(context, CallName.Decision_queryLogs);
long endFunctionTime = System.currentTimeMillis();
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.queryLogs.fullFunctionTime.succeeded", (endFunctionTime-functionStartTime));
Kernel.getMetricsService().recordTimeDifference("apiMetrics.decisionApi.queryLogs.preToPostTime.succeeded", (endFunctionTime-preToPostStartTime));
return returnValue;}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy