OL Learn

Metadata and Document Set counts

I have a job which sorts and groups documents into Document Sets. After running the Create Job plugin in Workflow, the Metadata is incorrect, still showing a single Group, with inaccurate page counts.

I would expected that each Document Set would be a Group, and that the various index/count values would be accurate.

This is a long-standing bug in Workflow, where all Connect jobs generate inaccurate metadata. Is a fix planned for this, and in the meanwhile: how do I get a count of the number of Document Sets in a Job?

To help you properly we would need to see the Template and reproduce the issue. I suggest you open a technical support ticket through our website.

This way we will be able to provide you with a fix or a workaround should it reveal a known issue.

I did open a ticket and received a script to report Document Set counts. I believe that this IS a known issue. Metadata produced by Connect resources, in Workflow, is not accurate. It doesn’t create the Group level one would expect when performing Grouping in Connect, and it doesn’t report the various “count” values accurately. This forum has numerous examples of users asking for how to get accurate page, sheet, and document counts because of the discrepancy between Connect and legacy Metadata.

For the sake of completeness, here is the script:

var myJobID = Watch.ExpandString("GetMeta(_vger_job_id[0], 10, Job.Group[0])");

var xhr = new ActiveXObject("Microsoft.XmlHttp");

var totalDocSets = 0;
xhr.open("GET","http://localhost:9340/rest/serverengine/entity/jobs/"+myJobID,false,"","");
xhr.send();

if(xhr.status==200){
        var myJobSegments = JSON.parse(xhr.responseText);
        var myJobSegmentIds =  myJobSegments.identifiers;  //returns an array of job segment ids
        var totalSegments =myJobSegmentIds.length;
        //if you have only one segment, no need to a loop on myJobSegmentIds, take directly myJobSegmentIds[0]
        if (totalSegments > 1){
                for (var i in myJobSegmentIds){
                        xhr.open("GET","http://localhost:9340/rest/serverengine/entity/jobsegments/"+myJobSegmentIds[i],false,"","");
                }
        }
        else{
                xhr.open("GET","http://localhost:9340/rest/serverengine/entity/jobsegments/"+myJobSegmentIds[0],false,"","");
        }

        xhr.send();
        if(xhr.status==200){
                var myDocSets = JSON.parse(xhr.responseText);
                var myDocSetIds = myDocSets.identifiers
                totalDocSets = myDocSetIds.length;

        }

        Watch.log("total doc sets: "+totalDocSets,2);

}

Found your ticket and currently looking into documentation or explanation as to why it is acting like that…will post back once I have an explanation.

@Phil, found me the Improvement request that was created in this regards and we will add you in the list of customer waiting for it. The more customer ask for it, the higher it goes in the todo list.

As for a workaround, please open a ticket and a technician will look into it.

1 Like

Hi hamelj,

If I’m not on that list kindly add me.

Regards,
S

Me too.

Regards,
Darko