PublishEvent

The interface for PublishEvent is specified in PublishEvent. Technically, the PublishEvent interface is the same for publishing BODs.

However, when publishing an event for a BOD-type business object:

  • The PublishEvent method will return errors or warnings to the application instead of publishing/logging them. This is done in the result output parameter for errors, and in the information area of the response output parameter for warnings.
  • The eventAction must be a supported BOD verb.
  • You can include BOD-specific controlling data.

The following BOD-specific controlling elements can be used:

  • actionCode: see i.actionCode in ShowAndPublish<Verb>BOD. Note: if i.actionCode is “Replace”, the complete object (including all subcomponent instances) must be included in the data area.
  • documentID: see i.documentId in ShowAndPublish<Verb>BOD..
  • revisionID: see i.revisionId in ShowAndPublish<Verb>BOD..
  • variationID: see i.variationId in ShowAndPublish<Verb>BOD..
  • tenantID: see i.tenantId in ShowAndPublish<Verb>BOD..
  • accountingEntityID: see i.accountingEntityId in ShowAndPublish<Verb>BOD..
  • locationID: see i.locationId in ShowAndPublish<Verb>BOD..

For example:

	<PublishEventRequest>
		<ControlArea>
			<eventAction>Process</eventAction>
			<actionCode>Add</actionCode>
			<documentID>12345</documentID>
			<revisionID/>
			<variationID>2</variationID>
			<tenantID>default</tenantID>
		</ControlArea>
		<DataArea>
			<PurchaseOrderBOD>
				…
			</PurchaseOrderBOD>
		</DataArea>
	</PublishEventRequest>

The elements in the control area are handled as follows:

  • The tags are handled case-insensitively.
  • A warning is returned in the response if an unknown tag exists in the control area. A warning may not be returned if no subscription exists. Known tags are the following standard event tags (eventAction, eventPriority, eventTimestamp, eventTimestampSequenceNr, eventConsumer, eventHasMoreBatches, EventReference, and destination) and the BOD-specific tags (such as actionCode, organizationalPath, documentID, revisionID, and variationID), and the BOD-specific tags (such as actionCode, documentID, revisionID, and variationID).

When specifying incorrect input the following happens:

  • Any of the elements occurs two or more times: this is not reported; one of the values will simply be used; probably the last one.
  • No or an empty value for tenantID or documentID: an error is reported.
  • Empty value for any of the other elements: use the empty value.
  • Incorrect actionCode: this is not verified. The message is simply published using that actionCode; if it is really a problem then ION or the receiving application will report an error.
  • Incorrect value or illegal characters used in documentID, revisionID, variationID, tenantID, accountingEntityID, or locationID: this is not verified. The message is simply published; if it is really a problem then ION or the receiving application will report an error.