cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti 5.18 problem

pred05
Champ in-the-making
Champ in-the-making
Hi,
i have a problem with activiti 5.18.0.0 version. I don't know if it's me or not.
I have made a webservice which have a processEngine like an API with jobs executor desactivate. I want just use the processEngine to make request with the TaskService like complete, get all taks for specific user,…


<property name="jobExecutorActivate" value="false" />
<property name="asyncExecutorEnabled" value="false" />
<property name="asyncExecutorActivate" value="false" />


In Activiti 5.17 i haven't any problem when i complete a task. i have just note the BpmnDeployer processing my bpmn file and it png.
In Activiti 5.18 when i complete a task in the same context. My web service try to load the next process's step i don't know why. i see that because in my process i use a service which is call in some expression in the process, only the listener which have the real engine with activate job executor has the class so when the web service try to resolve the expression it raise an exception. it is strange because i haven't this problem with 5.17.

All tasks is asynchronous. Do you have an idea ?
12 REPLIES 12

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

when tasks are asynchronous you have to enable one of jobexecutors.
http://activiti.org/userguide/index.html#jobExecutorConfiguration

Regards
Martin

pred05
Champ in-the-making
Champ in-the-making
Hi, thanks for help. I don't understand the jobexecutors well so.
I have a listener in an other server which has the async executor enabled. If i enabled one jobexecutors in the service it will polling the Activiti database and trying to execute some task no ?
In fact i will want doing a custom API like the REST Activiti's API but as a SOA Service.
Sorry for my approximate english…

Have a good day.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Could you create jUnit test please?
http://forums.activiti.org/content/sticky-how-write-unit-test

Regards
Martin

pred05
Champ in-the-making
Champ in-the-making
Hi, i need to do three projects to explain my problem, i can do it if it necessary but before i will explain better what i want to do.
Architecture image
As we can see on the image, we have one java project which represent the WebService, it permit to each "Front" to call methods like completeTask(Task task) without to know how it execute this method. The WebService must only set message on the activiti database. Activiti Engine as a Servlet Listener must verify in the database if somes messages is added and execute it. i do this because if i use the Activiti REST API the front will be too specific. When i use a webservice, the front haven't to change if the logic in the webservice is changed.

i have the problem when i use asynchronous SubProcess. Activiti 5.17 set a message in the database for the completion of the subprocess. With Activiti 5.18 the "Activiti API" try to execute the subprocess as it isn't asynchronous.

It is possible to disable totally the default JobExecutor ?

Thanks for help.

gdharley
Elite Collaborator
Elite Collaborator
Interesting, so you're model is that you have one Activiti engine running the process and a second engine simply acting as an API layer.
We have used this pattern a number of times without any problems in versions prior to 5.18 and there we simply disables the Job Executor in the application that was simply using the API.

Definitely sounds like a change in behavior in 5.18, but, as Martin said, it is likely we will need a unit test to look into the root cause.

Now I havent tried it, but perhaps the following settings will work:

<blockcode>
<property name="jobExecutorActivate" value="false" />
<property name="asyncExecutorEnabled" value="true" />
<property name="asyncExecutorActivate" value="false" />
</blockcode>

Here we enable the Async Job Executor, but dont bootstrap it, so it shouldnt be operating.

Let me know if this has any effect.

pred05
Champ in-the-making
Champ in-the-making
Yes it is exactly what i look to do. i have trying to enable the async executor and i have the same error with Activiti 5.18.
i think the error comes to the async subProcess. When i save the bpmn file with the Activiti Designer, it turn my subprocess automaticaly synchronous. i need to set the subprocess asynchronous directly in the xml. It is maybe not "normal" to set a subprocess asynchronous ?

i'm doing the jUnit. If you set Activiti 5.18 an exception occur and if you set 5.17 all is good.

You have to change the jUnitTestProject extension to .zip for extract it. It contain two projects. The jUnit (which is the API, jUnitTestAPI) and a jetty server (the Engine which contain and deploy the bpmn file, jUnitTestSERVER). For launch the server you have to launch Server.launch. The bpmn contain an asynchronous subprocess.

For switch the version of activiti you have to change the properties in top of each pom.xml.

i hope it is quite easy to export it :s.
Thanks a lot for help!

trademak
Star Contributor
Star Contributor
That's because Activiti 5.17 will ignore the async attribute on the sub process and Activiti 5.18 not. Why would you make this sub process asynchronous? What would be the use case for it? If you remove the async attribute, does it run ok then?

Best regards,

pred05
Champ in-the-making
Champ in-the-making
Ok thanks, it's because the subprocess will be started by the API and not by the Server if it's not asynchronous. i have try to set the subprocess synchronous and when i start the process in the API it search to launch the subprocess but it doesn't have the class call on an expression in the Subprocess. Only the server has it. So an exception occur :s
I haven't activate any jobExecutor in the API but when the task is synchronous it try to execute it at start. i have try to put an asynchronous script task behind the synchronous Subprocess. This resolve the problem when i call the startProcess method to instantiate the process but not when all subprocess' task is ended. It is strange because when i ended all the subprocess' task, the API try to call again the subprocess expression. The expression is set in the multi-instance collection and return a list of string which represent user. Each user receive all subprocess' task.

i did a diagram to explain my investigation : image

Thanks.

pred05
Champ in-the-making
Champ in-the-making
Hi, have you an idea ?
Thanks