web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Incremental CIL On activating AIF

(0) ShareShare
ReportReport
Posted on by

When I deploy a ModelStore on my production environment for some reason which I don't know my AIF doesn't respond. To get it back to work, I have to Deactivate and then Activate my AIF service.

The thing is on activating the service an incremental CIL will be performed (which takes time). I am wondering why despite I have moved the ModelStore, again it needs to do incremental CIL?

Isn't the ModelStore a compiled version of my codes? Why it needs to be compiled again?

What actions are executing behind the scenes when I activate an AIF service?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You can easily find the answer yourself on the form (AifInboundPort). If you check the clicked method, it calls \Classes\AifPortManager\deployPort. Inside the method it calls AifServiceGenerationMAnager::generateServices for inbound ports, where you have all your answers.

    It passes in the restartServiceHost=true parameter, which if you read the code, will do an Incremental CIL indeed, after the Classes AOT node has been refreshed, to ensure all the latest changes are available for your port.

    There are additional steps carried out as well, it is all available in the sources for you to check.

  • krishna.rao@dax Profile Picture
    3,006 on at

    If you  have done already Full compilation + Full CIL generation in preProduction

    & moved model store to Production.

    In this case no need of Compilation & CIL generation. Only db sync is enough.

    There may be issue in the model store which you are moving, may not compiled/Cil generated

  • Community Member Profile Picture
    on at

    Great explanation Vilmos. 

    The thing is when I deploy the ModelStore on the production environment my AIF service does not respond. Then as I said I have to deactivate/Activate that AIF service which leads to an Incremental CIL on the production. Isn't that risky from your opinion? 

    Do you have any Idea why my AIF does not respond in the first place?

    Secondly as far as I know, Incremental CIL would compile only the objects that were modified since the last incremental compilation. Doesn't the ModelStore come with the latest incremental compilation and the latest modified objects out of the box?

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You can release the modelstore in 2 ways.

    1) Stop all AX AOS instances, import the modelstore, start 1 AX AOS instance, do maintenance tasks (Data dictionary synchronize, refresh AIF service endpoints on the AIFServices form, create new / activate existing AIF ports, change setup, run upgrade scripts, whatsoever), restart maintenance AOS, start all other AOSes

    2) Let AOSes run, import modelstore to temporary schema, when maintenance comes shut down all AOSes, apply the modelstore from the temporary schema to become actual, then you carry out the remaining steps as normal.

    The reason why your AIF ports may become corrupt can be a lot, i.e. if you have compilation or CIL errors, you forgot to stop your AOSes when you release the modelstore, or if something tries to call the AIF port from outside while you have maintenance.

    Typically the issue is related to the last point, so during our maintenance we always ensure that our eCommerce portal, .Net middle-layer that calls AIF services, repoprting and BI servers or anything else which might interact with our AX system are also stopped. This way I can safely release the modelstore, do my changes, and once I am done with the release process, I can start everything back and not worry about failed AIf ports.

    Regarding your second question, I agree that a freshly released modelstore should contain Full CIL, but Microsoft did not want to risk people's negligence on this matter I guess, and sticked an Incremental CIL in there anyway. I cannot question their logic on this, it is better to be safe than sorry :)

  • Community Member Profile Picture
    on at

    Thank you for your detailed information.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans