I am looking at options to denormalize content generated from a normalised schema in squidex. For the users of a CMS it makes sense to provide a normalized view of schemas for them to be able to create content easily. for example any parent child relationship between content where common field values are defined at parent level.
Now, if I need to make this content available in a denormalized format where a single document in elastic search has all the fields to completely descript the child content ie. all the fields of the parent content as well as all the fields of the child content.
One option could be to create an API which does the denormalisation by fetching the content via squidex API and a rule to trigger for ContentChanged for both the schemas ? But that would require running an maintaining an extra API.
Not sure if this could be a generic use case that could be solved within squidex with any existing functionality ?
Yes, I can configure rules on the child content and fetch references. But, when somethings changes on the parent content then I would want to be able to somehow Run the rule for all the referencing content ?
Does squidex support custom rules ? I could try out writing a custom rule which when configured to be triggered on system events would use the squidex api to fetch the references of the content its triggered for and trigger their rule using an api call
I haven’t looked at the implementation of the General API but I found these endpoints: GET/api/apps/{app}/rules PUT/api/apps/{app}/rules/{id}/trigger PUT/api/apps/{app}/rules/{id}/run
So assumed the rules could be triggered via API calls.
The second endpoint works for manual events only.
The third endpoint reruns the whole rule with all events from the past. you would republish all articles, not only the article where the author has changed (as an example).