Error when using the Lexical Operator in Trigger Filter

Hi ,
I’m facing the following issue when using the below filter condition in my trigger,Any one Could u pls help me in resolving this issue.

(%PO_CANONICAL/PO_HDR_INFO/CANCELLED_FLAG% L_NOT_EQUALS ‘Y’ && %PO_CANONICAL/PO_LINE_INFO/PO_LINE[0]/REQUISITION_ID% L_NOT_EQUALS null && %PO_CANONICAL/PO_LINE_INFO/PO_LINE[0]/REQUISITION_ID% L_EQUALS /^MAXGR/)|| (%PO_CANONICAL/PO_HDR_INFO/CANCELLED_FLAG% L_EQUALS ‘Y’)

I’m getting the error in serverlog as “No condition matches in trigger GE_MaximoGreenville_PurchaseOrder_Target.Triggers:PurchaseOrderTrigger
for document Canonical:PurchaseOrder with activation wm6b51b1440ef5d11dc979690d6b3e17310”

If same filter condition is used as
(%PO_CANONICAL/PO_HDR_INFO/CANCELLED_FLAG% L_NOT_EQUALS ‘Y’ && %PO_CANONICAL/PO_LINE_INFO/PO_LINE[0]/REQUISITION_ID% L_NOT_EQUALS null && %PO_CANONICAL/PO_LINE_INFO/PO_LINE[0]/REQUISITION_ID% == /^MAXGR/)|| (%PO_CANONICAL/PO_HDR_INFO/CANCELLED_FLAG% L_EQUALS ‘Y’)

No error is throwing and it was processing the document.

I’m usin webmethods 6.1

Any one coul pls help me in solving this problem.
Thanks,
K.Kailash

I think this is the part that is the issue:

L_EQUALS /^MAXGR/

I think these are the factors:

  • In the first filter, Broker is applying the filter.
  • In the second, IS is.
  • /^MAXGR/ is a regular expression
  • Broker doesn’t understand regular expressions.
  • IS does.

I may be wrong on one of these points so someone please correct this if I am.

1 Like

Rob,

I believe you’re correct. Also, I don’t believe this expression is valid for lexical operators: L_NOT_EQUALS null. Lexical operators operate on string values only so comparing it to null is not possible last time I checked.

  • Percio

Read the “Publish Subscribe Developers Guide” to find the information that you are looking for.

Hopefully the below points will help in better understanding…

so the question is: is REQUISITION_ID declared as type String?

The REQUISITION_ID is a type of String and the first filter condition is observing on the Broker Administrator as

((PO_CANONICAL.PO_HDR_INFO.CANCELLED_FLAG != “Y”) || (PO_CANONICAL.PO_HDR_INFO.CANCELLED_FLAG == “Y”))writeEndTD(); swapRows();

And i think the problem is also with the document list i.e, PO_LINE[0] can the filter take this type as valid?

I think the syntax for accessing list elements within the filter is covered in the doc?

Kailash,

Broker does understand some regular expressions, but consider expressions invalid if it contains $null or reference to an array field

Hi experts,

I looked thru the docs and read this thread and though I came close I still have no answer to my question:

I want my trigger to subscribe to all docs with a certain string field set to null.
I tried all kinds of stuff (null, NULL, “”, $null, L_EQUALS, ==) but I can’t get it to work.

Obviously it would be best if I could use lexical filters.

Anybody knows how to do the trick?

Thanks,

Loïc

Allrite gents,

I got the correct syntax:

%header/stringList[0]/string% L_EQUALS $null

Obviously only works for the element in question in the string list

Hope it helps out someone someday!

Loic