Cannot start service task with delegate expression

Hi all,

i’m facing error when start service task using delegate expression

The process could not be started. : Cannot instantiate process definition eclaim-registration:9:eff49b36-c4e2-11eb-8dbd-00059a3c7a00: Unknown property used in expression: ${claimRegisterDelegate}. Cause: Cannot resolve identifier ‘claimRegisterDelegate’

below is my delegate class

and here my bpmn files id-eclaim.bpmn (2.9 KB)

appreciate for your help.

Thanks

Can you give details about how you’re using camunda.
Version, application server etc.

hi @Niall, i’m using java delegate with spring framework. Build war and copy it into webapps tomcat folder. I’m running camunda tomcat locally from my machine.
here I put my pom.xml pom.xml (5.6 KB) .
I’m using apache-tomcat-9.0.43 the latest that we can download from camunda website

@dimasrij Which database are you using? Are you using jndi datasource from tomcat server?

If you’re not using jndi datasource, then your pom.xml doesn’t have the database for runtime execution data persistence. Only H2 database was there and it’s in test scope. In that case you need to have db in compile scope. Java Delegate and your bpmn looks fine.

<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <version>1.4.181</version>
    <scope>test</scope>
</dependency>

hi @aravindhrs,

I already h2 db in my pom.

<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.4.181</version>
			<scope>test</scope>
		</dependency>

and also I have configured in my server.xml if my tomcat h2 jndi like this

 <Resource name="jdbc/ProcessEngine"
              auth="Container"
              type="javax.sql.DataSource" 
              factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
              uniqueResourceName="process-engine"
              driverClassName="org.h2.Driver" 
              url="jdbc:h2:./camunda-h2-dbs/process-engine;MVCC=TRUE;TRACE_LEVEL_FILE=0;DB_CLOSE_ON_EXIT=FALSE"
              defaultTransactionIsolation="READ_COMMITTED"
              username="sa"  
              password="sa"
              maxTotal="20"
              minIdle="5"
              maxIdle="20" />

is there’s any missing?

If dependency scope is set to scope=test, then it won’t be available at runtime. If you remove the scope it will be available for all the scopes.

Hi,
is there a @Override above the void execute missing?

@Override
public void execute(DelegateExecution execution) throws Exception {}

It’s highly recommended to have that annotation. But it will execute without any issues unless if the overridden method doesn’t override the function properly.

1 Like

hi all, I already done the issue.

what I’ve done is to fix that is

  1. add web.xml in the resource folder
  2. add class for beans delegate
  3. check asynchronous before in the modeler
  4. add @Override in method execution

thanks for your advise @aravindhrs @stefan.frena @Niall

2 Likes