Run AIF inbound and outbound manually

February 17, 2010 at 18:51
filed under AIF, Dynamics AX
Tagged , , ,

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.

Inbound:

static void KlForrunAIFInbound(Args _args)
{
    ;
    // read the messages
    new AifGateWayReceiveService().run();

    // process the messages in queue
    new AifInboundProcessingService().run();

    info("done");
}

Outbound:

static void KlForrunAIFOutbound(Args _args)
{
    ;
    // process messages in queue
    new AifOutboundProcessingService().run();

    // send messages
    new AifGateWaySendService().run();

    info("done");
}

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.

1 comment

RSS / trackback

  1. Gaurav Maheshwari

    How to send response to BizTalk web service URL from AIF Outbound port integration in AX 2012

respond