‘links’ Structure

The 'links' structure is a list of activities linked to the current activity.

Links may point to the activities existing prior to the current transaction or added in the current transaction.

  • If a link cannot be added, a warning is issued and the activity is still handled normally

  • If a link to the specified activity already exists, nothing happens

  • If a link to the specified activity of another type exists then the existing link is erased first (e.g. there is a Start After link and a Start Together link is added)

  • For 'cancel_appointment' commands, links will be ignored

The 'links' structure consists of an array of the following optional structures (at least one must be present):

'links' structure elements

Name

Type

Description

erase_links

struct

array of 'link_type' elements defining the link type to be deleted for the activity

If the 'erase_links' structure contains no 'link_type' elements, all existing links of the activity are deleted.

link

struct

element containing the data of the link to be created between two activities

Note: this element is used instead of the obsolete 'link_start_after' and 'link_start_together' elements

link_start_together

struct

element that contains details of another activity that will start simultaneously with the current activity

Note: obsolete element replaced with the 'link' element, however, still used for backward compatibility

link_start_after

struct

element that contains details of another activity that will start before the current activity

Note: obsolete element replaced with the 'link' element, however, still used for backward compatibility

'erase-links' structure elements

Name

Required Type

Description

link_type

No

string

label of the link type to be deleted. All links of the same type will be deleted.

Note: Each directed link has two labels. If the 'erase_links' structure contains only one label, only one direction of the link will be deleted.

'link' structure elements

Name

Required

Type

Description

appt_number

The fields need to correspond to the key fields mentioned in section 4.1.1.1

string

ID of the activity to be linked to the current activity in the client system

customer_number

name

link_type

string

label of the link type. The 'from' and 'to' type labels are acceptable.

Note: for segmentable activities, only 'related', 'same-resource' and 'different-resources' link types are supported.

min_interval, max_interval

No

int

minimal and maximal time interval between two linked activities. This parameter should be present or absent depending on the selected link type.

  • 'links' Structure Example

<appointment> 
	<appt_number>A</appt_number> 
	<links> 
		<erase_links/> 
		<link_start_after> 
			<appt_number>B</appt_number> 
		</link_start_after> 
		<link_start_together> 
			<appt_number>C</appt_number> 
		</link_start_together> 
		<link> 
			<appt_number>D</appt_number> 
			<link_type>related</link_type> 
		</link> 
		<link> 
			<appt_number>E</appt_number> 
			<link_type>clone of</link_type> 
		</link> 
		<link> 
			<appt_number>F</appt_number> 
			<link_type>start-after</link_type> 
			<min_interval>10</min_interval> 
			<max_interval>60</max_interval> 
		</link> 
		<link> 
			<appt_number>F</appt_number> 
			<link_type>start-together</link_type> 
		</link> 
	</links> 
</appointment>