In the basic expansion of the DataElement, the standard operations for manipulating the DataElement and for retrieving it are made available. If there is a need to add extra functionality, there are at least three options:
- deﬁne a custom method on the Logic Bean, and implement custom handling for this in the pipeline, up to the browser
- deﬁne a task
- deﬁne a command
Although the ﬁrst option is entirely viable, and of course the most ﬂexible, it usually involves quite a lot of work, because one has to add custom code in most layers, in order to make the functionality work.
Compared to Task
A task performs its work based on the information that is available in the data element, that it operates on. A command contains the basic data, that it needs to operate. A command can be send to a speciﬁc instance of a data element, or to the logic bean, if no data element is speciﬁed as a target in the command.
|Has target instance||Boolean that indicates whether the command operates on a specific instance or not|