Accessing context object in rules

FirstSprit rules are the only functionality help to implement validations, access control etc. Currently rules are providing limited functionality and most of the time extra development required in the form of "Value Service Modules". So providing extended availability of context could make the FirstSpirit rules to be more powerful and useful.

Here is the idea.


     <OBJECT SOURCE="context.getStoreElement(1).getTemplate()" NAME="OBJ1">

      <OBJECT SOURCE="context.getStoreElement(2).getTemplate()" NAME="OBJ2">









     //do something


Tags (3)
I'm new here

Interesting idea.

I am not sure about what PROPERTY should deliver. Would you expect it to be translated to some method invocation on the source or only allow sources that support some (to be defined) kind of property mechanism?



I'm new here

Thanks Stefan. Method invocation and translation need to be happened and available in the form of property. Then we can use existing rules mechanism to do the rest.

I'm new here

Would be great if (m)any of you guys supporting this feature could provide some real application scenarios on information (properties) access is needed to.

Just as a side note to explain the objective behind the value service: As rules get applied in the Java based SiteArchitect as well as in the Web based ContentCreator, most context objects obviously are not available in the Web environment. The use of value services allows the use of such objects in the application server environment, i.e., providing access to Java objects.

Putting this feature to work means to have some implicit server calls for gaining the requested "property".

I'm new here

Realtime scenarios for context is useful in rules:

1) Maximum and minimum length for the content validations from global settings.

Currently rules accept hard coded value to contrain the content length. Using global settings for such validations will be dynamic.

2) Copying page content to the meta data. Example: Title, Description

3) Copying page input to the section input

Crownpeak employee
Crownpeak employee

Hello Vijay,

with the FirstSpirit version 2020-12 the feature you requested has been implemented.

With the current FirstSpirit version, the rule evaluation (functionality "Dynamic forms") for the ContentCreator and the SiteArchitect has been extended. With the help of the extension, information from other forms (e.g. form data from another page, from metadata forms or from the project settings) can be fetched and used within the current rule execution.

Best regards