AnsweredAssumed Answered

How to get Job-associated Tasks

Question asked by zobbl on Jan 26, 2012
Hello,

I'm evaluating activiti at work and have some troubles using it.
I don't know if I misunderstood the concepts of activiti or just at a dead-end here and have to use another way.

Typically we use Grails for all kinds of projects and therefore the activiti-plugin is also integrated.
Some introduction to the problem, so you can understand how I got to this point and maybe can tell me where I went wrong in the general approach

Our customer has an existing system, where he works with html, js and other files. These files must be validated, some information have to get parsed and so on.
This is where we stepped in (in a past project): We provided these tools, to check if all the changes made by our customer are valid and still grant a working system.
Nowadays these tools are run manually and this has to change.

The current project aims at providing a solid base where all the tools and different combinations of tools can be started and run automatically.
We provide the process definitions and he should just have to run the corresponding processes.
As a nice and necessary feature I want to display the current progress of the whole Process.

Now we're getting closer to the problem.
If I just run the process from the grails-webinterface the site keeps loading until the WHOLE process is finished.
Therefore it's necessary to run the process or rather the engine in a separate - grails independent - thread.

This is where my problems (yes, plural ;) ) begin.
I still haven't found any solution to run the ProcessEngine in a different thread. I don't know if I'm not looking at the right place, but I haven't found any detailled and explaining documentation on the ProcessEngine-Configuration, yet. Typically this is where I expect such an option.

What I have found are the asynchronous tasks, with the task-attribute (within the XML-Definition) "activiti:async=true".

It's quite nice, the page loads and tasks run in a seperate thread.

And now comes the main question: How do I get information about the current task (or Job) that is executed.
I want to display the all tasks within the started process and highlight in some way, which tasks are done, running or have failed.

The final solution should be a cyclic AjaxRequest to the Engine or the JobExecutor (running in a different thread) and retrieve the necessary information about the current task.

I hope you understand what my problem is and can give me some hint.

best regards

Outcomes