There are few absolute requirements when it comes to file naming conventions related to integrations. Other than producing unique file names within a directory, you can name files according to any scheme that is useful. When deciding on a file naming convention you might consider its ability to:
- Identify a unique message.
- Classify messages by type.
- Process messages in a specific order.
File naming convention
The following file naming convention satisfies the three criteria mentioned above:
<Processing stage>_<Inbound port>_<Service operation>_<Action>_<Message Id>.xml
Processing stage
In Microsoft Dynamics AX 2012, Application Integration Framework (AIF) generally processes inbound messages in alphabetical order by file name when using the File system adapter. Accordingly, the processing stage prefix can be used to control the order of processing when integration object dependencies exist.
Format: ## (where ## ranges from 00 to 99)
Inbound port
This is the Port name of the Inbound port as defined in:
Service operation
This is the name of the Service operation associated with the Inbound port:
Action
This is the name of the Action associated with the selected Service operation.
Message Id
This is the GUID associated with the XML message.
Example
Starting with AX 2012, importing inventory items requires a 2 step process. The following Service operations are needed.
- EcoResProductService (creates a new product)
- InventItemService (releases the product so it’s available for use)
Notice that messages related to the EcoResProductService service must be processed before messages related to the InventItemService service. Here are the corresponding file names which adhere to the file naming convention described in this article:
00_ItemImport_EcoResProductService_Create_A923D03A-E4F1-F9F2-C912-17C9DEF7D13E.xml
01_ItemImport_InventItemService_Create_A92BB03A-E4F1-F9F2-C912-17C9DEF7D13E.xml