Hi,
I am having a problem to use freemarker script, I could not understand. The log is below:
The process could not be started. : Cannot instantiate process definition bankdaten:15:c1b93e00-41ff-11ea-b53e-507b9deedf73: ENGINE-09024 Unable to find resource at path soapEnvelope.ftl
The soapEnvelope.ftl is located under src/main/resources
bankdatenApllication.class
Summary
package de.hsb.bpm.getstarted;
import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.application.impl.ServletProcessApplication;
@ProcessApplication("Bankdaten App")
public class bankdatenApplication extends ServletProcessApplication{
}
pom.xml
Summary
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.hsb.bpm.getstarted</groupId>
<artifactId>bankdaten</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<version.camunda>7.3.0</version.camunda>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${version.camunda}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-connect</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.connect</groupId>
<artifactId>camunda-connect-soap-http-client</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-spin</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-dataformat-xml-dom</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.168</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.20</version>
</dependency>
<dependency>
<groupId>org.camunda.template-engines</groupId>
<artifactId>camunda-template-engines-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.26</version>
</dependency>
</dependencies>
</project>
processes.xml
Summary
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xml>
<process-application
xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<process-archive name="bankdaten">
<process-engine>default</process-engine>
<properties>
<property name="isDeleteUponUndeploy">false</property>
<property name="isScanForProcessDefinitions">true</property>
</properties>
</process-archive>
</process-application>
bankdaten.bpmn (4.9 KB)
Thanks in advance !
@Gigli0neiric create a folder called “templates” in the folder /src/main/resources and move the .ftl files to the templates folder.
Are you using camunda connectors?
Also make sure the below dependency in the classpath:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
@aravindhrs i created the folder “templates” in the folder /src/main/resources and moved the .ftl files to the templates folder. I also added the dependency. I still get the same error message.
Yes, i’m using connectors.
<camunda:inputParameter name=“soapEnvelope”>
<camunda:script scriptFormat=“freemarker” resource=“templates/soapEnvelope.ftl” />
</camunda:inputParameter>
@Gigli0neiric include below dependency as well.
<dependency>
<groupId>org.camunda.connect</groupId>
<artifactId>camunda-connect-core</artifactId>
</dependency>
You need to configure the connect plugin for the processengine. In order to activate Camunda Connect functionality for a process engine, a process engine plugin has to be registered in $TOMCAT_HOME/conf/bpm-platform.xml
as follows:
<?xml version="1.0" encoding="UTF-8"?>
<bpm-platform ... >
<process-engine name="default">
...
<plugins>
... existing plugins ...
<plugin>
<class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
</plugin>
</plugins>
...
</process-engine>
</bpm-platform>
Try like below:
<camunda:connector>
<camunda:connectorId>soap-http-connector</camunda:connectorId>
<camunda:inputOutput>
<camunda:inputParameter name="soapEnvelope">
<camunda:script scriptFormat="freemarker" resource="soapEnvelope.ftl" />
</camunda:inputParameter>
<!-- ... remaining connector config omitted -->
</camunda:inputOutput>
</camunda:connector>
@aravindhrs
I also added the dependency
<dependency>
<groupId>org.camunda.connect</groupId>
<artifactId>camunda-connect-core</artifactId>
</dependency>
The plugin was already configured in the bpm-platform.xml
<plugin>
<class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
</plugin>
The connctor is configured like this:
<camunda:connector>
<camunda:inputOutput>
<camunda:inputParameter name="url">http://www.thomas-bayer.com/axis2/services/BLZService</camunda:inputParameter>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="Content-Type">application/soap+xml;charset=UTF-8;action="http://www.thomasbayer.com/blz/getBank"</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="soapEnvelope">
<camunda:script scriptFormat="freemarker" resource="templates/soapEnvelope.ftl" />
</camunda:inputParameter>
<camunda:outputParameter name="bankdaten">${S(response).childElement("Body").childElement("http://thomas-bayer.com/blz/","getBankResponse").childElement("details")}</camunda:outputParameter>
<camunda:outputParameter name="bezeichnung">${S(bankdaten).childElement("bezeichnung").textContent()}</camunda:outputParameter>
</camunda:inputOutput>
<camunda:connectorId>soap-http-connector</camunda:connectorId>
</camunda:connector>
I still get the error after adding the dependency. 
@Gigli0neiric can you provide camunda server logs? Complete stacktrace?
@aravindhrs
It seems like, that the process application is sometimes unavailable. Then Camunda cannot get start form data for process definition. As soon i delete the folder of the snapshot and tomcat rebuild it the error ENGINE-09024 Unable to find resource at path templates/soapEnvelope.ftl occurs.
I’m just a litte bit confused. The project has the same structure of the tutorial:
catalina.2020-01-29.log (60.2 KB)
Hi @Gigli0neiric ,
I am facing similar type of issue. Were you able to solve the issue. Can you help me out in solving the issue. The error is as below:
Cannot instantiate process definition GetHoliday:1:af236818-71d4-11ea-a4bb-621a1d4f98c2: ENGINE-09024 Unable to find resource at path parseHoliday.js
Hi @Kishore,
my problem was, that SPIN wasn’t configured correctly.
I’m using Camunda 7.12 on TomCat, but the Tomcat already has the dependencys for Spin.
So i had to set the scope “provided”. I’m not really shure, why Spin caused the problem…
<dependency>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-core</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-dataformat-all</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-spin</artifactId>
</dependency>
In other cases it depends on, which engine you use to provided your services.
Hi @Gigli0neiric,
I am using Camunda Springboot. So on adding the above provided dependencies, will the error get resolved ??
Hi @Kishore,
If you don’t use Spin, dont add it.
I just needed it for the access to my webservice.
Is your GetHolliday file in the deployment folder?
Hi @Gigli0neiric,
My GetHoliday file is successfully deployed and is available in the Cockpit. Should i have to deploy parseHoliday.js?
I want to call an External API using http-connector. I configured the connectors and the process model is deployed successfully.