Creation of precondition plugin on delete of workitem
Pankaj Sharma (40●11●70)
| asked May 24 '16, 10:27 a.m.
edited Jun 24 '16, 3:43 a.m. by Ralph Schoon (63.6k●3●36●46)
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
Ralph Schoon (63.6k●3●36●46)
| answered May 25 '16, 2:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited May 25 '16, 2:27 a.m.
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. Ralph Schoon selected this answer as the correct answer
Comments Note, you have to look at the operation data you get in the advisor and figure how to access the information you want. I would assume you can get the old state of the work item e.g. to access data.
|
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 Comments
Ralph Schoon
commented Jun 24 '16, 3:28 a.m.
| edited Jun 24 '16, 3:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Create your own question. Posting answers with new questions is just an annoying, frustrating habit. I don't want to spend my day converting these answers into questions for forum users.
Abhishek Kumar
commented Jun 24 '16, 5:11 a.m.
for extracting the data from pre-conditon from save workitem we use the following
I can see the same in an experiment I was doing. This means, I am not able to access the work item in the delete and I can't actually test anything. The work item is somehow in the information, but I have no idea how to access it.
Ralph Schoon
commented Jun 24 '16, 6:56 a.m.
| edited Jun 24 '16, 6:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The method com.ibm.team.workitem.service.internal.WorkItemRepositoryService.deleteWorkItem(IWorkItemHandle, IRepositoryItemService)
Abhishek Kumar
commented Jun 24 '16, 7:27 a.m.
Hello Ralph,
|
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.