Why does my Asynchronous Task not start?
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.
Is there something I missed?
|
One answer
Jorge Diaz (866●44●34)
| answered May 12 '13, 5:33 p.m.
JAZZ DEVELOPER 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: <extension point="com.ibm.team.repository.service.asynchronousTask"> <asynchronousTask taskId="myTaskID"> <extensionService componentId="com.ibm.team.repository" implementationClass="myClass"> <prerequisites> <configurationProperties> <configurationProperty accessPolicy="OPEN" default="30" description="Desc" displayableName="Name" name="myTaskID.fixedDelay" required="true" type="LONG" updatePolicy="FRAMEWORK_RESTART_REQUIRED"> </configurationProperty> <configurationProperties> </prerequisites> </extensionService> </asynchronousTask> </extension> 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. Regards, Jorge. Comments
Andrew Soloninka
commented May 14 '13, 12:14 p.m.
Jorge
Thanks for the template. I made sure my plugin.xml matched the template. I also added the service: com.ibm.team.repository.service.IRepositoryItemService. However, the task still does not start.
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 ("com.ibm.team.repository.common.components" extension point).
This is an update for this question. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.