top of page
Search

Integrate with third-party MES

Writer's picture: Mariano Martinez MeloMariano Martinez Melo

Today we will describe connecting to an MES (Third Party Manufacturing Execution System). These allow us to connect production orders with plant floor systems, where we can report progress and production times. Here they will enable us to generate methods to register automatically. There are several mechanisms, and we will review them here in this video.


In the video, I describe how to connect to the available methods:





To enable it, we must first verify that we have the Time and attendance license.

that we found it in System administration > Setup > Licenses

In case it is not active, we must put the environment in maintenance mode , enable the time and attendance license, and then disable maintenance mode.


In the event that we need to receive notifications when a production order is released, Dynamics provides us with a business event that allows us to do so, this is the ProductionOrderReleasedBusinessEvent. And in the same way that we carried out the alerts exercise in this post , we will be able to capture and send the alert to the third-party manufacturing execution system.


In the video example, we use an Azure Service Bus ,

  1. To create it from the Azure portal , we go to the All Services > Integration > Service Bus route .

  2. Here we click on Add and create a namespace for our Azure Service Bus. In the Pricing tier part , we choose Standard . This allows us to create only message queues, which is exactly what we need. In the event that the service scales and we need to work with topics or subscriptions (this is one-to-many messaging) we should change the Pricing tier.

  3. With this we give Review & Create and that's it.




Create the messaging queue

  1. Now we are going to create our messaging queue, for this we go to our recently created Service Bus, and click on Queue and then on Create

  2. We go to Shared Access policies, and click on the one called RootManageSharedAccessKey and copy the Primary and Secondary Connection string (connection strings)



Create the app

  1. We go to App Registrations and click on + New Registration. We give it a name and we give it Register.

  2. We open the Application and navigate to Certificates&secrets. Here we are going to create our Application secret, so we click + New Client Secret, give it a description and click Add.

  3. It is IMPORTANT to save the value that it shows us, it is necessary to finish the configuration, it is only shown once .


Create an Azure Key Vault.


We will create a Key Vault to safely store our secret created by the previous step. For it:

  1. In the Azure portal, we go to the route: All services > Security > Key Vaults

  2. We create a new Key Vault in our Resource Group and leave the default parameters

  3. Click on Access Policy

  4. Click on + Add Access Policy and on Configure from template, we choose the Secret Management option. And inside Main, we choose the application ID that we created in the beginning.

  5. The Key Vault will be created and it will show us a URL, we must copy it since we will need it in the next step.

  6. Click on Secrets> Generate/Import. Here we give it a name and paste in the connection String that we copied earlier when we created the Service Bus



Create the Endpoint

  1. Within Dynamics we turn to the catalog of business events. Let's go to the Extremes part and create a new one.

  2. Here we configure the Endpoint where first we are going to tell it what type of endpoint we are going to use here we select Azure Service Bus.

  3. Then we put with a descriptive name

  4. Below we must put the name of the Queue that we created earlier, and the type of service from the service bus at the beginning of this guide, as well as the Application ID.

  5. Finally we load the DNS that we created from Key Vault in the previous step and also the name of the secret that we created in the step of creating the application.

  6. We click OK and it will test the Service Bus. If we want to verify the result we can go to the Azure Service Bus Queue that we created before and see in Message counts that we have the value of 1.

  7. In the same form we go to the business events catalog tab and select the events BusinessEventsAlertEvent and ProductionOrderReleasedBusinessEvent and click + Activate. Then we select the Endpoint that we created in this step.



I hope you can integrate and see you in a new Consejo Dynamics!


75 views0 comments

Recent Posts

See All

Comentarios


bottom of page