cancel
Showing results for 
Search instead for 
Did you mean: 

Complex xpath grammar in BPM mapping

former_member207065
Participant
0 Kudos

Dear experts,

I found an odd issue about BPM mapping.

In the task output mapping, for my process context AA_FeasibilityCheckTask, if I write below for it.

My process will be always in error and suspended, the log is

Mapping failed
java.lang.NullPointerException: Content cannot be null

com.sap.mapping.lib.execution.api.exception.TExecutionException: Cannot process assignment

See below

But if I don't use "if else" statement, everything works fine.

I have used "if else" statement for a long time and it always works. But now I really don't know why it doesn't work. It seems the NWDS or BPM server has a bug.

Do you have any idea?

Best regards,

Abe Zhang

Accepted Solutions (1)

Accepted Solutions (1)

former_member207065
Participant
0 Kudos

New line still not work.

Finally I solved it by using function "IF()". My final working expression is below

I know the function "IF()" is deprecated and should be replaced by "if else" statement. But now it looks the recommended "if else" statement isn't stable - sometimes works sometimes not work.

So from now on I will use the stable and deprecated function "IF()" and will never use the recommended "if else" statement.

This issue is abosolutely a bug of SAP BPM. I don't know why it is not fixed for so long time, from NW7.31 until NW 7.5. I feel really disapointed about SAP BPM.

Thank you Marcus for your warm-hearted reply. I think this must have haunted you and every SAP BPM consultant for a long time. I hope my solution can help.

Answers (2)

Answers (2)

0 Kudos

That's crazy. Try new line after last command. Sometimes i had here also an issue. My NWDS 7.50SP10

0 Kudos

Hi Abe,

this works for example:

if (matches(DO_DT_ObjectDataProduct/operation, "C")) then "LS"
else if (matches(DO_DT_ObjectDataProduct/operation, "U")) then "TR"
else if (matches(DO_DT_ObjectDataProduct/operation, "R")) then "BL"
else if (matches(DO_DT_ObjectDataProduct/operation, "D")) then "BL"
else ""

Take care of case-sensitive and one line for "if ... then"

former_member207065
Participant
0 Kudos

Hi Marcus,

Than you for your quick reply.

I tried your suggestion just now:

But it doesn't work. The error log is same.

By the way, my NWDS is 7.50SP07.