I have a Post Processing BPM that attached to the Erp.BO.Receipt.GetDtlPOLineInfo method. The purpose of this BPM is to set the Warehouse Code on the Receipt line based on the Workstation ID. It does this by calling the Erp.Receipt.OnChangeDtlWareHouseCode method. It seems to work great in the Classic Client.
However, when triggered from a EKW handheld it is ineffective. I say ineffective because in the server trace log I can see that the BPM runs but it does not change the warehouse on the handheld. If I then open the receipt on in the smart client, the default warehouse is still shown there as well, so it’s not just a handheld display issue.
I expect that the difference in behavior is due to the method being called by REST instead of the smart client, but I haven’t found any documentation that points me to a resolution. Any suggestions?
I think you’re right about the reason. We had a few bpms that ignore orders placed by EDI. We can see the method called alright. As to resolutions we just had to find other triggers and in one case go to a data directive.
@danvoss
To my knowledge, REST vs Smart Client doesn’t sound like the issue here.
Which screen specifically in EKW are you wanting to set the Warehouse on? Can you describe the steps you take, and where in the flow you expect the Warehouse to get set?
When we receive a PO, we could be receiving it in 1 of 2 warehouses. Under standard operation, the receipt will default to the default warehouse/bin for the part. It is my goal to receive this part to the warehouse identified by the WorkstationID of the user.
I have traced the operation in the Client and determined that Erp.BO.Receipt.GetDtlPOLineInfo BO is called when the PO Line is selected and this populates the fields on the Receipt Line Detail, including the Warehouse. If I manually change the warehouse in the client, Erp.Receipt.OnChangeDtlWareHouseeCode is called.
I have created a post-processing BPM on Erp.BO.Receipt.GetDtlPOLineInfo that determines whether Warehouse needs to change and if it does, it calls Erp.Receipt.OnChangeDtlWareHouseCode – essentially replicating the manual steps.
This BPM is working fine in the classic client and the web client, the warehouse code is set appropriately by the BPM after the PO Line is selected.
In EKW the steps I’m testing with are:
PO Receipt
Enter PO Num and Packslip
Click Receive
Click on the part to be received
The Warehouse Code on the Line screen shows the default warehouse code for the part instead of the warehouse code set by the BPM. I have debug code in the BPM that allows me to trace it’s function and that trace information confirms that the BPM did get triggered and run as expected.
Should I expect that a BPM that works in the client will have the same effect in EKW?
It looks like you have setup a BPM on Erp.Bo.ReceiptSvc/GetDtlPOLineInfo, but EKW is actually using Erp.Bo.ReceiptSvc/GetDtlPORelInfo to populate the form.
To help with making BPMs, I find it useful to use the System Log in EKW to view REST calls being made:
Then you can hit the clear button so you can just focus on new calls being made:
I then opened my PO line and re-opened the System Log and pressed to show the debug logs, and I can see the final call is Erp.Bo.ReceiptSvc/GetDtlPORelInfo:
As a sidenote, to assist with maintaining logic like this on different calls, you may want to check the BPM Context on Character20. From EKW version 4.45.0 many calls will provide this info when making REST requests:
Thank for the tips. FWIW, when I added the Character19 value for conditioning, in the Condition widget I had to use “Begins with” to get it to evaluate to True instead of equal to.