It's all about the answers!

Ask a question

Why does my Asynchronous Task not start?

Andrew Soloninka (5511924) | asked May 06 '13, 5:09 p.m.
 I have created an Asynchronous Task and am attempting to test it. However, the task does not appear to start. I set the fixed delay to 10 mins. I started the server and launched the client and waited for over 15 mins the breakpoint to stop the application but it never happened. I checked the component status and found that the component was not listed. 

  • I used the Task extension point
  • I added the plugin to the Debug/Run Configuration.
  • The class in the plugin extended AbstractAutoScheduledTask
Is there something I missed?

One answer

permanent link
Jorge Diaz (8664234) | answered May 12 '13, 5:33 p.m.
edited May 13 '13, 10:56 a.m.
Hi Andrew,

in general what you mention sounds right. I assume you specified the delay using a task configuration property, am I right? Just in case, the following is a skeleton for an asyncTask extension declaration to make it run every 30 seconds:



With a component declaration as the example above, the method "runTask()" in the task implementation class <myClass> will be called every 30 seconds. This should give you a clue of what is not working in your implementation.

Note that normally the actual logic is carried out by a repository service and the task will be used to trigger the service in your timely defined manner. As such the service will have to be declared in the prerrequisites section as well.



Andrew Soloninka commented May 14 '13, 12:14 p.m.


Thanks for the template. I made sure my plugin.xml matched the template. I also added the service: However, the task still does not start. 

Jorge Diaz commented May 20 '13, 4:18 a.m.

Andrew, note that the sample skeleton defines a task belonging to repository component. If you are defining a task of your own component, make sure it's referring to an actual declared component ("" extension point).

Andrew Soloninka commented Jun 28 '13, 8:19 p.m. | edited Jun 28 '13, 8:20 p.m.

 This is an update for this question. 

Jorge, I took your advice and removed all required services and found that the Task started but errorred. I then began adding back in each of the required services until I came across a service that caused the Task not to start. In my testing I found that services could only be represented by interfaces not classes. I corrected 2 services that were represented by classes. Currently I am having problem with a service based on IQueryCommon. If I add IQueryCommon as a required service the Task doesn't start. I am using IQueryCommon in another Task and that Task is running fine. 

Your answer

Register or to post your answer.