BPM server side code throws an exception I can't catch

I am migrating a Client UI customization to a Server side BPM. This customization adds a operation to a Quote using QuoteAsm BO. I am making what appear to be identical calls in the BPM and the UI customization (thru the Adapter though) but in the BPM it is throwing the following message

Cannot manually update the Production Labor Rate in QuoteOpr.
Cannot manually update the Production Burden Rate in QuoteOpr.
Cannot manually update the Setup Labor Rate in QuoteOpr.
Cannot manually update the Setup Burden Rate in QuoteOpr.

But not in the UI.

Here is the code segment from the BPM, OpCode is set earlie, _tsQuoteAsm is the Tableset and Opr is a newly added row to the Tableset.

  String RefreshMsg = "";
  try
  {
    Opr.OpCode = OpCode;
    Opr.OpDesc = ThisOpMaster["OpDesc"].ToString();
    if (Opr.RowMod != "A") Opr.RowMod = "U";
    _boQuoteAsm.Update(ref _tsQuoteAsm);
  }
  catch (System.Exception ex)
  { 
      DebugMsg("Error updating Oper OpCode - " + ex.Message);
  }

The catch NEVER catches the error, instead the BPM exits abruptly.

The code in the UI looks like this

	Opr.OpCode = OpCode;
	Opr.OpDesc = ThisOpMaster[0]["OpDesc"].ToString();
	Opr.RowMod = "U";
	_quoteAsmAdapter.Update();

Which works fine, even thou it is changing the RowMod to U, which failed in the BPM (needed to leave it as A so the zero SysRowID is ok)

Any thoughts would be appreciated. This is driving me crazy.

Also this server is in the cloud running 10.2.500.

Mercer

If you can’t catch it it’s already being caught and handled so maybe event viewer on the server? Hopefully they don’t have an empty catch somewhere (though it does happen…)

It is clear that the Adapter is catching it somehow cause it doesn’t happen with the Adapter.

¯_(ツ)_/¯ jam it through the Db object vs the BO? Not ideal but probably not fields that have dependencies.

Obviously this isn’t all of your code, but are you doing this inside a loop?

This is called as part of an add operation function. Basically add a new Operation then set its OpCode followed by optionally setting the OpStd.

I thought of that and that might be the way around this, but I’d prefer to go thru the BO. Its frustrating that clearly the adapter has some way of preventing the the exception or catching it so it doesn’t throw the message and abort the update.

What screen are you in and what is the full code for this method?

This is part of a customization to Quote Entry - sort of a mini-configurator. It works well as a UI customization but it is way too slow. So I am moving it to the server side using a Quote.Update BPM. The code has been migrated and adjusted to the BPM requirements and it is working really well except for this situation.

Got it. So this is a BPM, but the code snippet you sent does not appear to be the full code. This means we can’t help you understand what is causing the error (or suggest simpler code).