Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to make a parent work item invalid when all child workitems are invalid state by using server api?

I had created child workitems and make them as invalid but when I am trying to invalid the parent workitem. in console it is showing that the parent workitem state had set to Invalid but in the web it remains in inprogress state only and along with that it is throwing error "An unhandled exception occurred during "InvalidateParent11".

'Save Work Item' failed.". Can any one suggest for rectifing that error. Check the below code for reference.
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
newState= (IWorkItem)fworkItemServer.getAuditableCommon().resolveAuditable(newState ,IWorkItem.FULL_PROFILE,monitor).getWorkingCopy();
                        IWorkflowInfo iWorkflowInfo2 = fworkItemCommon.findWorkflowInfo(newState, monitor);
                        System.out.println("Entered inside");
                        Identifier<IState>[] availableActions = iWorkflowInfo2.getAllStateIds();
                     
                        for (Identifier<IState> stateIds : availableActions) {
                           
                          
                            System.out.println("State is : " + iWorkflowInfo2.getStateName(stateIds));
                          
                            if (iWorkflowInfo2.getStateName(stateIds).equalsIgnoreCase(Done_State)) {
                              
                                newState.setState2(stateIds);
                                System.out.println("Updated State is : "+iWorkflowInfo2.getStateName(newState.getState2()));
                             
                              
                                System.out.println("State is : " + iWorkflowInfo2.getStateName(newState.getState2()));
                             
                              
                              
                                System.out.println("stage6");
                                stateIds.getType();
                                System.out.println("stage7");
                                Set<String> additionalParams = new

                                HashSet<String>();
                                System.out.println("stage8");
                                additionalParams.add("SavedChild");
                                System.out.println("stage9");
                                newState = (IWorkItem) newState.getWorkingCopy();
                                System.out.println("stage10");
                                IStatus saveStatus =

                                        fworkItemServer.saveWorkItem3(newState, null, null, additionalParams);


Thanks







0 votes


Be the first one to answer this question!

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Feb 12 '20, 9:02 a.m.

Question was seen: 588 times

Last updated: Feb 12 '20, 9:02 a.m.

Confirmation Cancel Confirm