How to set String flowScope value on-exception literal?

In my Spring web stream application, one of my transitions action-statelooks like this:

    <transition on-exception="com.foo.BarException" to="barView">
        <set name="flowScope.error" value="foo.bar" type="string" />
    </transition>

I would like to set the flowScope.errorString literal "foo.bar" to the literal, but Spring interprets this as a reference to an attribute of the object bar foo. How to make Spring take a string literally?

+5
source share
1 answer

I realized: the value must be enclosed in single quotes:

<set name="flowScope.error" value="'foo.bar'" type="string" />

+9
source

All Articles