|
|
|
|
The following issue has been resolved as FIXED.
|
|
Currently the DocumentWorkflowActionsBean has a bunch of methods that are both factory and event observers to eagerly recompute fields whose values might get obsolete on document selection changed and other events.
For instance:
@Factory("workflowDocumentFormerReviewCurrentLevel")
@Observer( { EventNames.DOCUMENT_SELECTION_CHANGED,
EventNames.WORKFLOW_ENDED, EventNames.WORKFLOW_NEW_STARTED,
EventNames.WORKFLOW_TASK_STOP, EventNames.WORKFLOW_TASK_REJECTED })
public void computeWorkflowDocumentFormerReviewCurrentLevel()
throws WMWorkflowException {
if (currentItemProcessInstanceId == null) {
return;
}
WAPI wapi = workflowBeansDelegate.getWAPIBean();
Map<String, Serializable> props = wapi
.listProcessInstanceAttributes(currentItemProcessInstanceId);
workflowDocumentFormerReviewCurrentLevel = (Integer) props
.get(WorkflowConstants.WORKFLOW_FORMER_REVIEW_LEVEL);
}
This is really costly since those methods are called each time the user navigates to a document even when not looking at the Review tab.
A lazy recomputation strategy should be adopted instead by making the getters recompute obsolete fields (and make them carry the @Factory annotation) when necessary and add new reset* methods that obsolete value on events by nullifying the obsolete field (and make them carry the @Observer annotation).
This can me tricky for fields that are of base-type 'int' that cannot be assigned the null value. Maybe they should be Integer instead. Otherwise a boolean flag can be used to mark obsolation of those fields.
|
|
|
|
![]() |
|
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets