So, what is MHAX?
- MHAX stands for material handling equipment interface (MHAX) and it is used to connect external physical material handling (MH) systems to an actual warehouse that is managed by warehouse management processes (AWM) in Microsoft Dynamics 365 Supply Chain Management.
From an architecture side:
- The interface between the WMS and MH systems consists of two queues: one for outbound events (WMS to MH) and one for inbound events (MH to WMS).
1. D365SCM MHAX generates outbound events based on work lines that are created during various work creation and execution processes in D365 SCM AWM. Such are queued in the outbound queue and wait for being picked up.
2. The MH system connects to the MHAX service and then regularly pulls from the outbound queue in D365SCM AWM for new events.
3. After the MH system has finished handling the events in accordance with work instructions, it connects with the MHAX service again and sends inbound events to D365SCM AWM, such as work line completion and short picking.
--> Those events are immediately processed by the queue processor.
--> Based on the inbound event data, the queue processor might run existing work, modify it, or create new work.
Setup and Configuration:
MHAX parameters: I specified with which userID/AWM worker, my work gets processed and stamped when work is completed via MHAX. I also specified with disabling the "enable inbound message ID" flag that MHAX can send duplicate messageIDs.
Subscription in MHAX:
Subscription map:
Set up of AAD application in D365SCM (required for Postman later)
Postman configs:
Authentication Post Request:
Headers:
Body:
ReadOutboundSubscriptionQueue Post Request:
Post: https://{{OdataEnvironmentUrl}}/api/services/WMHEServices/WMHEService/readOutboundSubscriptionQueue
Authorization:
Header:
Body:
ExecuteInboundTransactionWorkConfirm:
Post: https://{{OdataEnvironmentUrl}}/api/services/WMHEServices/WMHEService/executeInboundTransaction
Authorization:
Header:
Body: (containing body content for the below demonstration)
Demonstration:
I created a sales order for item A0001and a quantity of 5 for my warehouse 24:
I manually reserved the quantities under Lines/Inventory/Reservation: (required as we have manual reservations configured)
I released the order to the warehouse for processing:
The wave batch job is created (wave template is set up to run in batch) and shipment has been created – after the batch job ran, the warehouse work is created – See under warehouse/work details on the lines:
See below the work that has been created:
Lets take a look at MHAX outbound queue – 2 lines have been added for pick and put work in status "ready". The data fields is matching our mapping set up on the subscriptions in the MHAX Module.
I am using Postman for the post requests and to mimic the role a middleware would play. First, I will run the authentication post request to retrieve an bearer access token.
Secondly, I am sending the below post request to retrieve the 2 work lines with its data fields in the MHAX outbound queue.
JSON retrieved for the above example:
[
{
"$id": "1",
"data01": "68719518049",
"data02": "USMF-000000005",
"data03": "USMF-000767",
"data04": "",
"data05": "5",
"data06": "A0001",
"data07": "pcs",
"data08": "",
"data09": "",
"data10": "",
"OutboundQueueId": "USMF-000000007",
"TransactionType": "WorkCreation",
"InventLocationId": "24",
"Payload": "Forest Wholesales",
"SubscriptionId": "Warehouse Automation"
},
{
"$id": "2",
"data01": "68719518048",
"data02": "USMF-000000005",
"data03": "USMF-000767",
"data04": "",
"data05": "5",
"data06": "A0001",
"data07": "pcs",
"data08": "",
"data09": "",
"data10": "",
"OutboundQueueId": "USMF-000000008",
"TransactionType": "WorkCreation",
"InventLocationId": "24",
"Payload": "",
"SubscriptionId": "Warehouse Automation"
}
]
Checking now my MHAX outbound queue in D365SCM, I can see that the status changed from ready to sent.
Lets assume MHAX equipment such as a warehouse robot did its magic now and picked the items at location A and put it to location B. In that case, the middleware will need to send back an update to the MHAX inbound queue.
For the below, the middleware actually send back a post request with an invalid license plate number (license plate number is already used/existent). This is sending and logging an error. (what we expect/hoped for)
You can see the error in postman but also in the error log in D365SCM - See below under error log:
The error log message shows:
Let's assume I fixed the data issue and resend the message via Postman with a new LP (I could also reprocesses via reprocess job in D365FO - see below):
Now, a processed inbound queue line is created in the MHAX inbound queue form and the warehouse work in D365SCM is updated for both pick and put work.
See below "Closed" work lines now:
Comments