Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing new rules should not result in queries to ER #551

Open
e-pettersson-ericsson opened this issue Mar 21, 2023 · 0 comments
Open

Testing new rules should not result in queries to ER #551

e-pettersson-ericsson opened this issue Mar 21, 2023 · 0 comments

Comments

@e-pettersson-ericsson
Copy link
Member

Description

The TestRules feature sends a real request to ER to find upstream events, and completely ignores the provided set of Eiffel events provided by the user. Only the start event and downstream events are taken into account in the TestRules engine, and if the user included any upstream historical events these are ignored.

https://github.com/eiffel-community/eiffel-intelligence/blob/0b865120ca16a36c121e35b557b7903ce2769039/wiki/running-rules-on-objects.md

The query to ER is also faulty, because all of the provided test events are suffixed with the rules 'TemplateName' field to the UUID - so the request will always fail because no such events exist in ER.

private void addTemplateNameToIds(JSONObject jsonObject, final String suffix) throws JSONException {

Motivation

The purpose of TestRules is to test a new ruleset, to see if they aggregate event data in the expected format. A real query to ER should not be performed. Instead all of the test events provided by the user should be used, and only those events. The user is expected to provide all necessary Eiffel events for the Testrules.

Exemplification

If the provided Eiffel events are used for the test rules engine, all the data should already be present for the rules engine to generate an aggregation.

Benefits

Without an upstream search to ER for historical events, the resulting aggregation should be be visible for the user quickly, so they can make adjustments to the ruleset if needed.

Possible Drawbacks

The provided Eiffel events from the user might need to be validated to ensure the links are set up properly between the events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant