callNode method
Implementation
Future<Map<String, dynamic>> callNode({
required String nodeId,
required Map<String, RuleNode> nodes,
required Map<String, dynamic> context,
}) async {
checkLoops();
final node = nodes[nodeId];
if (node == null) {
throw Exception("Node $nodeId not found");
}
// Get resolved input controls
final resolvedInputs = await getResolvedInputControls(node, nodes, context);
// Call the node function
final result = await fireNodeFunction(
node.type,
resolvedInputs,
context,
);
return _castToStringMap(result) ?? {};
}