The process could not be started. : Cannot instantiate process definition

Hi Team,

Iam getting below error when i try to start process.

The process could not be started. : Cannot instantiate process definition SimpleDemo:3:c5e1aaa8-21fb-11ea-b5c4-9cb6d0c2b847: Unknown property used in expression: #{cflag}. Cause: Cannot resolve identifier ‘cflag’

My java class is below process.bpmn (4.7 KB)

package com.camunda.demo.SimpleDemo;

import java.util.Random;

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;

public class CheckWeatherDelegate implements JavaDelegate {

public void execute(DelegateExecution execution) throws Exception {
	Random random=new Random();
	execution.setVariable("cflag", random.nextBoolean());
	// TODO Auto-generated method stub



Can you please help me on this issue .

Ravi Babu.

Hi @RaviBabu,

The class attribute of the service task “check Weather” in your model is set to

Where it should be set to

1 Like

Hi ,

Thank you for looking into my error . I changed class attribute as com.camunda.demo.SimpleDemo.CheckWeatherDelegate** but still getting same error .process.bpmn (4.7 KB)

Hi @RaviBabu,

Try to set camunda:asyncAfter=“true” on Service Task

By default process state is only stored to the database when token reaches a wait state.
“A wait state is a task which is performed later , which means that the engine persists the current execution to the database and waits to be triggered again”.

And since service task is not a wait state then asynchronous Continuations can be used to add transaction boundaries.

I tried camunda:asyncAfter=“true” but still same issue.

process.bpmn (4.7 KB) .

Iam still facing the problem , Can any one please help me on this issue ?

@RaviBabu from your model service task element “Check Weather” is not connected to the exclusive gateway.


Try this bpmn file which i corrected it: process.bpmn (5.9 KB)

1 Like


Thank you so much , it worked this time .