BPM Assistance

We want to create a BPM in Order Entry that compares the selling price to the part standard cost. If the selling price is too low, (based on a pre-defined limit), we want a warning message to pop up. Here are the parameters.
If (Stdcost = PartCost.StdLaborCost + PartCost.StdMaterialCost + PartCost.StdMtlBurCost + PartCost.StdSubContCost + PartCost. StdBurdenCost ) > 0 and OrderDtl.UnitPrice > 0 Then
(result = Stdcost/OrderDtl.UnitPrice).
How do we get this into a BPM? Do we use a Method Directive or a Data Directive? ANy help would be greatly appreciated.

A BPM solution should be implemented to monitor a transaction. Method directives go after business object methods while data directives monitor table updates. In this case, I would use an in-transaction data directive BPM on OrderDtl.Update. You’ll want a condition block that checks the logic you described above on the updated row and throw an informational message if it doesn’t conform to your logic.
You could also throw an exception if you don’t want the user to be able to update the table.
Give that a try!

I think @Aaron_Moreng meant

In this case, I would use a method directive BPM on OrderDtl.Update

Instead of

Curious why you would say that?

How do you put an in-trans data directive on a method? They apply to tables.

Agreed. By creating an in-transaction BPM, it’s automatically on the Update method of the table. I think that was clear, but perhaps not…

Ah. Gotcha. Just thought it might be a little confusing since you add a table to monitor on a data directive and never really directly specify or control the method. I will disappear now :slight_smile:

1 Like

It made me rethink how I was explaining it! :slight_smile:

Thanks Dan and Aaron for the replies. Here’s what we are running into. When I follow the instructions from Aaron it only allows to test against an OrderDtl record. The GUI will not allow us to access details from the PartCost table. Is there some way around this?

You’ll have to use the condition “number of rows in the designed query is not less than 1”. When you get into the query designer you can get into other tables and compare them to the TT tables. Set up the query that only returns a row if the problem conditions are me. It can be a little difficult trying to figure out what it’s returning, but if you use the table returns in the a message box, you can see what is getting passed in the TT tables.

1 Like