Class NontransactionalAgentInvocationContext
java.lang.Object
com.flowable.agent.engine.impl.runtime.invocation.BaseAgentInvocationContext
com.flowable.agent.engine.impl.runtime.invocation.NontransactionalAgentInvocationContext
- All Implemented Interfaces:
AgentInvocationContext
An implementation of the
AgentInvocationContext interface that is used to invoke agent operations
when there is no database transaction active (as to not block the database transaction).
Instead of using runtime data, this one is based on a JSON document.
When an agent operation for example needs to be executed outside a transaction, the operation call is 'prepared'
up to the point that the invocation can happen, and then everything is stored in a JSON document.
Later on, the JSON is then used to execute the call without blocking the database transaction.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.flowable.agent.engine.impl.runtime.invocation.AgentInvocationContext
AgentInvocationContext.MediaItem -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected AgentDefinitionModelprotected AgentInstanceprotected booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected final com.fasterxml.jackson.databind.node.ObjectNodestatic final Stringprotected List<KnowledgeBaseDefinition> protected List<AgentInvocationContext.MediaItem> static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Collection<String> Fields inherited from class com.flowable.agent.engine.impl.runtime.invocation.BaseAgentInvocationContext
agentEngineConfiguration -
Constructor Summary
ConstructorsConstructorDescriptionNontransactionalAgentInvocationContext(AgentEngineConfiguration agentEngineConfiguration) NontransactionalAgentInvocationContext(AgentEngineConfiguration agentEngineConfiguration, com.fasterxml.jackson.databind.node.ObjectNode jsonNode) -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.node.ObjectNodegetMedia()protected StringgetProperty(String propertyName) voidsetAgentDefinitionModel(AgentDefinitionModel agentDefinitionModel) voidsetAgentInstance(AgentInstance agentInstance) voidsetAgentOperationKey(String agentOperationKey) protected voidsetCreationTime(Date creationTime) voidsetEventCompletion(String eventDefinitionKey, String eventCorrelationKey) voidsetInvocationId(String invocationId) voidsetKnowledgeBaseDefinition(KnowledgeBaseDefinition knowledgeBaseDefinition) voidsetKnowledgeBaseDefinitions(List<KnowledgeBaseDefinition> knowledgeBaseDefinitions) voidsetOutputSchema(String outputSchema) voidsetParentDeploymentId(String parentDeploymentId) protected voidsetProperty(String propertyName, String value) voidsetSystemMessage(String systemMessage) voidsetTenantId(String tenantId) voidsetUserGroupKeys(Collection<String> groupKeys) voidvoidsetUserMessage(String userMessage) static com.fasterxml.jackson.databind.node.ObjectNodetransformToNonTransactionalJson(AgentInvocationContext invocationContext, AgentEngineConfiguration agentEngineConfiguration) Methods inherited from class com.flowable.agent.engine.impl.runtime.invocation.BaseAgentInvocationContext
invoke
-
Field Details
-
jsonNode
protected final com.fasterxml.jackson.databind.node.ObjectNode jsonNode -
INVOCATION_ID
- See Also:
-
CREATION_TIME
- See Also:
-
AGENT_INSTANCE_ID
- See Also:
-
AGENT_DEFINITION_ID
- See Also:
-
AGENT_OPERATION_KEY
- See Also:
-
AGENT_OPERATION_OUTPUT
- See Also:
-
AGENT_OUTPUT_SCHEMA
- See Also:
-
KNOWLEDGE_BASE_DEFINITION_IDS
- See Also:
-
USER_MESSAGE
- See Also:
-
SYSTEM_MESSAGE
- See Also:
-
TENANT_ID
- See Also:
-
USER_ID
- See Also:
-
PARENT_DEPLOYMENT_ID
- See Also:
-
USER_GROUP_KEYS
- See Also:
-
MEDIA
- See Also:
-
MEDIA_NAME
- See Also:
-
MEDIA_MIME_TYPE
- See Also:
-
MEDIA_DATA
- See Also:
-
MEDIA_CONTENT_ITEM_ID
- See Also:
-
EVENT_DEFINITION_KEY
- See Also:
-
EVENT_CORRELATION_KEY
- See Also:
-
agentInstance
-
agentInstanceLoaded
protected boolean agentInstanceLoaded -
agentDefinitionModel
-
knowledgeBaseDefinitions
-
userGroupKeys
-
media
-
-
Constructor Details
-
NontransactionalAgentInvocationContext
-
NontransactionalAgentInvocationContext
public NontransactionalAgentInvocationContext(AgentEngineConfiguration agentEngineConfiguration, com.fasterxml.jackson.databind.node.ObjectNode jsonNode)
-
-
Method Details
-
getInvocationId
-
setInvocationId
- Specified by:
setInvocationIdin classBaseAgentInvocationContext
-
getCreationTime
-
setCreationTime
-
getAgentInstanceId
-
getAgentInstance
-
setAgentInstance
- Specified by:
setAgentInstancein classBaseAgentInvocationContext
-
getAgentDefinitionModel
-
setAgentDefinitionModel
- Specified by:
setAgentDefinitionModelin classBaseAgentInvocationContext
-
getAgentOperationKey
-
setAgentOperationKey
- Specified by:
setAgentOperationKeyin classBaseAgentInvocationContext
-
getOutputSchema
-
setOutputSchema
- Specified by:
setOutputSchemain classBaseAgentInvocationContext
-
getUserMessage
-
setUserMessage
- Specified by:
setUserMessagein classBaseAgentInvocationContext
-
getSystemMessage
-
setSystemMessage
- Specified by:
setSystemMessagein classBaseAgentInvocationContext
-
getKnowledgeBaseDefinitions
-
setKnowledgeBaseDefinition
- Specified by:
setKnowledgeBaseDefinitionin classBaseAgentInvocationContext
-
setKnowledgeBaseDefinitions
-
getTenantId
-
setTenantId
- Specified by:
setTenantIdin classBaseAgentInvocationContext
-
getUserId
-
setUserId
- Specified by:
setUserIdin classBaseAgentInvocationContext
-
getParentDeploymentId
-
setParentDeploymentId
- Specified by:
setParentDeploymentIdin classBaseAgentInvocationContext
-
getMedia
-
getUserGroupKeys
-
setUserGroupKeys
- Specified by:
setUserGroupKeysin classBaseAgentInvocationContext
-
getEventDefinitionKey
-
getEventCorrelationKey
-
setEventCompletion
- Specified by:
setEventCompletionin classBaseAgentInvocationContext
-
getProperty
-
setProperty
-
getJsonNode
public com.fasterxml.jackson.databind.node.ObjectNode getJsonNode() -
transformToNonTransactionalJson
public static com.fasterxml.jackson.databind.node.ObjectNode transformToNonTransactionalJson(AgentInvocationContext invocationContext, AgentEngineConfiguration agentEngineConfiguration)
-