Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

AifInboundPort on different AOS instances

(0) ShareShare
ReportReport
Posted on by 768
Hello,
 
I have very strange problem. I have 2 AOS instances and there if a standard form called AifInboundPort. When I deploy or undeploy port on one AOS instance and then reopen this form on another AOS instance sometimes this started/stopped port is shown as faulty. However, port is deployed. I see this happens here on the method on the form
 
 

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.

 

 

 

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans