Class PlatformAgentService
java.lang.Object
com.flowable.platform.security.service.AbstractPlatformSecurityService
com.flowable.platform.service.agent.PlatformAgentService
- All Implemented Interfaces:
PermissionServiceRegistryAware,Aware
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ActionRuntimeServiceprotected final AgentHistoryServiceprotected final AgentRepositoryServiceprotected final AgentRuntimeServiceprotected final Supplier<org.flowable.common.engine.impl.interceptor.CommandExecutor>protected Integerprotected final tools.jackson.databind.ObjectMapperFields inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
additionalAdminUsers, CASE_PREFIX, cmmnRepositoryService, cmmnRuntimeService, cmmnTaskService, defaultSecurityPolicyKey, defaultSecurityPolicyModel, EXTERNAL_WORKER_PREFIX, inspectEnabled, permissionServiceRegistry, platformSecurityInterceptor, policyRepositoryService, PROCESS_PREFIX, repositoryService, runtimeService, SECURITY_POLICY_MODEL, TASK_PREFIX, taskService -
Constructor Summary
ConstructorsConstructorDescriptionPlatformAgentService(AgentRuntimeService agentRuntimeService, AgentHistoryService agentHistoryService, AgentRepositoryService agentRepositoryService, tools.jackson.databind.ObjectMapper objectMapper, ActionRuntimeService actionRuntimeService, Supplier<org.flowable.common.engine.impl.interceptor.CommandExecutor> commandExecutorSupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected AgentChatMessageResponseconvert(AgentInvocationExchangeChat exchange, AgentInvocationExchangePartChat part) protected Stream<AgentChatMessageResponse>convert(AgentInvocationExchangeChat exchange, Map<String, tools.jackson.databind.JsonNode> preParsedTechnicalContent, Map<String, ActionInstance> prefetchedActionInstances) protected List<AgentChatMessageResponse>convert(List<AgentInvocationExchangeChat> exchanges) protected List<AgentChatMessageResponse>convert(List<AgentInvocationExchangeChat> exchanges, Function<AgentChatMessageResponse, AgentChatMessageResponse> converter) protected List<AgentChatMessageResponse>findSuggestions(AgentInstance agentInstance, SecurityScope securityScope) getAgentChatInstanceResponse(String scopeId, String scopeType) org.flowable.common.rest.api.DataResponse<AgentChatMessageResponse>getAgentChatMessages(String scopeId, String scopeType, org.flowable.common.rest.api.PaginateRequest request) protected AgentInstancegetAgentInstance(String scopeId, String scopeType) getAgentInstanceTimeline(String agentInstanceId) Returns the timeline of a single agent instance (with its invocations, exchanges and parts), ornullwhen the instance has no timeline.getAgentTimeline(String scopeId, String scopeType) protected voidprocessInsertedEntities(tools.jackson.databind.JsonNode technicalContentJsonNode, AgentChatMessageResponse agentInstanceExchangeResponse, String entityKey, String scopeType) protected AgentDefinitionModelresolveAgentDefinitionModel(String definitionId, Map<String, AgentDefinitionModel> modelCache) protected voidThe timeline query only carries the operation key.sendAgentChatMessage(String scopeId, String scopeType, SendAgentChatMessageRequest request) Methods inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
addAdditionalPermissions, currentUserHasAdminRights, currentUserIsSuperAdmin, fetchCasePermissionMappings, fetchCasePermissionMappings, fetchCaseSecurityPolicyModel, fetchPermissions, fetchPermissionsForTask, fetchProcessPermissionMappings, fetchProcessPermissionMappings, fetchProcessSecurityPolicyModel, fetchSecurityPolicyModel, fetchSecurityPolicyModel, fetchSecurityPolicyModelForCaseInstance, fetchSecurityPolicyModelForProcessInstance, fetchSecurityPolicyModelForTask, fetchSecurityPolicyModelForTask, fetchTaskPermissionMappings, fetchTaskPermissionMappings, fetchTaskPermissionMappings, fetchTaskPermissionMappingsForCase, fetchTaskPermissionMappingsForProcess, fetchTaskSecurityPolicyModelForCase, fetchTaskSecurityPolicyModelForProcess, filterPermissionsForRole, getCmmnExtensionElementValue, getCurrentGroupKeys, getCurrentSecurityScope, getCurrentTenantId, getCurrentUserId, getDefaultSecurityPolicyModel, getExtensionElementValue, getSecurityPolicyModelByKey, groupOrUserMatches, groupOrUserMatches, hasAnyMatchingIdentityLink, hasAssigneeOrOwnerIdentityLink, hasPermissionForEntityLinks, hasPermissionForHistoricEntityLinks, setPermissionServiceRegistry, translatePermissionForScope
-
Field Details
-
ALLOWED_SORT_PROPERTIES_EXCHANGE
-
defaultListResponseSize
-
agentRuntimeService
-
agentHistoryService
-
agentRepositoryService
-
objectMapper
protected final tools.jackson.databind.ObjectMapper objectMapper -
actionRuntimeService
-
commandExecutorSupplier
protected final Supplier<org.flowable.common.engine.impl.interceptor.CommandExecutor> commandExecutorSupplier
-
-
Constructor Details
-
PlatformAgentService
public PlatformAgentService(AgentRuntimeService agentRuntimeService, AgentHistoryService agentHistoryService, AgentRepositoryService agentRepositoryService, tools.jackson.databind.ObjectMapper objectMapper, ActionRuntimeService actionRuntimeService, Supplier<org.flowable.common.engine.impl.interceptor.CommandExecutor> commandExecutorSupplier)
-
-
Method Details
-
getAgentChatInstanceResponse
-
getAgentChatMessages
public org.flowable.common.rest.api.DataResponse<AgentChatMessageResponse> getAgentChatMessages(String scopeId, String scopeType, org.flowable.common.rest.api.PaginateRequest request) -
sendAgentChatMessage
public AgentChatMessageDetailResponse sendAgentChatMessage(String scopeId, String scopeType, SendAgentChatMessageRequest request) -
findSuggestions
protected List<AgentChatMessageResponse> findSuggestions(AgentInstance agentInstance, SecurityScope securityScope) -
getAgentInstance
-
convert
-
convert
protected List<AgentChatMessageResponse> convert(List<AgentInvocationExchangeChat> exchanges, Function<AgentChatMessageResponse, AgentChatMessageResponse> converter) -
convert
protected Stream<AgentChatMessageResponse> convert(AgentInvocationExchangeChat exchange, Map<String, tools.jackson.databind.JsonNode> preParsedTechnicalContent, Map<String, ActionInstance> prefetchedActionInstances) -
convert
protected AgentChatMessageResponse convert(AgentInvocationExchangeChat exchange, AgentInvocationExchangePartChat part) -
processInsertedEntities
protected void processInsertedEntities(tools.jackson.databind.JsonNode technicalContentJsonNode, AgentChatMessageResponse agentInstanceExchangeResponse, String entityKey, String scopeType) -
getAgentTimeline
-
getAgentInstanceTimeline
Returns the timeline of a single agent instance (with its invocations, exchanges and parts), ornullwhen the instance has no timeline. Authorization for the instance is expected to be performed by the caller. -
resolveOperationNames
The timeline query only carries the operation key. The human-readable operation name lives in the agent definition model, so we resolve it here (caching the model per definition id). When the name cannot be resolved for any reason (definition gone, operation not found, etc.) we fall back to the operation key. -
resolveAgentDefinitionModel
protected AgentDefinitionModel resolveAgentDefinitionModel(String definitionId, Map<String, AgentDefinitionModel> modelCache)
-