Topic
11 replies Latest Post - ‏2014-07-23T16:17:17Z by MoizQ
Hrishikesh Gilda
Hrishikesh Gilda
99 Posts
ACCEPTED ANSWER

Pinned topic Deleting the converted .eml files from from the batch

‏2014-07-22T18:13:46Z |

Hi ,

I have a requirement where I am polling the inbox of an outlook folder and extracting the emails from there. When I extract the emails , one separate document has to be formed consisting of the Email Body and rest of the documents from the attachments.

I am using the basic 'OutlookMessageToImageandAttachment' action which creates two different .eml files. The first .eml file which has the 'Email Body' and no attachments and the other .eml with the'Email Body' and also the attachments.

The .eml file which has no attachments is converted into 1 tiff image consisting of the Email body . And the other Tiff images are formed from the total number of attachments in the email.

For deleting the two .eml files , I assign them as the type 'ToDelete' and then use the action DeleteChildType'(ToDelete) .

I ran a batch which had two attachments in the email. I am able to extract the email body and also the attachments. But I am not able to delete the two .eml files in my hierarchy .

Both these .eml files have the status as '75' and page type as 'ToDelete' but we can see this in the hierarchy. This we can see in the verify stage at the 'Verifine.aspx page'.

This 'ToDelete' seems to work when we convert PDF images to TIFF but with the Email actions they do not get removed.

I am attaching the screen shots of my document hierachy , my rulesets (Page ID and the convert ones) , my batch folder and also the verifine.aspx page where you could see the document hierarchy.

I am also attaching my PageID_rrs.log and my profiler_RRS..log .

Could anyone please help me with this so that these two 'ToDelete' Pages are removed from the hierarchy ?

Thank You.

 

Hrishikesh

