cancel
Showing results for 
Search instead for 
Did you mean: 

Expression editor: generic function GET

Former Member
0 Kudos

Hi there,

I want to send an e-mail, that contains context data with cardinatlity 1..n.

My context looks like this:

|- Data Object (1..1)

|---STATUS (1..n)

|----- ApprovedBy (0..1)

|----- ApprovedOn (0..1)

|----- DeclinedBy (0..1)

|----- DeclinedOn (0..1)

|----- DeclinedReason (0..1)

For printing the declining reason in the e-mail, I tried the following:

get(DataObject/Status/DeclinedReason,count(DataObject/Status/DeclinedReason))

This should retrieve the last "DeclinedReason" reason entry, but I get the following log entry:

error commit():Caught exception while dispatching onCommit events: java.lang.NullPointerException

at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:881)

Even get(DataObject/Status/DeclinedReason,1) doesn't work, although count(DataObject/Status/DeclinedReason) returns 1.

Can you tell me how to retrieve the fields of the last STATUS element?

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

index starts from 0.

Former Member
0 Kudos

Cheers, it works now:

get(DataObject/Status/DeclinedBy,(count(DataObject/Status/DeclinedBy) - 1))

I thought, I tried that before

Answers (0)