Class JacksonWorkflowDefinitionRegistry

java.lang.Object
ai.mindconnect.workflow.jackson.JacksonWorkflowDefinitionRegistry
All Implemented Interfaces:
WorkflowDefinitionRegistry

public class JacksonWorkflowDefinitionRegistry extends Object implements WorkflowDefinitionRegistry
A WorkflowDefinitionRegistry that lazily loads workflow definitions from JSON files on the classpath.

Workflows are stored under a configurable base directory (default: /workflows) as <workflowId>.json. Definitions loaded from the classpath are cached so each file is only parsed once.

Programmatically registered definitions (via putWorkflowDefinition(java.lang.String, ai.mindconnect.workflow.domain.WorkflowData)) take precedence over classpath files.

Example classpath layout:

 src/main/resources/
   workflows/
     my_import_flow.json
     my_query_flow.json
 
Then: registry.getWorkflowDefinition("my_import_flow") loads and caches /workflows/my_import_flow.json.