BPM, Workflow, and Case

 View Only
Expand all | Collapse all

Showing Case Information in "Daeja ViewONE Virtual Viewer"

  • 1.  Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Fri January 20, 2023 02:00 PM
      |   view attached
    Hello Team,

    We have a requirement to show the Case Information (CaseID, Case Creation Date and Custom Properties) on the documents(TIFF) of the case. There should be a button called "Print" in Case Information Page. When the user clicks on it, should open the Viewer and show the documents along with Case Information. This Case Information helps the users to identify for which Case the document belongs to.

    This requirement we have implemented in BPF application with some customization. This is not an annotation object in the content engine. Please check the attachment "BPF_Screenshot1".

    We want to implement the same requirement in Case Manager. Currently all the documents are shown in "Daeja ViewONE Virtual Viewer".

    Could you please help me how to achieve this requirement? Is there any out of the box setting or we need to do customization?

    Thank you in advance.

    ------------------------------
    RAVI KUMAR PATNALA
    ------------------------------


  • 2.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Tue January 24, 2023 11:52 AM
    Hello.

    I don't have any idea on how to do that, but I have interest to know too.

    For what I read on "What's new in 5.0.12" it says it support some kind of watermarking.
    It says:
    "Use watermark on documents
    You can use watermarks in text format and apply on your document for security purpose. You can choose the position, change the size and can rotate, edit and delete your watermarks. You can change the color of watermark from the default light gray. You can add watermark on any page of the document. Refer the Release Notes > Limitations for watermark in documents."

    The release notes says:
    "

    Limitations for watermark in documents:

    • You cannot add watermark in docBuilder mode. 
    • Thumbnails show the watermark only on the pages, which are rendered after you added watermark. 
    • You might see slight difference in the color or transparency of the watermark between render and print. 
    • As watermark is rendered on all the pages, you might see slower performance due to the number of pages of the document.
    • Print or redaction can change the transparency color for the dark color background images."

    But I'm yet not sure how to watermark a document and if this is what you are looking for on your posted sample picture.

    Regards

    ------------------------------
    Martin Iturbide
    Consultant
    Next Step C.A.
    Quito
    ------------------------------



  • 3.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Thu January 26, 2023 08:51 AM
    Hi Martin,

    Thank you for your comment. I think water mark is something which is permanent. I am looking for a temporary annotation. It should only display some case information as soon as the user opens the document. If I download the document, the document must not have the annotation. I do not want to create Annotation objects in Content Engine. I just need temporary annotation.

    If I find the solution, will let you know.

    Regards,
    Ravi

    ------------------------------
    RAVI KUMAR PATNALA
    ------------------------------



  • 4.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    IBM Champion
    Posted Fri January 27, 2023 08:22 AM
    I believe a watermark is an annotation, but regardless, you'd need to create some sort of plugin to do this. If you're in native-navigator case widgets, you'd want to create an ICN response filter plugin that could inject the annotation into the response when the viewer retrieves the annotations from the document repository. I'm not sure how exactly you'd do it if you're using new-style BAW widgets, but I'm fairly confident there's a way to do it by extending the widget or adjusting the service call.

    ------------------------------
    Eric Walk
    Director

    O: 617-453-9983 | NASDAQ: PRFT | Perficient.com
    ------------------------------



  • 5.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Mon January 30, 2023 09:19 AM
    Edited by Kristen Park Tue January 31, 2023 04:32 PM
    I've added small piece of code to replicate your scenario for Daeja viewer in ICN 3.0.13

    //load sample ecm desktop load handler for checks
    require([
        "dojo/_base/lang",
        "ecm/widget/viewer/ContentViewer"
    ], function(lang,ContentViewer) {
    
        ContentViewer.prototype.onDocumentOpened = function(item,preview) {
            setTimeout(lang.hitch(this,function() {
               require(["dojo/query","dojo/_base/array","dojo/dom-construct"], function(query,array,domConstruct) {
                    var n  = query('canvas');
                    if(n && item) {
                        var vp = ["Name" , "Creator" , "DateCreated" , "MinorVersionNumber"];
                        var ps = "";
                        array.forEach(vp, lang.hitch(this,function(v) {
                            ps += "</span>"+v+" &nbsp; : "+item.attributes[v]+"</span> &nbsp; &nbsp; "; // Change this line to get case properties (I am loading document props for demo )
                        }));
                        var d = "<div> Case Information <br> "+ps+"</div>"
                        var domNode = domConstruct.toDom(d);
                        domConstruct.place(domNode,n[0],"before");
                    }
               })
            }),2000);
        }
    
    });​




    ------------------------------
    shashi kumar
    ------------------------------



  • 6.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Wed February 01, 2023 08:16 AM
    Thanks Shashi Kumar. It looks very good

    Can you give me the hint on where do you have to locate that code in Content Navigator?

    Regards

    ------------------------------
    Martin Iturbide
    Consultant
    Next Step C.A.
    Quito
    ------------------------------



  • 7.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Thu February 02, 2023 08:02 AM
    Hi Shashi,

    Thank you. I tried the above code. It works only if I declare "dojo/dom-construct" in the beginning also. Below is the code which is working for me. One issue with this code is, it is getting called only once. If I open the same document or other case document this is not showing Case Information. I think this because of setTimeout(). As per the java script documentation, the function setTimeout() will be called only once.

    //load sample ecm desktop load handler for checks
    require([
        "dojo/_base/lang",
        "ecm/widget/viewer/ContentViewer",
        "dojo/dom-construct"
    ], function(lang,ContentViewer,domConstruct) {
    
        ContentViewer.prototype.onDocumentOpened = function(item,preview) {
            setTimeout(lang.hitch(this,function() {
               require(["dojo/query","dojo/_base/array","dojo/dom-construct"], function(query,array,domConstruct) {
                    var n  = query('canvas');
                    if(n && item) {
                        var vp = ["Name" , "Creator" , "DateCreated" , "MinorVersionNumber"];
                        var ps = "";
                        array.forEach(vp, lang.hitch(this,function(v) {
                            ps += "</span>"+v+" &nbsp; : "+item.attributes[v]+"</span> &nbsp; &nbsp; "; // Change this line to get case properties (I am loading document props for demo )
                        }));
                        var d = "<div> Case Information <br> "+ps+"</div>"
                        var domNode = domConstruct.toDom(d);
                        domConstruct.place(domNode,n[0],"before");
                    }
               })
            }),2000);
        }
    
    });​



    ------------------------------
    RAVI KUMAR PATNALA
    ------------------------------



  • 8.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    IBM Champion
    Posted Thu February 02, 2023 08:11 AM
    I would recommend a different approach, the way this sample code works it's not using actual annotations, so if the user were to print I'm not sure the text would print, even if you can get it to display every time.

    I'd recommend using the Daeja API to inject an actual annotation instead of overriding the DOM as this code is doing.

    addAnnotation(String annotationProperties) - IBM Documentation

    Best,
    Eric

    ------------------------------
    Eric Walk
    Director

    O: 617-453-9983 | NASDAQ: PRFT | Perficient.com
    ------------------------------



  • 9.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Thu February 02, 2023 11:05 AM
    Hi Eric,

    Thank you. You are right. I just noticed that the Case Information is not showing on the page when I print.
    I think I need to create annotation to show on the print out. I will try and let you know.

    ------------------------------
    RAVI KUMAR PATNALA
    ------------------------------



  • 10.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Fri February 03, 2023 03:29 AM
    Hi Ravi,

       Yes , when we open another document daeja opening in same tab content pane and it is not setting case information details on the new document . below code should fix the issue . also I've followed the community post on this question,  If I understand correctly you only want to show the case information details while opening document for information purpose only and you don't want to create any annotations on document  (the below code does same) . let me know if you really want to add annotation on document I can change the code and repost again but please note  that will show annotation while printing document.
    //load sample ecm desktop load handler for checks
    require([
        "dojo/_base/lang",
        "ecm/widget/viewer/ContentViewer",
        "ecm/widget/viewer/ContentViewerPane",
        "dojo/dom-construct"
    ], function(lang, ContentViewer, ContentViewerPane, domConstruct) {
    
        /*ContentViewer.prototype.onDocumentOpened = function(item,preview) {
            setTimeout(lang.hitch(this,function() {
               require(["dojo/query","dojo/_base/array","dojo/dom-construct"], function(query,array,domConstruct) {
                    var n  = query('canvas');
                    if(n && item) {
                        var vp = ["Name" , "Creator" , "DateCreated" , "MinorVersionNumber"];
                        var ps = "";
                        array.forEach(vp, lang.hitch(this,function(v) {
                            ps += "</span>"+v+" &nbsp; : "+item.attributes[v]+"</span> &nbsp; &nbsp; "; // Change this line to get case properties (I am loading document props for demo )
                        }));
                        var d = "<div> Case Information <br> "+ps+"</div>"
                        var domNode = domConstruct.toDom(d);
                        domConstruct.place(domNode,n[0],"before");
                    }
               })
            }),2000);
        };*/
    
        ContentViewerPane.prototype.onDocumentLoaded = function() {
            var tab = this.contentViewerTab;
            if (this.contentViewerTab) { // points to the current opened document contentpane
                var paneNode = this.contentViewerTab.domNode;
                var _this = this;
                require(["dojo/query", "dojo/_base/array", "dojo/dom-construct"], function(query, array, domConstruct) {
                    var n = query('canvas', paneNode); // this limits the case information to be added in current opened document
                    var item = _this.contentViewerTab.viewerItem.item;
                    if (n && item) {
                        var vp = ["Name", "Creator", "DateCreated", "MinorVersionNumber"];
                        var ps = "";
                        array.forEach(vp, lang.hitch(this, function(v) {
                            ps += "</span>" + v + " &nbsp; : " + item.attributes[v] + "</span> &nbsp; &nbsp; "; // Change this line to get case properties (I am loading document props for demo )
                        }));
                        var d = "<div> Case Information <br> " + ps + "</div>"
                        var domNode = domConstruct.toDom(d);
                        domConstruct.place(domNode, n[0], "before");
                    }
                });
    
            }
        }
    
    });​


    ------------------------------
    shashi kumar
    ------------------------------



  • 11.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Fri February 03, 2023 09:06 AM
    Hi Sashi,

    Thank you. Please post the code to add the Annotation. My requirement is, The Case Information Must be shown on Document when I print.

    Regards,
    Ravi

    ------------------------------
    RAVI KUMAR PATNALA
    ------------------------------



  • 12.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Fri February 03, 2023 09:12 AM
    Hi,

    I found IBM documentation regarding customizing FileNet Viewer to show the Header and Footer. I have attached the screen shots. In this sample code, the Header and Footer are static. Whereas I want to show dynamic content. IBM mentioned that it is possible to show dynamic content using servlet. I want to try this as well. Please let me know If you know how to show dynamic content.



    ------------------------------
    RAVI KUMAR PATNALA
    ------------------------------



  • 13.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Tue February 21, 2023 10:54 AM

    Hi,

    Does any one has any idea how to call servlet as per the above IBM documentation. I want to show the header/footer dynamically instead from the static file.

    Could you please help.

    Regards,

    Ravi



    ------------------------------
    RAVI KUMAR
    ------------------------------



  • 14.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Mon February 06, 2023 12:08 PM
    Hi Sashi,

    Thank you. Please post the code to add the Annotation. My requirement is, The Case Information Must be shown on Document when I print.

    Regards,
    Ravi

    ------------------------------
    RAVI KUMAR
    ------------------------------



  • 15.  RE: Showing Case Information in "Daeja ViewONE Virtual Viewer"

    Posted Mon February 13, 2023 03:10 AM

    Hi Sashi,

    Thank you. Please post the code to add the Annotation. My requirement is, The Case Information Must be shown on Document when I print.

    Regards,
    Ravi



    ------------------------------
    RAVI KUMAR
    ------------------------------