cancel
Showing results for 
Search instead for 
Did you mean: 

Using "CP" in Branch Condition in BPM

Former Member
0 Kudos

Hello all, I am struggling to get a BPM branch condition to work and hope it is a simple syntax problem you can help with:

I have created a container variable (xsd:string) to extract the name of a document type from inbound message:

PSPHI = ClaimPayment xpath=/p2:Claim_Payment/PSPHI

New requirement is to use a new mapping for data files where PSPHI starts with "SFM-" and use current mapping where PSPHI starts with "SF-".

I tried adding a BRANCH in the BPM with the Condition = (PSPHI CP "SFM-") but the branch ALWAYS goes to the old mapping (or the ELSE).

I have not used Condition Editor syntax before, and not sure if my syntax is correct.

Any advice is appreciated.

Thank you,

Tadd Bryan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try this in condition editor.

PSPHI CP "^SFM-"

Regards

Venkat

Former Member
0 Kudos

Hi,

You may try PSPHI CP "SFM-*"

Regards,

Beena

Answers (3)

Answers (3)

zameerf
Contributor
0 Kudos

Hi Tadd,

Did you use the Condition Editor?

I could see you have mentioned CP in the condition, rather just open the condition editor window, select the left operand as PSPHI(from Simple Variable drop down list) and select operator as ≈

then enter right operand as SFM-*

Hope this helps..

Regards,

Zameer

Former Member
0 Kudos

Thank you the answer that solved my problem is Condition: PSPHI CP "SFM-*"

After a more through review of the documentation, it does state that "CP" is "matches pattern" and not what I thought which was 'contains pattern.'

CP

Matches pattern

c1 matches pattern c2

To specify pattern c2, you can use normal characters and the following wildcard characters:

* (asterisk) for any string

+ (plus sign) for any single character

Your help is greatly appreciated. Thank you for taking the time to respond to SCN questions!

Former Member
0 Kudos

Hello Tadd,

You should open the condition editor & write the left operand as PSPHL.

Op as =

Right operand as SFM.

Try this one & let me know the reqult.

Regards,
Ashish

nabendu_sen
Active Contributor
0 Kudos

Hi Tadd,

Check with F7, Semantics Check, whether everything is OK or not. Please find the attached screenshot.

Former Member
0 Kudos

Thanks Nabendu for your reply. The syntax of "(PSPHI CP "SFM")" passes the check, but does not do what I expect. I'm not sure my use of Contains Patter (CP) is correct. I believe this is an ABAP syntax, which I do not know about. It seems the result of the condition should be either TRUE or FALSE. I want to return TRUE if PSPHI contains the value "SFM" in the string.