VMware {code} Community
rathi27akash
Enthusiast
Enthusiast

Remove custom Tasks from Service layer for plugin written for Vcenter 5.5 using HTML-Bridge

Hi,

We are developing a plugin for Vcenter 5.5 using HTML Bridge. The plugin works with custom objects (Which are non-Vcenter Objects). User can also perform certain operations on the Objects. To track the completion of operations we generate Tasks. The tasks we generate are not cancellable. if operations is completed in a particular within timeout duration it's status is completed to Success else on error, error status with respective message is updated.

Suppose i initiated an operation, so a task was created with status running. Before the tasks gets completed, if i restart the vcenter or reinstall plugin, I get all the incomplete tasks in the vcenter pannel. 

I want to delete this tasks as i won't be able to mintor them.

Using TaskHistoryCollector In service layer using vi-java.jar  i was able to collect all the tasks, with some logic we were was able to seperate our custom tasks. taskHistroyCollector provides TaskInfo Object i was not able to use it to set the taskStatus to cancel.

It would be a great help if someone Points to how to remove the tasks from service layer.

 

Thanks in advance,

Regards,

Rathi.

Rathi.
0 Kudos
0 Replies