In this Topic Hide
ATS Bus is able to transfer file attachments between bus stops using the ProcessOperationsSchedule and ProcessOperationsPerformance messages.
File attachments are not embedded in the bus message but travel via a separate bus - the NServiceBus DataBus. NServiceBus temporarily stores the file in a shared location that can be accessed by all bus stops.
During the file transfer the file data is temporarily stored in a shared folder that can be accessed by all bus stops. It can be set in Cockpit in the NServiceBus settings in Cockpit (see here).
Each bus stop stores the attachments it receives in its program data directory. This directory is created when the bus stop starts. It can be found in the following location:
C:\ProgramData\Applied Tech Systems\<BUSSTOPNAME>
This directory must be shared because a windows drive name cannot be shared over the network and sharing it allows the bus stop to create a valid URL so that the attachment can be shared with peers listening on the other end of channel messages.
To upload attachments to the bus or download attachments from the bus you need an OT message definition containing Attachment type fields. The message definition can then be applied to a channel message so that specific tags can be assigned to it.
Create an OT Message Definition containing attachments as follows:
1. Select the OT Bus Stop tab.
2. Click Messages.
A list of the existing message types is shown.
3. Click Add.
A new window opens.
4. Enter a name for the message definition.
5. Select a message direction:
o Upload from equipment.
o Download to equipment.
6. Enter a description in the default language.
7. Select the Fields tab.
8. Click Add.
A new window opens.
9. In the Class Type drop-down list select Attachment.
10. Select a Data Type. This specifies the data format.
11. Select a Name from the drop-down list. This could be one of the following:
o Attachment ID (mandatory)
o URL (only allowed when FilePath, FileName are absent)
o FilePath
o MimeType (mandatory)
o FileName (if provided, either FilePath or Content must be provided, not both)
12. If required enter an Index for the message field. The index is required as more than one attachment can be included in the message. Alternatively, enable Index filled by tag. This will create an index value from the tag.
13. Enter a Description in the default language.
14. Click OK.
The field is added to the message definition.
15. Click Save.
The message definition is saved.