BPM popup window that user can type in

Two ways come to mind (one might not work because you’re SaaS)

Use an Execute Custom code widget to create the dialog with a text field. Save that text field to a BPM variable. Use that variable in the email widget.
(pretty sure SaaS users don’t have access to Execute Custom Code)

Second method is to use a BPM Form.

  1. Create the BPM form with a text field in it
  2. Add the BPM Form to your BPM
  3. Use the value from the text field in the BMP form in the email widget.

As a SaaS customer, we do have access to the Custom Code Widget:
image

I am not a coder, so I am not sure how to start with custom code.

I probably shouldn’t have mentioned that route as the second is more straightforward.

Making a BPM Form is very simple. Using it takes a little bit of time to figure things out. It’s not complicated, but just not obvious on what to do.

1 Like

Friendly reminder. There are two flavors of SaaS

  • Multi-tenant (legacy, not sold anymore) - no custom code (shared database)
  • Public Cloud (dedicated tenant) - custom code (dedicated database)
1 Like

I have never used BPM Data Form before, but now that I know about it, I have started reading about it in the ICE Tools User Guide.

I opened BPM Data Form Designer:
And added a new Form, Changed the Field Format (to allow for enough text), and I see that it will drop the text into BPMData.Character01.
image

image

I added the Call BPM Data Form widget to the flow and dropped in the callContextBpmData.Character01 into the body of the email

When I run it, I can see the popup window:
image

When I enter the text and click OK, I get a Business Logic Error message.
image

Here are the details from the error message:

System Information

==================

AppServer Connection
Form Name: Sales Order Entry
Customization Name: CURRENT_OrderStagesWithIndustry
Menu ID: OMMT3001
Software Version: 11.2.200.8

============

Business Layer Exception

BpmData form feedback has been received from client but not processed by server code

Exception caught in: Epicor.ServiceModel

Error Detail

============

##!Correlation ID:##! dc277643-5d50-4b82-a4ba-6b9fdfd738f4
##!Description:##! BpmData form feedback has been received from client but not processed by server code
##!Program:##! Epicor.Customization.Bpm.dll
##!Method:##! FinalizeBpmContextUsage
##!Line Number:##! 251
##!Column Number:##! 13

Client Stack Trace

==================
at Ice.Cloud.ProxyBase1.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer) at Ice.Cloud.ProxyBase1.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Cloud.ProxyBase`1.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Erp.Proxy.BO.SalesOrderImpl.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, String& cAgingMessage, SalesOrderDataSet ds)
at Erp.Adapters.SalesOrderAdapter.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, String& cAgingMessage)
at Erp.UI.App.SalesOrderEntry.Transaction.Update()

Do you have any tips to help me move through this?

This is likely your problem: BpmData form feedback has been received from client but not processed by server code - ERP 10 - Epicor User Help Forum (epiusers.help)

Is your method on Update or MasterUpdate?

The method is on Update (not MasterUpdate). We are SaaS so we are on version Kinetic 2022.2.8 (at least in Pilot). The link you sent over indicates that issue was resolved in 10.2.500.8.

Doesn’t mean much, honestly.

Try moving it to MasterUpdate and see if that helps.
(You can copy+paste widgets from one to the other).
Make sure to disable the one on Update before testing.

Does the Call BPM Data Form hold the BPM from progressing until the OK button is pressed on the form, and then allows moving to the next widget?

Or does the BPM move past that step (because it only calls the BPM Data Form, but does not wait for the response)?

I don’t recall, but I believe it should stop everything until OK is pressed.

If it’s progressing anyways, you can put a condition that checks the value of callContextBpmData.ButtonValue.
1111 is default for OK.

It looks like the directive pauses when a Call BPM Data Form occurs:

So disabling the Preprocessing Method directive (Erp.BO.SalesOrder.Update), copying the widgets over to the MasterUpdate (Erp.BO.SalesOrder.MasterUpdate) and enabling the directive in MasterUpdate, the BPM Data form pops up 1 time for the change to the order header (after clicking save), then I enter a comment and click OK, then I get this popup (this is normal):
image
I click yes to refresh the lines and releases, then I get the BPM Data form pop up again. I enter a second comment and click OK.

I don’t get an error, but the BPM runs twice and I get two emails being sent.

and if you are wondering, yes, the directive on Update is disabled.

Ahhh, yeah. That makes sense.
MasterUpdate gets called to save at every level of the order, so by clicking “yes”, it updates the lines and MasterUpdate gets called again for the line-level save.

Maybe you can add a condition before the BPMForm widget that checks to see if RowMod on the header is “U” and only call the BPMForm if true, otherwise do nothing.

Hannah,
I tried your suggestion and it still fired twice (asking for comment twice and sending 2 emails). I suspect that once the lines and releases are updated, the header also gets another update.

This is the condition statement I used directly before the Call BPM Data form widget (a false response to the condition would end without an email).
image

Does your BPM run twice if you don’t even have the BPM form called?

I’m thinking that elsewhere in your BPM you’re changing some data, and that basically means that the MasterUpdate will have to run again. There must be some hidden logic that prevents this from being circularly redundant (i.e. stuck in a loop forever)

edit

for debugging you can leave the widget in the design area, just make the pointers bypass it

Without the BPM Form Called widget, in the Update method only 1 email is created.
Without the BPM Form Called widget, in the MasterUpdate method 2 emails are created.

My BPM has 2 conditions, a bunch of Set Variables, one custom code widget (to look up the salespersons email addresses) and one send email widget.
I don’t think my BPM is changing anything on the record.

That seems to confirm that MasterUpdate calls Update. To really confirm it, ad text in the emails to indicate which BPM the email widget is in. Need to know if two differnt methods are firing, or just the one firing twice.

Reading that thread that @hmwillett referenced, it looks like BPM form causes issues (but only intermittently for some folks) when used in a BO method that is initiated from another BO method.

Calvin,
I am not sure on how to do what you are asking, but I put different comments in the BPM form each time it popped up (those comments come through on the email messages). The Update method is INACTIVE when I make the MasterUpdate method Active. I have never run with both directives active at the same time. The MasterUpdate runs twice, the Update only runs once.