Camunda Assert: "Could not resolve function 'S'."

I want to test my BPMN with Camunda Assert in my Spring Boot Application.

So Spin seems not to be available in the Test.

It works when deploying the BPMN in the Application.

Is there something I have to configure for Camunda testing?

Here is the Stack Trace (Removing the mentioned Expression solved the problem)

06:44:41.794 [main] ERROR org.camunda.bpm.engine.context ENGINE-16004 Exception while closing command context: ENGINE-01009 Error while parsing process. Could not resolve function 'S'.
org.camunda.bpm.engine.ProcessEngineException: ENGINE-01009 Error while parsing process. Could not resolve function 'S'.
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseLogger.parsingProcessException(BpmnParseLogger.java:50)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:265)
	at org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.transformDefinitions(BpmnDeployer.java:105)
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.transformResource(AbstractDefinitionDeployer.java:99)
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.parseDefinitionResources(AbstractDefinitionDeployer.java:74)
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.deploy(AbstractDefinitionDeployer.java:64)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.CacheDeployer$1.call(CacheDeployer.java:54)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.CacheDeployer$1.call(CacheDeployer.java:51)
	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:537)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.CacheDeployer.deploy(CacheDeployer.java:51)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.DeploymentCache.deploy(DeploymentCache.java:67)
	at org.camunda.bpm.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:65)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.deploy(DeployCmd.java:255)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:156)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:142)
	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:537)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.doExecute(DeployCmd.java:142)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:102)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:82)
	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
	at org.camunda.bpm.engine.impl.RepositoryServiceImpl.deployWithResult(RepositoryServiceImpl.java:102)
	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deployWithResult(DeploymentBuilderImpl.java:270)
	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:266)
	at org.camunda.bpm.engine.impl.test.TestHelper.annotationDeploymentSetUp(TestHelper.java:140)
	at org.camunda.bpm.engine.test.ProcessEngineRule.starting(ProcessEngineRule.java:151)
	at org.junit.rules.TestWatcher.startingQuietly(TestWatcher.java:113)
	at org.junit.rules.TestWatcher.access$000(TestWatcher.java:52)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:59)
	at org.camunda.bpm.engine.test.ProcessEngineRule$1.evaluate(ProcessEngineRule.java:172)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: org.camunda.bpm.engine.impl.javax.el.ELException: Could not resolve function 'S'
	at org.camunda.bpm.engine.impl.juel.Tree.bind(Tree.java:122)
	at org.camunda.bpm.engine.impl.juel.TreeValueExpression.<init>(TreeValueExpression.java:65)
	at org.camunda.bpm.engine.impl.juel.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:428)
	at org.camunda.bpm.engine.impl.juel.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:73)
	at org.camunda.bpm.engine.impl.el.ExpressionManager.createValueExpression(ExpressionManager.java:82)
	at org.camunda.bpm.engine.impl.el.ExpressionManager.createExpression(ExpressionManager.java:77)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseUtil.parseParamValueProvider(BpmnParseUtil.java:208)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseUtil.parseNestedParamValueProvider(BpmnParseUtil.java:154)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseUtil.parseOutputParameterElement(BpmnParseUtil.java:142)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseUtil.parseCamundaOutputParameters(BpmnParseUtil.java:106)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseUtil.parseInputOutput(BpmnParseUtil.java:74)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.parseActivityInputOutput(BpmnParse.java:4540)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.parseActivity(BpmnParse.java:1332)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.parseActivities(BpmnParse.java:1276)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.parseScope(BpmnParse.java:648)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.parseProcess(BpmnParse.java:566)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.parseProcessDefinitions(BpmnParse.java:491)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.parseRootElement(BpmnParse.java:290)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:255)
	... 47 common frames omitted

Hi @pme123,

how did you set up the process engine?

Maybe you have to add the SPIN process engine plugin explicitly: https://docs.camunda.org/manual/7.13/user-guide/data-formats/configuring-spin-integration/#camunda-engine-plugin-spin

Hope this helps, Ingo

Hi @Ingo_Richtsmeier

Thanks for the help. Adding the following to test/resources/META-INF/processes.xml did not help:

<process-application
        xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <process-engine name="default">

        <plugins>
            <plugin>
                <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
            </plugin>
        </plugins>

    </process-engine>

</process-application>

Hi @pme123,

I havn’t tried it with the processes.xml. I usually add it to camunda.cfg.xml: https://docs.camunda.org/manual/7.13/user-guide/process-engine/process-engine-bootstrapping/#configure-process-engine-using-camunda-cfg-xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
  <bean id="processEngineConfiguration" class="org.camunda.bpm.extension.process_test_coverage.junit.rules.ProcessCoverageInMemProcessEngineConfiguration">
    <property name="history" value="full" />
    <property name="expressionManager">
      <bean class="org.camunda.bpm.engine.test.mock.MockExpressionManager"/>
    </property>
    <property name="processEnginePlugins">
      <list>
        <bean class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin"></bean>
      </list>
    </property>
  </bean>
</beans>

Hope this helps, Ingo

1 Like

Thanks that did the trick!