Camunda Installation and Integration

I think @aravindhrs has already done a good job answering your questions but i just wanted to say that you can follow these tutorial videos for a better understanding on how to use Camunda

Thanks @aravindhrs, will go through these links, and share my progress as well.

Thanks
Shailender Khandelwal

Thanks Niall,

Already started :slight_smile:

I tried your weather example in a shared in youtube video.

i replicated the steps as mentoned, got the error. then changed the variable from “weatherOk” to “ok”
and still the same error.

Getting below error
Cannot instantiate process definition SimpleDemo:2:38c26a26-843c-11e9-bf1e-2816ad160229: Unknown property used in expression: #{ok}. Cause: Cannot resolve identifier ‘ok’

can you suggest what i missed here?

Also, can you tell me the difference in community and enterprise version?

Thanls
Shailender Khandelwal

weatherOk is a field, value will be set from CheckWeatherDelegate java class. Did you created that Java Delegate and configured in the service task?

You can find the differences between enterprise and Community edition in below link:

Yes, i created the java delegate class and configured the service task.

see below code:

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", "Shailender" );
		execution.setVariable("boolean",rando.nextBoolean());
	
}

}

I have tried with different variables and updated the same in bpmn files too

With that code you’re creating a variable called boolean - you need to give the variable a name like weatherOk or ok depending on what the gateway is expecting.

is there any other place where i need to provide this variable?

No, but i wouldn’t call the variable boolean it may cause issues because it’s a reserved word in Java.

But thats all you’d need.

I tried many strings , and every time getting same error.
checked for syntax as well.

#{welcomeOk} where “welcomeOk” is the exact matched string used from java code. Recompiled the code and deployed it again,

PS: I am using community edition.

tried with new string now as weatherReport.

The process could not be started. : Cannot instantiate process definition SimpleDemo:2:ce64777f-8463-11e9-a5cc-2816ad160229: Unknown property used in expression: #{weatherReport}. Cause: Cannot resolve identifier ‘weatherReport’

I am using camunda with tomcat. Is there any other step with tomcat. i feel either its syntax issue or some config issue.

Can you upload your model?

Hi Niall

Attached bpmn file.
process.bpmn (5.1 KB)

The check weather task is not actually connected to any sequence flows - so it’s not being run.
You need to have a sequence flow going into it and leave it for the process to work

I will read about sequence flow, It was not mentioned in the video.

@shailender use this bpmn.

process.bpmn (5.4 KB)

And your delegate should be like:

public class CheckWeatherDelegate implements JavaDelegate {

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

Hi @aravindhrs

I used your BPMN file and your delegate… It didn’t throw any error. But, it also didn’t show any changes done , but i can see the logs and verify that it has executed.

can you please explain, what changes you have done? or where i went wrong?

Thanks
shailender Khandelwal

Already @Niall explained you about sequence flow not connected with your service task. The outgoing sequence flow from start event should connect with service task. In your case it skipped the service task and directly connected to gateway.

Thanks @Niall and @aravindhrs for your help. :slight_smile:

I ll continue on my research on camunda workflows and will share my insights too.

Thanks
Shailender Khandelwal