_Block_

For each Template one or two _Block_ elements must be present. A _Block_ element has this attribute:

Attribute Description
condition This attribute must have the value “gen:norepeat” if the elements in the block apply to all different instances that make up the context message.

A Template element has this sub element:

Element Description
Any

A number of XML elements. Those elements can have 1 level of sub elements. Within the elements, placeholders can be used. Placeholders are identified by “#” around a string, for example #tablename#. In the Mappings element those placeholders are mapped to a real value.

Elements that have a sub level and are in a block that does not have the “gen:norepeat” condition, can have these attributes:

  • INFOR_CONTEXT_ARRAY=”true” – use this attribute if the XML to JSON conversion (see …) must create a JSON array although there is only one occurrence.
  • post_process=”some.function” – use this attribute to specify a function (from the FunctionHook or a linked library) that must be processed after the element is created. You cannot pass additional arguments to this function. One argument is passed: the node that just was created at runtime.
Example:
<Template condition="gen:data">
  <_Block_ condition="gen:norepeat">
	   <screenid>#screen.id#</screenid>
  </_Block_>
  <_Block_>
	   <entities INFOR_CONTEXT_ARRAY="true" post_process="post.process.entities">
	     <entityType>#tablename#</entityType>
	     <key>#key#</entityType>
	   </entities>
   </_Block_>
</Template>