Creation of precondition plugin on delete of workitem
Hello Team,
We are trying to create a precondition plugin which will trigger on deletion of a work item.
Please help us how to get the trigger point on work item deletion. Also, how the plugin can be made available to apply on Delete work item in Operation Behavior.
In Plugin, we have provided the operation id com.ibm.team.workitem.operation.workItemDelete in Entensions but it did not work for us.
Please help us with this.
Accepted answer
Follow this link, read the material and follow the extensions workshop: https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/
According to https://jazz.net/wiki/bin/view/Main/CustomPreconditionsTable#operations the operation ID is com.ibm.team.workitem.operation.workItemDelete
https://rsjazz.wordpress.com has several examples for advisors. You need to use the Extension point for advisors is com.ibm.team.process.service.operationAdvisors
Debug your extension on Jetty. If you have questions you can ask them here and hope for an answer provided the question actually carries information that people can work on. "but it did not work for us" is not really useful.
According to https://jazz.net/wiki/bin/view/Main/CustomPreconditionsTable#operations the operation ID is com.ibm.team.workitem.operation.workItemDelete
https://rsjazz.wordpress.com has several examples for advisors. You need to use the Extension point for advisors is com.ibm.team.process.service.operationAdvisors
Debug your extension on Jetty. If you have questions you can ask them here and hope for an answer provided the question actually carries information that people can work on. "but it did not work for us" is not really useful.
One other answer
Hello Ralph,
We are also trying a precondition where a work item cannot be deleted if it has a relationship (eg parent->child)
on debugging the plugin in Jetty we see that the operationData is null. so ideally we cannot extract the data through:
Object data = operation.getOperationData();
However in the variable view of Debug for the operation class we see that the workItemHandle information is present:
name:val$workItem value: WorkItemImpl(id=1229)
I am not able to find any method in the operation class to retrieve the handle. Any suggestions how to retrieve this handle?
Thanks,
Abhishek Kumar
We are also trying a precondition where a work item cannot be deleted if it has a relationship (eg parent->child)
on debugging the plugin in Jetty we see that the operationData is null. so ideally we cannot extract the data through:
Object data = operation.getOperationData();
However in the variable view of Debug for the operation class we see that the workItemHandle information is present:
name:val$workItem value: WorkItemImpl(id=1229)
I am not able to find any method in the operation class to retrieve the handle. Any suggestions how to retrieve this handle?
Thanks,
Abhishek Kumar