Lexpedite / blawx

A user-friendly web-based tool for Rules as Code.
MIT License
96 stars 9 forks source link

Problem running test in the Scenario Editor using the "any" object selector #561

Closed foxcoleman closed 12 months ago

foxcoleman commented 1 year ago

Click on "everything_test", run the scenario editor, and note the last saved fact ("physical activity activity_A is a any project_type project"). If I run the test as such, I get a "No answers" result. However, if I run the same test for each individual object on their own, I get the correct/expected results.

Note: I wasn't able to upload the .blawx file, so I saved it as a .txt file instead. Let me know if there's a better way of sending this in the future. Thanks!

PhysicalActivitesRegulations.txt

Gauntlet173 commented 12 months ago

when given the fact

{
      "from_ontology": false,
      "type": "true",
      "attribute": "project_type",
      "object": "activity_A",
      "value": {
        "variable": "value"
      }
    }

reasoner.py is placing project_type(activity_A,{'variable': 'value'}) in the encoding, where it should be project_type(activity_A,X) or similar. Problem seems to be with the even_newer_json_2_scasp function.

Gauntlet173 commented 12 months ago

resolved in the issue 543 branch