CMMN Json condition expression

Hi!

Does anyone have any experience with CMMN conditions?

I’m trying to use json string data in ifPart contions:

     <sentry id="sentry_1" name="sentry_validated">
        <ifPart id="ifPart_1">
          <condition id="condition_1" language="javascript">${!'validated'.equals(JSON.parse(json).role)}</condition>
        </ifPart>
      </sentry>

But JSON is unknown identifier here.

Spin does not look to work too:
${‘validated’.equals(S(json).prop(‘role’).stringValue())}

Thanks!

Found my problem, Spin plugin was not integrated.

This link was helpful: Could not resolve function 'S'

I think what you’re saying here is that you need to include the Spin classes as dependencies in your deployment, right? In other words, Spin needs to be in the Maven pom.xml file as a dependency, though it doesn’t necessarily have to have a “compile” scope if it’s already available in the application server. Your particular configuration will dictate how this is handled.

Yes, it works automatically when deployed to server but to run and use the “spin” in junit test, additional spin dependencies and configuration was required.