Attachments

  • Hrishikesh Gilda
    Hrishikesh Gilda
    99 Posts
    ACCEPTED ANSWER

    Re: Deleting the converted .eml files from from the batch

    ‏2014-07-22T18:17:10Z  in response to Hrishikesh Gilda

    Hi,

    Please find the rest of the attachments in this comment:

    PageID.xml, Profiler.xml and profiler_rrs.log...

     

    Thank You.

    Hrishikesh

    Attachments

    • John Michael Handrop
      155 Posts
      ACCEPTED ANSWER

      Re: Deleting the converted .eml files from from the batch

      ‏2014-07-22T19:09:53Z  in response to Hrishikesh Gilda

      Looks like the Page Type of the items you want deleted are "ToDelete" type.

      Test creating a new Ruleset, call it RemoveEmails
      Add the Ruleset to the DCO under Batch:Open
      Add the Validations.DeleteChildType("ToDelete") to this ruleset

      Let us know your results. Thanks.

      • psalinas_ri
        psalinas_ri
        21 Posts
        ACCEPTED ANSWER

        Re: Deleting the converted .eml files from from the batch

        ‏2014-07-22T21:46:18Z  in response to John Michael Handrop

        ζ(s)=0,

        I have placed the DeleteChildType action in a new ruleset, and placed that rule under the batch's "Open" node, at the end of my PageID task. I still get my supposed deleted documents remaining in my runtime DCO.

        I am not the starter of this topic; but I am following because I have the same issue.

        • MoizQ
          MoizQ
          266 Posts
          ACCEPTED ANSWER

          Re: Deleting the converted .eml files from from the batch

          ‏2014-07-22T22:05:16Z  in response to psalinas_ri

          Did the ruleset fire?  Did you review the RRS log?  It should have sufficient information for you to troubleshoot the problem.


          As for the thread starter, if the page type is being set to 'ToDelete' within the PageID ruleset due to its status, then you will want to call DeleteChildType at the document/batch (whichever is the parent) close level.  If you call the document/batch rule at its open even then that fires prior to the page rule and thus will have no effect.

          • VFMK_Mayank_Singh
            VFMK_Mayank_Singh
            125 Posts
            ACCEPTED ANSWER

            Re: Deleting the converted .eml files from from the batch

            ‏2014-07-23T08:32:52Z  in response to MoizQ

            Hi MoizQ,

            I did as you said and created a new ruleset called "RemoveEmails" which I am calling at the close of the Batch. But still the images remain in the runtime DCO.  The ruleset is fired and the following are the lines seen in the pageID_rrslog :

             

             rule "DeleteChildImages"
            13:45:45.448 (0) t:260C p:BCFB10          result 0[x0] = true
            13:45:45.460 (16) t:260C p:BCFB10          execute statement On Rule Start
            13:45:45.460 (0) t:260C p:BCFB10             executing code:
            13:45:45.460 (0) t:260C p:BCFB10             Call OnRuleStart()
            13:45:45.460 (0) t:260C p:BCFB10          /execute statement On Rule Start
            13:45:45.460 (0) t:260C p:BCFB10          func "Function1"
            13:45:45.460 (0) t:260C p:BCFB10             execute statement On Function Start
            13:45:45.460 (0) t:260C p:BCFB10                executing code:
            13:45:45.460 (0) t:260C p:BCFB10                g_Ftmr=cdbl(Timer)
            13:45:45.460 (0) t:260C p:BCFB10             /execute statement On Function Start
            13:45:45.460 (0) t:260C p:BCFB10             action DeleteChildType (str="ToDelete")
            13:45:45.460 (0) t:260C p:BCFB10                execute statement On Action Start
            13:45:45.460 (0) t:260C p:BCFB10                   executing code:
            13:45:45.460 (0) t:260C p:BCFB10                   Call OnActionStart()
            13:45:45.460 (0) t:260C p:BCFB10  hr_locale = en-US
            13:45:45.461 (0) t:260C p:BCFB10                /execute statement On Action Start
            13:45:45.461 (0) t:260C p:BCFB10  Current number of Children: 1
            13:45:45.461 (0) t:260C p:BCFB10  Removal of ChildType ToDelete complete
            13:45:45.461 (0) t:260C p:BCFB10                result 0[x0] = true
            13:45:45.461 (0) t:260C p:BCFB10                action returned true
            13:45:45.461 (0) t:260C p:BCFB10                execute statement On Action True
            13:45:45.461 (0) t:260C p:BCFB10                   executing code:
            13:45:45.461 (0) t:260C p:BCFB10                   Call OnActionSuccess()

             

            As you can see the number of children is only 1. If instead I convert the PDF images to Tiff and then run the same ruleset , then I am able to see the following lines in the ruleset :

              
            hr_locale = en-US
            12:35:09.832 (0) t:23A8 p:BB2A58                /execute statement On Action Start
            12:35:09.832 (0) t:23A8 p:BB2A58  Current number of Children: 4
            12:35:09.832 (0) t:23A8 p:BB2A58  Deleting Child TM000002
            12:35:09.832 (0) t:23A8 p:BB2A58  Deleting Child TM000001
            12:35:09.832 (0) t:23A8 p:BB2A58  Removal of ChildType ToDelete complete
            12:35:09.832 (0) t:23A8 p:BB2A58                result 0[x0] = true
            12:35:09.832 (0) t:23A8 p:BB2A58                action returned true
            12:35:09.832 (0) t:23A8 p:BB2A58                execute statement On Action True
            12:35:09.832 (0) t:23A8 p:BB2A58                   executing code:

             

            Here I took 2 PDFs and the number of children were 4 and this deleted the original PDFs from the hierarchy. But with the .eml files it does not work.

            I am attaching my PageID_rrs.log and also screenshot of my Document hierarchy. Could you please help me with this ?

             

            Attachments

            Updated on 2014-07-23T08:34:06Z at 2014-07-23T08:34:06Z by VFMK_Mayank_Singh
      • VFMK_Mayank_Singh
        VFMK_Mayank_Singh
        125 Posts
        ACCEPTED ANSWER

        Re: Deleting the converted .eml files from from the batch

        ‏2014-07-23T08:36:15Z  in response to John Michael Handrop

        Hi ζ(s)=0

        I did as you said but the results are the same.I tried putting the RemoveEmail ruleset at both the start and end of the batch but somehow it does not work. I have attached my screenshots and my logs above.

         

        Could you please have a look and let me know if you could provide me any inputs.

        Regards,

        Mayank Singh

        • psalinas_ri
          psalinas_ri
          21 Posts
          ACCEPTED ANSWER

          Re: Deleting the converted .eml files from from the batch

          ‏2014-07-23T13:44:08Z  in response to VFMK_Mayank_Singh

          All,

          I actually found what causes this issue, and the resolution for it.

          Putting it in either the "Open" or "Close" of the batch will not work. Now, since the email scan action already creates a document DCO object of type "Document", I figured maybe I needed to define a Document object in my DCO called "Document". Then, place the "DeleteDocs" rule (whatever that may be called) in the "Close" of the document object. Please see screenshot. Now my runtime DCO (PageID.xml) is free of the "ToBeDeleted" pages.

          • VFMK_Mayank_Singh
            VFMK_Mayank_Singh
            125 Posts
            ACCEPTED ANSWER

            Re: Deleting the converted .eml files from from the batch

            ‏2014-07-23T15:21:32Z  in response to psalinas_ri

            Hi psalinas_ri,

            Just to be clear on what you said above.  

            Should I create one new document ,which could be called 'Document' and then assign the 'DeleteDocs' ruleset ?

            And does this work with PDFs too ?

            I will just try it out and let you know. Thank you.

            Regards,

            Mayank Singh

          • VFMK_Mayank_Singh
            VFMK_Mayank_Singh
            125 Posts
            ACCEPTED ANSWER

            Re: Deleting the converted .eml files from from the batch

            ‏2014-07-23T15:50:06Z  in response to psalinas_ri

            Hi psalinas_ri,

            It works with both the email ones and also the PDF ones. Thanks a lot for your help.

            Can you please also elaborate a bit on how you arrived at this solution by looking at the logs ? Where in the logs did you see that the  email scan action creates a document DCO object of type "Document" ? and how did you solve this ?

            Thanks again,

            Mayank Singh

            • psalinas_ri
              psalinas_ri
              21 Posts
              ACCEPTED ANSWER

              Re: Deleting the converted .eml files from from the batch

              ‏2014-07-23T15:59:49Z  in response to VFMK_Mayank_Singh

              Mayank,

              It wasn't in the logs at all; i did not have a document object in the setup DCO called "Document" before. It was just some deductive reasoning that led me to try it. Since the pages were already arranged in a document object - and not free-standing like they would be in a regular VScan batch (as they are in my "Main Job"), I just figured my actions needed to fall in line with the runtime DCO that was given to me by the email scan action.

              Now, getting my desired page objects into my desired document object (called "BHDocument") is going to take me a little more work, but at least I have my documents that were to be deleted (.eml's, '.pdf's) out of the runtime DCO.

              Good luck in your dev,

              Paul

              • MoizQ
                MoizQ
                266 Posts
                ACCEPTED ANSWER

                Re: Deleting the converted .eml files from from the batch

                ‏2014-07-23T16:17:17Z  in response to psalinas_ri

                That's one way to go about it, but the RRS log shows all nodes that can be potentially stopped upon.  The RRS log linked earlier shows 1 child found by the DeleteChildType action, and peeling back a bit from the action shows the document node in question, which should be preceded by at least 1 page that is marked for deletion if classification is correctly done (else they'll be Other, etc.).

                Since these are close events, Parent:Open -> Child:Open -> Child:Child:Open -> [...] -> Child:Child:Close -> Child:Close -> Parent:Close is the logical flow of execution.  Therefore you can see, if necessary through the logs, what objects are potentially children of what.

                Of course, it's much easier to simply look at the run-time hierarchy after task execution - if the rulesets included in the task profile allow for it (e.g. do not manipulate the hierarchy further in some way that would prevent successful auditing).

                BTW: the RRS log linked earlier only had 1 reference to "ToDelete", and that was in the DeleteChildType action.  So there's some flakiness in the example linked.