How to get Current State of WorkItem in RTC
Hello , I am trying to find out the Current state of WorkItem using RTC Java API. i tried to use getState2 method for getting current state of workItem but getting null. If you know more API on the State then Pleas elte me know. Thanks Monali
|
2 answers
Hi,
getState2 is correct in order to obtain an Identifier<IState> object. How do you have obtained the IWorkItem object? Which profile do you have used? Michele. |
Hello Monali,
you could use IWorkItem newState = (IWorkItem) saveParameter.getNewState(); Identifier<IState> newStateId = newState.getState2(); String state = newStateId.getStringIdentifier(); or determine state group. It allows to work with different work item workflows: IAuditableCommon iac = ((ISaveParameter) data).getSaveOperationParameter().getAuditableCommon(); WorkflowManager wfm = new WorkflowManager(iac); IWorkflowInfo wi =wfm.getWorkflowInfo(newState, monitor); //Check status group if (wi.stateGroupContains(IWorkflowInfo.CLOSED_STATES, newStateId)) { //do smth. } |
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.