Try to decide if an external BPM is worth the effort and cost

It would be easier (I think) to call the UBAQ from a client side customization instead of a BPM. You can set any of many different triggers that are available in the client customization.

edit But I supposed if you are try to stop a transaction, that may not work as well. I’m not sure.

technically you can call the dynamic query BO in a BPM, but I’ve never gotten it to work.

I’ve called a standard BAQ from a client customization but not UBAQ. Can you point me to an example post or resource? Thx.

Well, @dhewi talks about it here. However, in your case, since you are just putting a BPM in place and not actually changing the results of the data that comes back (the BPM is going to do it for you right?), I don’t know if it’s any different then just calling the BPM. I’m pretty sure the BPM will still fire.

I am confused now.

  1. If I call the UBAQ from the customization then why do I need to use the BPM?

  2. Is the c# code example you provided for the BPM or Customization script?
    I am also confused as to why I need to reference and bind a grid.

I have a UBAQ have two parameters the sales order number and new price line and updates accordingly.

I read in previous post that you will have to bind the UBAQ to a dashboard grid before you can use it. This sounds very complicated. Maybe I just need to update the record using LINQ. Wow?

The BPM is on the Ubaq. It’s not a UBAQ like you would normally expect, it’s one where you select Advanced BPM Update only. Then you put the BPM in there. That BPM can do work for you. You can pass in some parameters to get information that you need to help in that BPM. Then you can call BO’s in there.

You can add the Invoke BO Method Widget and then select Invoke Ice.DynamicQuery.ExecuteByID and\or Update

2 Likes

When you run the UBaq, the results are stored in the adapter, I run them and use the results to feed BO’s on my customizations without displaying the grid. But in your case, when you just want to be able to call both BO’s in one BPM, you can run a query to get the info from the Quote, then run the sales order BO to set the prices on the sales order line. That way you don’t have to run both the Quote and Sales order BO in one BPM, which is what is giving you problems.

Or try what @danbedwards suggests and try to run the DynamicQuery BO in your original BPM.

Brandon this very Back To The Future heavy.

So, do I understand you correctly:

  1. Create a BAQ. But use the Advanced BPM Directive Configuration option.

  2. In the Updateable BAQ Method Directives - Add a Post-Processing method.

    a. In this Post-Processing method add the BO Caller block widget to update the Sales Order Price line.

  3. In my BPM (for Quote Update when the price changes) call the BO to run dynamic query. Which will run the BAQ and automatically run the BPM (BO to update the Sales Order Price).

1 Like

right. The goal is to separate the BO’s because the quote and sales BO don’t play nice together.

I will start working on coding together this flex capacitor design tomorrow. I will keep you posted. :clock7:

Thx.

1 Like

Starting working on this. First test to create a BAQ. But use the Advanced BPM Directive Configuration option. In the BPM, I selected to message box with a query field from the query results. Made sure the BPM was enabled.

Then I ran the BAQ directly with input parameters to query the OrderDtl table. One row was returned but no message box?

Where did you put the BPM?

I think I see what I did, I need to put the Post-Processing BPM in the correct method, I put under the FieldUpdate instead of the GetList. Thanks for the prompt feedback.

1 Like

For the DynamicQuery BO call, does it matter if I use ExecuteByID or GetByID?

Well the GetByID only allows for the QueryID and returned dataset. So that answers that question.

For test3, I completed the preliminary BPM for the Quote Update to Call the BAQ using the Dynamic Query. I verified I think that when the Quote Line price is change the screen BPM is trigger, and Dynamic Query calls the BAQ. I did this by not specifying a parameter value to the BAQ, to which I received a message of no value is specified. Then I added a BAQ parameter value in the Dynamic Query call and test it again, this time no message is displayed about the value or anything. It should trigger the Special BPM which current has a message set in it.

In addition to the BAQ BPM GetList method, I added the update and it still would not trigger.

When I run the BAQ using the direct UI the BAQ BPM will trigger and display the test message.

Ok, I resolve the first issue, by changing the BO method Dynamic Query for the Quote Update from DynamicQuery.ExecuteByID to GetListByID. Now I see the message. However, I am still having issue setting the parameter values.

I’m trying to pass the parameter from the Quote BPM to the Dynamic Query BAQ. The BAQ required one parameter the QuoteNum. I am setting the following ParamsTableSets using the Set Field Widget(s):

ExecutionParameterIsEmpty = false
BAQID = “BAQ name/id”
ExecutionParameterID = BAQ Parameter Name
ExecutionParameterValue = QuoteNum
ExecutionParameterType = “int”

I attempted to match the trace log when running the BAQ through the interface:

    <parameter name="executionParams" type="QueryExecutionDataSet">
      <QueryExecutionDataSet xmlns="http://www.epicor.com/Ice/300/BO/DynamicQuery/QueryExecution">
        <ExecutionParameter>
          <ParameterID>BAQParamQuoteNum</ParameterID>
          <ParameterValue>7280</ParameterValue>
          <ValueType>int</ValueType>
          <IsEmpty>false</IsEmpty>
`