Parameters
Entity Parameters are comparable to method arguments. They allow an Entity to react differently depending on the values passed to it. The central Parameter property is valueProcess, which can define the value dynamically through JDito.
Usage with Provider/Consumer
In most cases, Parameters are used together with a Provider/Consumer relationship. After a Parameter has been created, an editable instance of it appears on every Provider of the same Entity. If the Parameter property exposed is set to true, an editable instance also appears on the related Consumers. This allows other Entities to set the Parameter value.
Common use cases
Common use cases include:
conditionProcessof adbRecordContainerorcontentProcessof ajDitoRecordContainer, where Parameters extend the effectiveWHERElogic and provide the criteria the Provider needs for selecting dataafterUiInitof an Entity, for example to preset attributes or ConsumersinitFilterProcessof an Entity, to restrict the datasets initially shownvalueProcessof an EntityField, to preset the field value- usage together with
entitiesfunctions or Entity webservices, where Parameters are used similarly to Consumers in order to provide the required data
In all of these cases, exposed must be set to true if the value is supposed to be assigned by another Entity on the Consumer side.
Parameters can also be used with different Providers. A Parameter value can be set directly on the Parameter itself, through Consumers, or through Providers. This makes it possible to enforce provider-specific behavior, for example by using OnlyActiveOrganisations together with OnlyActive_param.
If a preset should apply to all Providers of an Entity rather than to only one specific Provider, define it directly on the Parameter.
Usage without Provider/Consumer
Parameters can also be used without a Provider/Consumer relationship. In that case, the preset is configured directly on the Parameter. This is commonly used for creating complex objects or data structures that temporarily hold information, for example in reporting scenarios.