Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

appl class or object

(1) ShareShare
ReportReport
Posted on by 793
Hello,
 
IN different places in AX 2012 I see reference to this object
 
for instance standard class AifInboundPort
 
 

public void updateServiceHostStatus()

 

{

 

    // If the map is null, then the IL appDomain does not exist and services are not available

 

    serviceStatusMap = appl.getServiceHostStatus();

 

}


what is appl object? I need to check what's inside getServiceHostStatus() method. Pressing F12 doesn't give anything. It can't find it saying /Cannot navigate to definition/.
 
Thanks.
  • Martin Dráb Profile Picture
    232,011 Most Valuable Professional on at
    appl class or object
    This is a completely different question than "what is appl object?". Please create a new thread for the other topic (and verify the answer here if the original question has been answered).
  • dark_knight Profile Picture
    793 on at
    appl class or object
    Hi Martin. Thanks. Hope you are doing fine. I have very strange problem. I have 2 AOS instances and there if a standard form called AifInboundPort. When I stop or start service on one AOS instance and then reopen this form on another AOS instance sometime this started/stopped service is shown as faulty. Howerevre port is deployed. I see this happens here 
     
     

    boolean isPortRunning(AifInboundPort port)

     

    {

     

        str serviceTypeName, status;

     

        boolean isPortStarted = false;

     

    #Aif

     

     

     

        if (port.Deployed)

     

        {

     

            serviceTypeName = strFmt('%1.%2', #DotNetServiceNamespace, port.Name);

     

     

     

            // If the map is null, then the IL appDomain does not exist and services are not available

     

            if (serviceStatusMap && serviceStatusMap.exists(serviceTypeName))

     

            {

     

                status = serviceStatusMap.lookup(serviceTypeName);

     

                isPortStarted = strStartsWith(status, openedCommunicationStateName);

     

     

     

                if (isPortStarted)

     

                {

     

                    // A status for the listener is returned only for an MSMQ port

     

                    status = this.getMSMQListenerStatus(port.Name);

     

                    if (status != '')

     

                    {

     

                        // For an MSMQ port, the queue listener status should be checked too

     

                        isPortStarted = strStartsWith(status, openedCommunicationStateName);

     

                    }

     

                }

     

            }

     

        }

     

     

     

        return isPortStarted;

     

    }


    this line - if (serviceStatusMap && serviceStatusMap.exists(serviceTypeName))


     

    serviceStatusMap doesn't contain my newly started/stopped service and therefore is shown as faulty on another AOS instance. isPortStarted is returned as false.

     

    map is generated here

     

    serviceStatusMap = appl.getServiceHostStatus();

     

    it is called form executequery() method of the main form datasource inside method    element.updateServiceHostStatus();



    public void executeQuery()


    {


        super();


        // Get the updated port status


        element.updateServiceHostStatus();


    }


     

    This happens from time to time. Sometimes it works fine, I start/stop port on one AOS instance and then check the same form on another AOS instance and it looks good. I think this is glitch or bug. I don't understand why sometimes serviceStatusMap contains my newly stopped/started service and sometimes not. Also this happens with all ports. Not only with particular one.


     
  • Verified answer
    Martin Dráb Profile Picture
    232,011 Most Valuable Professional on at
    appl class or object
    appl is a special global variable holding an instance of Application class. It's always available, it's located on server tier and it represents the whole application. There is also a similar global variable on client: infolog.
     
    System classes aren't implemented in X++ and therefore you can't see their code. You'll find them under System Documentation node in AOT.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans