Using ShowAndPublishStandardEvent

The interface for publishing standard events from the application is the protected ShowAndPublishStandardEvent() method. This method is comparable to the ShowAndPublishEvent() method (see former section, “ShowAndPublishEvent”), except that the event action is not specified, but the action type at component level is specified.

The interface is as follows:

ppmmm.bl999st00.OrderLine.ShowAndPublishStandardEvent(
		const				  string			      i.actionType,
		domain	    ppmmm.otyp	    i.orderType,
		domain	    ppmmm.orno	    i.orderNumber,
		domain	    ppmmm.line		   i.lineNumber)

The action type is the action for the component. It must always be filled; allowed values are “create”, “change” and “delete”. The event action is not specified explicitly. Instead it is derived from the action type. In this case (because OrderLine is a subcomponent) action type create, change or delete will result in an event having eventAction ‘change'. For a top-level component, the event action will automatically be the same as the action type.

Note: Be aware that a ‘create’ or ‘delete’ on a non-root table row must be published as a ‘change’ on the component. An action on a non-root table does not create or delete the component instance, because the corresponding row on the root table is not created or deleted.

In case of a delete action, only the specified component instance and its parent(s) are published. No deleted child components are published. (We can try to read and add children using action type 'delete'; but that is not logical. It will mean that the event is inconsistent with the Show response!)

In case of a change action, only the specified component instance and its unchanged parent(s) are published. No unchanged (or changed) child components are published.

In case of a create action, any subcomponents of the specified component instance are also published having action type 'create'.

Limitation: you cannot publish changes on multiple component instances together (for example a change of two order lines, or a create on order line 1 + delete on order line 2).

Note: The ShowAndPublishStandardEvent() cannot be used for specific events (such as ‘approve’). The ShowAndPublishEvent() method cannot be used for standard events (‘create’, ‘change’ or ‘delete’).

Regarding filtering, see Filtering Notes