The Process could not be started, Cause: Cannot resolve identifier 'weatherOk'

Hi Naill,

I am trying to run the example posted here Tutorial: Camunda Enterprise Edition for Java Developers (Video 2) - YouTube

when i am trying to run the process , it throws me error:

The process could not be started. : Cannot instantiate process definition Canada:1:6052f34c-83f0-11ea-988c-d0c5d33c3174: Unknown property used in expression: #{weatherOk}. Cause: Cannot resolve identifier 'weatherOk

Dont know what I am doing wrong here.** Can you please help ??**

Below is the process diagram:

process.bpmn (5.3 KB)

CheckWeatherDelegate Class code:

package com.camunda.demo.Canada;

import java.util.Random;

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

public class CheckWeatherDelegate implements JavaDelegate {

@Override
public void execute(DelegateExecution execution) throws Exception {
	
	Random rando = new Random();
	
	execution.setVariable("name", "kuku");
	execution.setVariable("weatherOk", rando.nextBoolean());

}

}

Hi,
You can use camunda:asyncAfter=“false” option for service task “Weather check” which is camunda:asyncAfter=“true” as of now.

For more details please refer:
https://docs.camunda.org/manual/7.11/user-guide/process-engine/the-job-executor/#exclusive-jobs

Hi Alok,

I changed the camunda:asyncAfter=“false” option for service task “Weather check” . Its still not working and throwing the same error.
process-2.bpmn (5.2 KB)

Hi,
I tried the same code and it works for me. Please try with this one and if works then can compare with yoursprocess.bpmn (5.4 KB)

package com.sample.checkweather;

import java.util.Random;

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

public class CheckWeatherDelegate implements JavaDelegate{

@Override
public void execute(DelegateExecution execution) throws Exception {
	// TODO Auto-generated method stub
	Random rando = new Random();
	
	execution.setVariable("name", "kuku");
	execution.setVariable("weatherOk", rando.nextBoolean());
}

}

Hi Alok,

I tried multiple times with your code. Somehow when i start the process, it doesn’t give error and it says “the process has been started” but when i go to cockpit it doesn’t show anything in process instances and incidents.

package com.camunda.demo.weathercheck;

import java.util.Random;

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

public class CheckWeatherDelegate implements JavaDelegate {

@Override
public void execute(DelegateExecution execution) throws Exception {
	// TODO Auto-generated method stub
	Random rando = new Random();
	
	execution.setVariable("name", "kuku");
	execution.setVariable("weatherOk", rando.nextBoolean());
}

}process-3.bpmn (4.9 KB)

Great… now what are you expecting in cockpit?

You can see the complaint script task running and logger will be printed on console when weatherOk is false.

It is not showing anything under process instances and incidents. I am expecting output similar to the one shown in the video https://www.youtube.com/watch?v=HxtZf5VD6lQ&t=82s at at 19:43.

Below are the logs:
10:47:09,451 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 2) WFLYDR0001: Content added at location C:\Users\kukreti\Desktop\Camunda\server\wildfly-10.1.0.Final\standalone\data\content\c7\f4dd84623073415b2442c3d7533e004af6dd00\content
10:47:09,462 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of “weathercheck.war” (runtime-name: “weathercheck.war”)
10:47:09,533 INFO [org.camunda.bpm.container.impl.jboss.deployment.processor.ProcessApplicationProcessor] (MSC service thread 1-7) Detected user-provided @ProcessApplication component with name ‘com.camunda.demo.weathercheck.CamundaBpmProcessApplication’.
10:47:09,640 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool – 114) WFLYUT0021: Registered web context: /weathercheck
10:47:09,640 INFO [org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService] (ServerService Thread Pool – 116) Deployment summary for process archive ‘weathercheck’ of process application ‘weathercheck’:

    process.bpmn

10:47:09,711 INFO [org.camunda.bpm.application] (ServerService Thread Pool – 116) ENGINE-07021 ProcessApplication ‘weathercheck’ registered for DB deployments [4f4ff4b4-8571-11ea-9808-d0c5d33c3174]. Will execute process definitions

    weathercheck[version: 1, id: weathercheck:1:4f568466-8571-11ea-9808-d0c5d33c3174]

Deployment does not provide any case definitions.
10:47:09,771 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed “weathercheck.war” (runtime-name : “weathercheck.war”)

and the API resul

[{“links”:[],“id”:“4f4ff4b4-8571-11ea-9808-d0c5d33c3174”,“name”:“weathercheck”,“source”:“process application”,“deploymentTime”:“2020-04-23T10:47:09.663-0400”,“tenantId”:null}]

Are you using community edition?

In community edition, history view is not available.

Have a look here for features available in community edition vs enterprise edition.

okay Alok. Understood.

one more question.

What is the meaning of the sentence in log files- “Deployment does not provide any case definitions”?

Meaning you don’t have CMMN file to be deployed in camunda