Hi all,

I'm modifying xmlworkflow aspect to add xref to mets.xml in each cell of 
owned items table (page /submissions). The change works well, but I found 
an issue when I did a batch import with 900> items through workflow, the 
page response is too slow. The code is the below:

                int count = 0;
                Row row = table.addRow();
                for (ClaimedTask owned : ownedItems)
                {
                int workflowItemID = owned.getWorkflowItemID();
                String stepID = owned.getStepID();
                String actionID = owned.getActionID();
                XmlWorkflowItem item = null;
                try {
                    item = XmlWorkflowItem.find(context, workflowItemID);
                    Workflow wf = 
WorkflowFactory.getWorkflow(item.getCollection());
                    String url = 
contextPath+"/handle/"+item.getCollection().getHandle()+"/xmlworkflow?workflowID="+workflowItemID+"&stepID="+stepID+"&actionID="+actionID;
                   
                    if(count%3 ==0 && count != 0){
                        row = table.addRow();
                    }
                    
                    String url_item = 
"/metadata/internal/item/"+Integer.toString(item.getItem().getID())+"/mets.xml";
                    Cell cell_reference =row.addCell();
                    cell_reference.addXref(url,message("xmlui.XMLWorkflow." 
+ wf.getID() + "." + stepID + "." + actionID));
                    cell_reference.addXref(url_item);
                    
                    count++;

                } catch (WorkflowConfigurationException e) {
                    row = table.addRow();
                    row.addCell().addContent("Error: Configuration error in 
workflow.");
                    log.error(LogManager.getHeader(context, "Error while 
adding owned tasks on the submissions page", ""), e);
                
                } catch (Exception e) {
                    log.error(LogManager.getHeader(context, "Error while 
adding owned tasks on the submissions page", ""), e);
                }

The output is a table with many rows, and each row contains 3 cells with 
references to items in workflow. The problem seems construct this structure 
is too hard (queries in postgresql to obtain the list of owned items in 
xmlworkflow are fast so seems not a problem of database query), but I don't 
understand why construct this kind of structures in XML is so expensive. 
Someone have more than 500-600 items in workflow and can confirm the 
response of the page is slow? 

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to