It's all about the answers!

Ask a question

how much overhead is there for a findWorkflowInfo() call?


Susan Hanson (1.6k2201194) | asked Mar 14 '14, 4:38 a.m.
I'm working on a java-based OperationAdvisor for the workItemSaveAction. I'm looking to see if the newState is in the IN_PROGRESS state group in the work item's workflow. I'm using this code:
IWorkItemCommon workItemCommon = getService(IWorkItemCommon.class);
IWorkflowInfo workflowInfo= workItemCommon.findWorkflowInfo(workItem, null);

//we only need to check for IN PROGRESS state groups. Open and Closed state groups are okay. if (workflowInfo.stateGroupContains(IWorkflowInfo.IN_PROGRESS_STATES, newStateId)) {
 ...do stuff
}

I'm wondering how much overhead is introduced in that findWorkflowInfo() call and the workflowInfo.stateGroupContain() method?  My workflows do not change *that* much so I could have a static list of the In Progress states for each work item and just look them up directly in the code.  This is on a save, so I don't want to introduce too much delay and processing purely on a Save.

Susan

Be the first one to answer this question!


Register or 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.