Class JsonWorkflowConfigurer

java.lang.Object
ai.mindconnect.workflow.jackson.JsonWorkflowConfigurer
All Implemented Interfaces:
WorkflowConfigurer

public class JsonWorkflowConfigurer extends Object implements WorkflowConfigurer
WorkflowConfigurer that adds json: expression support to the workflow engine.

After this configurer runs, any string value prefixed with json: is parsed as a JSON literal and the resulting object (Map, List, scalar) is used directly as the variable value. This works in input parameters, AssignVariablesData values, and anywhere else the expression resolver is applied.

Examples:

   json: {"name":"David","age":40}   → Map
   json: ["a","b","c"]               → List
   json: 42                          → Integer
   json: true                        → Boolean
 

The configurer appends the JsonExpressionResolver to an existing CompositeExpressionResolver when one is already installed, or wraps the existing resolver in a new CompositeExpressionResolver if not. If no resolver is set at all, it installs the JsonExpressionResolver directly.

This class has a public no-arg constructor so it can be discovered via ServiceLoader when listed in META-INF/services/ai.mindconnect.workflow.api.execution.WorkflowConfigurer.