Get Current Item
![]()
I have created a custom precondition and it shows up in the lisf of saveWorkItem precondition.
I am trying to get the handle of my current workitem for which the precondition was executed. How can I get the reference to currentworkitem object and then look into the current state and other fields of the workitem? this implementation goes inside below method. public void run(AdvisableOperation operation, IProcessConfigurationElement advisorConfiguration, IAdvisorInfoCollector collector, IProgressMonitor monitor) throws TeamRepositoryException { // my implementation goes here... } Thanks. |
One answer
![]() How can I get the reference to currentworkitem object and then look The typical pattern is: public void run(AdvisableOperation operation, IProcessConfigurationElement participantConfig, IParticipantInfoCollector collector, IProgressMonitor monitor) throws TeamRepositoryException { Object data= operation.getOperationData(); if (!(data instanceof ISaveParameter)) return; ISaveParameter saveParameter= (ISaveParameter) data; fWorkItemNewState= (IWorkItem) saveParameter.getNewState(); -- Regards, Patrick Jazz Work Item Team |