Class AgentUtil
java.lang.Object
com.flowable.agent.engine.impl.util.AgentUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AgentInvocationEntityauditAiInvocation(AgentEngineConfiguration engineConfiguration, AgentInstance agentInstance, String agentInvocationId, AgentInvocationResultResponse.Invocation aiInvocation, String userId, boolean storeAsHumanContent) static AgentInvocationEntityauditAiInvocation(AgentEngineConfiguration engineConfiguration, AgentInvocationContext agentInvocationContext, AgentInvocationResultResponse.Invocation aiInvocation, boolean storeAsHumanContent) protected static DatecalculateDueDate(org.flowable.common.engine.impl.runtime.Clock clock, int initialRetryCount, Duration retryTimeout) protected static voidcreateAgentEngineTimerJob(AgentEngineConfiguration agentEngineConfiguration, String jobHandlerType, String scopeId, String tenantId, String subScopeId, com.fasterxml.jackson.databind.JsonNode jobConfiguration, Duration retryTimeout) static voidcreateAsyncJob(AgentEngineConfiguration agentEngineConfiguration, AgentInstance agentInstance, String jobHandlerType, com.fasterxml.jackson.databind.JsonNode jobConfiguration, boolean exclusive) static voidcreateAsyncJob(AgentEngineConfiguration agentEngineConfiguration, String agentInstanceId, String tenantId, String jobHandlerType, com.fasterxml.jackson.databind.JsonNode jobConfiguration, boolean exclusive) protected static org.flowable.common.engine.api.delegate.ExpressioncreateExpression(String expression, AgentEngineConfiguration agentEngineConfiguration) static StringgetAgentDefinitionKey(org.flowable.cmmn.model.CmmnModel cmmnModel) getOperation(AgentDefinitionModel agentDefinitionModel, String operationKey) protected static StringgetPromptMessage(AgentEngineConfiguration agentEngineConfiguration, AgentDefinitionModel.AgentBehavior behavior, String getParentDeploymentId, org.flowable.common.engine.api.variable.VariableContainer variableContainer, Function<AgentDefinitionModel.AgentBehavior, String> messageStringSupplier, Function<AgentDefinitionModel.AgentBehavior, AgentDefinitionModel.TemplateReference> messageTemplateSupplier) static Collection<String> getSupportedMimeTypes(AgentDefinitionModel agentDefinitionModel) static StringgetSystemMessage(AgentEngineConfiguration agentEngineConfiguration, AgentDefinitionModel.AgentOperation agentOperation, String getParentDeploymentId, org.flowable.common.engine.api.variable.VariableContainer variableContainer) static StringgetUserMessage(AgentEngineConfiguration agentEngineConfiguration, AgentDefinitionModel.AgentOperation agentOperation, String getParentDeploymentId, org.flowable.common.engine.api.variable.VariableContainer variableContainer) static voidhandleAgentInstanceCallback(AgentInstance agentInstance, AgentInvocationResult agentInvocationResult, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) static voidhandleAgentInstanceCallback(String callbackId, String callbackType, AgentInvocationResult agentInvocationResult, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) static voidhandleAgentInvocationResponse(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, AgentInvocationContext agentInvocationContext, AgentInstanceEntity agentInstance, AgentInvocationResultResponse resultResponse, boolean storeInteractionsAsHumanContent) static booleanhasDefaultBehavior(AgentDefinitionModel.AgentOperation agentOperation) protected static AgentInvocationEntityprocessExchangeMessages(AgentEngineConfiguration agentEngineConfiguration, AgentInvocationContext agentInvocationContext, boolean storeInteractionsAsHumanContent, AgentInvocationResultResponse resultResponse) protected static StringresolveTemplate(AgentDefinitionModel.TemplateReference templateReference, String getParentDeploymentId, org.flowable.common.engine.api.variable.VariableContainer variableContainer) static voidscheduleTriggerJobIfNeeded(AgentInstance agentInstance, org.flowable.common.engine.impl.interceptor.CommandContext commandContext, String customValues) static voidscheduleTriggerJobIfNeeded(AgentInstance agentInstance, org.flowable.common.engine.impl.interceptor.CommandContext commandContext, String jobHandlerType, String configuration, String customValues)
-
Field Details
-
DEFAULT_SUPPORTED_MIME_TYPES
-
AGENT_INVOCATION_RESULT_TRANSIENT_VARIABLE_NAME
- See Also:
-
AGENT_SIGNAL_TRANSIENT_VARIABLE_NAME
- See Also:
-
EXTENSION_ELEMENT_AGENT_ASYNC
- See Also:
-
AGENT_COMPLETED_SIGNAL_NAME
- See Also:
-
-
Constructor Details
-
AgentUtil
public AgentUtil()
-
-
Method Details
-
getAgentDefinitionKey
-
getUserMessage
public static String getUserMessage(AgentEngineConfiguration agentEngineConfiguration, AgentDefinitionModel.AgentOperation agentOperation, String getParentDeploymentId, org.flowable.common.engine.api.variable.VariableContainer variableContainer) -
getSystemMessage
public static String getSystemMessage(AgentEngineConfiguration agentEngineConfiguration, AgentDefinitionModel.AgentOperation agentOperation, String getParentDeploymentId, org.flowable.common.engine.api.variable.VariableContainer variableContainer) -
getPromptMessage
protected static String getPromptMessage(AgentEngineConfiguration agentEngineConfiguration, AgentDefinitionModel.AgentBehavior behavior, String getParentDeploymentId, org.flowable.common.engine.api.variable.VariableContainer variableContainer, Function<AgentDefinitionModel.AgentBehavior, String> messageStringSupplier, Function<AgentDefinitionModel.AgentBehavior, AgentDefinitionModel.TemplateReference> messageTemplateSupplier) -
resolveTemplate
protected static String resolveTemplate(AgentDefinitionModel.TemplateReference templateReference, String getParentDeploymentId, org.flowable.common.engine.api.variable.VariableContainer variableContainer) -
createExpression
protected static org.flowable.common.engine.api.delegate.Expression createExpression(String expression, AgentEngineConfiguration agentEngineConfiguration) -
getOperation
public static AgentDefinitionModel.AgentOperation getOperation(AgentDefinitionModel agentDefinitionModel, String operationKey) -
hasDefaultBehavior
-
getSupportedMimeTypes
-
handleAgentInvocationResponse
public static void handleAgentInvocationResponse(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, AgentInvocationContext agentInvocationContext, AgentInstanceEntity agentInstance, AgentInvocationResultResponse resultResponse, boolean storeInteractionsAsHumanContent) -
auditAiInvocation
public static AgentInvocationEntity auditAiInvocation(AgentEngineConfiguration engineConfiguration, AgentInvocationContext agentInvocationContext, AgentInvocationResultResponse.Invocation aiInvocation, boolean storeAsHumanContent) -
auditAiInvocation
public static AgentInvocationEntity auditAiInvocation(AgentEngineConfiguration engineConfiguration, AgentInstance agentInstance, String agentInvocationId, AgentInvocationResultResponse.Invocation aiInvocation, String userId, boolean storeAsHumanContent) -
processExchangeMessages
protected static AgentInvocationEntity processExchangeMessages(AgentEngineConfiguration agentEngineConfiguration, AgentInvocationContext agentInvocationContext, boolean storeInteractionsAsHumanContent, AgentInvocationResultResponse resultResponse) -
createAgentEngineTimerJob
-
calculateDueDate
-
handleAgentInstanceCallback
public static void handleAgentInstanceCallback(AgentInstance agentInstance, AgentInvocationResult agentInvocationResult, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
handleAgentInstanceCallback
public static void handleAgentInstanceCallback(String callbackId, String callbackType, AgentInvocationResult agentInvocationResult, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
createAsyncJob
public static void createAsyncJob(AgentEngineConfiguration agentEngineConfiguration, AgentInstance agentInstance, String jobHandlerType, com.fasterxml.jackson.databind.JsonNode jobConfiguration, boolean exclusive) -
createAsyncJob
public static void createAsyncJob(AgentEngineConfiguration agentEngineConfiguration, String agentInstanceId, String tenantId, String jobHandlerType, com.fasterxml.jackson.databind.JsonNode jobConfiguration, boolean exclusive) -
scheduleTriggerJobIfNeeded
public static void scheduleTriggerJobIfNeeded(AgentInstance agentInstance, org.flowable.common.engine.impl.interceptor.CommandContext commandContext, String customValues) -
scheduleTriggerJobIfNeeded
public static void scheduleTriggerJobIfNeeded(AgentInstance agentInstance, org.flowable.common.engine.impl.interceptor.CommandContext commandContext, String jobHandlerType, String configuration, String customValues)
-