The everyday life of a Dynamics AX developer
To have AIF import and export message, you have to have 4 batch tasks running (all about it here on TechNet). However, when developing, it is inefficient (and also tad tedious) to wait for those batches.
Here are two jobs to run inbound and outbound messages manually, so you don’t have to wait for the batches to pick them up.
Ofcourse, you can put this code in classes, or combine them so they are executed together. Because inbound messages can trigger outbound messages, it’s better to process the inbound messages before the outbound messages.