Say an action mostly just wants to call a Rules API (like Env.AddRule). Writing a bunch of Javascript that mostly just offers an ugly, embedded JSON object and associated API call is distasteful. Instead, provide an action interpreter that can call the core APIs with an explicit JSON object representation that uses the (silly) notation "??..." to request a logic variable interpolation for bindings given to the action. Also support an optional code property with a Javascript value that can expand the action's bindings.
Say an action mostly just wants to call a Rules API (like
Env.AddRule
). Writing a bunch of Javascript that mostly just offers an ugly, embedded JSON object and associated API call is distasteful. Instead, provide an action interpreter that can call the core APIs with an explicit JSON object representation that uses the (silly) notation"??..."
to request a logic variable interpolation for bindings given to the action. Also support an optionalcode
property with a Javascript value that can expand the action's bindings.For example