BPM not setting Generate Suggestions to False when Runout = True

Hi guys,

I found an older BPM we had enabled that doesn’t seem to be working. When Runout = TRUE, it’s supposed to change the PartPlant.GenerateSugg field to FALSE. I put a message box which pops up when I set RunOut = TRUE, so the BPM is catching the condition.

Seems like a simple one, and since the ttPartPlant is in the Set Field widget dropdown, I thought it should work. My BPM crib notes mention using a Pre-Processing directive to set fields to the temp table. My widget to set the RunoutDate UD field is working fine when this is triggered…

Ideas? Thanks for the help.


image

Edit - I just did a trace on setting the Generate Sugg = False in Part Entry, and it used the PartImpl business object… I can try a separate BPM on that one, but then I’m confused why Update didn’t work…

  <businessObject>Erp.Proxy.BO.PartImpl</businessObject>
  <methodName>Update</methodName>
  <appServerUri>net.tcp://erpdb2/Pilot/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>5/4/2020 16:50:39:5121300 PM</localTime>
  <threadID>1</threadID>
  <correlationId>9e41b93d-d18f-483f-bfc4-945d09e1d372</correlationId>
  <executionTime total="678" roundTrip="591" channel="0" bpm="0" other="87" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.PartDataSet">
      <PartDataSet xmlns="http://www.epicor.com/Ice/300/BO/Part/Part" />
    </parameter>
  </parameters>
  <paramDataSetChanges>
    <paramDataSet name="ds" useDataSetNbr="0">
      <changedValue tableName="PartPlant" rowState="Modified" rowNum="0" colName="GenerateSugg"><![CDATA[False]]></changedValue>
    </paramDataSet>
  </paramDataSetChanges>
  <serverTrace>
    <Op Utc="2020-05-04T20:50:39.7123638Z" act="Erp:BO:Part/PartSvcContract/Update" correlationId="9e41b93d-d18f-483f-bfc4-945d09e1d372" dur="581.061" cli="132.29.200.97:57843" usr="redacted" machine="redacted" pid="7032" tid="47" xmlns="">
      <BpmCustomization Source="DB" BpMethodCode="Erp.PartPlant" Type="In Transaction Trigger" Duration="33">
        <BpmDirective Type="0" ID="4c7b248b-605b-4624-9df7-7cb7ad63a5bc" Name="CL-PARTPLANT" VisibilityScope="0" Duration="33" />
      </BpmCustomization>
      <BpmCustomization Source="BO" BpMethodCode="Erp.Part.Update" Type="BO Customization" Duration="0">
        <BpmDirective Type="1" ID="ae36941c-1350-4f6e-9eab-b6923af4f6f6" Name="RunOutMRPPOSugg" VisibilityScope="0" Duration="0" />
        <BpmDirective Type="1" ID="bac60613-e4a7-469e-b5ad-07725527fd99" Name="PartTypeCodeChange" VisibilityScope="0" Duration="0" />
      </BpmCustomization>
    </Op>
  </serverTrace>
</tracePacket>

That BPM will not work, because when you update the PART table, the PartPLANT table is not being updated at the same time. Therefore, there will not be a “changed row” in the partplant to update.

In order to do what you want, you really should do a post-processsing update that also does the update on the PartPlant.

Tim - Thanks! I’ll give that a try.

You will probably need to call a Method Part.UpdateExt to do the update.

@timshuwy - Thank you. I’ll give that a try. How can I learn that UpdateExt is needed, when the trace shows PartImpl?

I found this:

Should I try this to keep everything in one BPM, or would I still need to do a separate Post with UpdateExt to change the PartPlant fields?

Thanks again!

to be 100% correct, you should do the UpdateEXT in a post processing BPM. You can trigger the post processing BPM based on events in the PRE processing.