Content Management and Capture

 View Only
  • 1.  Batch abort: possible to automatically unset it?

    Posted Thu April 01, 2021 12:27 PM
    Edited by Walter Fu Thu April 01, 2021 12:46 PM
    This question pertains to Datacap.

    ​I am using an out of box action, let me call it Action1, invoked from Function1. Under a condition, Action1 will request the batch to abort, the action also returns false. What I would like to do is to automatically reset the abort. I then can have Function2 handle the batch.

    Thanks,
    Walter


    The batch is aborted by Action1. I am including the batch portion of the xml below. It does not show a flag that indicates Abort.
    <?xml-stylesheet type="text/xsl" href="..\..\dco.xsl"?>
    <B id="20210401.000001">
     <V n="STATUS">0</V>
     <V n="TYPE">DOCSCANDEBS</V>
     <V n="ScanOperator">idmdcadmin</V>
     <V n="ScanStation">1</V>
     <V n="Scan Operator">idmdcadmin</V>
     <V n="Scan Station">1</V>
     <V n="Scan Time">4/1/2021 8:56:49 AM</V>
     <V n="BatchIdentifier">both</V>
     <P id="TM000001">

    ------------------------------
    Walter Fu
    ------------------------------


  • 2.  RE: Batch abort: possible to automatically unset it?

    Posted Fri April 02, 2021 11:17 AM

    Hi, Walter,

     

    I can't say I've done exactly what you're asking for, but I can point you in a direction.

     

    You'll want to check out the RRState object in a custom action.  Here's a C# example I've used to set two properties for an immediate abort.

     

                    RRState.set_Data(Constants.STATE_SETTING_TASK_STATUS, taskStatusInt);

                    RRState.LogicResult = dcrroLib.ELogicResult.Logic_Stopped;

     

    You may be able to use the same to inspect for an Abort status from Action 1, change it, and handle the error in your Action 2.  This would assume that Action 1 is not already signaling for an immediate abort.

     

    Good luck, and apologies in advance if it turns out to be a dead end for you.  Please let me know your results.

    Robert Stegall / Sr DevOps Engineer

    AAA Texas / Information Systems

    1225 Freeport Parkway, Coppell, TX 75019

    469-221-8384

     

    *** Disclaimer *** This communication (including all attachments) is solely for the use of the person to whom it is addressed and is a confidential AAA communication. If you are not the intended recipient, any use, distribution, printing, or copying is prohibited. If you received this email in error, please immediately delete it and notify the sender.





  • 3.  RE: Batch abort: possible to automatically unset it?

    Posted Mon April 05, 2021 01:03 PM
    Hi Robert,
    Thanks. My rule is like this:
    Function1:
      Action1      // it returns False and requests an Abort
    Function2:   // This function does not get invoked.
      Action2

    So I was not able to run anything after Action1 failed. Below has the details:

    09:11:48.737 (0) t:DC0 p:1A9DB08 Starting PDF to TIF extraction
    09:11:48.830 (94) t:DC0 p:1A9DB08 An error was encountered while converting the image. Decription : File \\ssasvidmsdnv2\Datacap\DOCSCANDEBS\batches\20210405.000002\tm000001.pdf has access restrictions and cannot be added to the document. ,  ,    at FREngine.IEngine.GetNumberOfPagesInImageFile(String ImageFilePath, IImagePasswordCallback PasswordCallback)
       at Datacap.Libraries.Convert.PdfFRE.ExtractTIFFsFromPDFEx(String filePath, Boolean useFastBinarization, Int32 jpegQuality, Int32 resolution, Int32 compressionBW, Int32 compressionColor, Int32 compressionGray, String extensionBW, String extensionColor, String extensionGray, Int32 convertMode, Int32 maxPagesForInMemProcess, String language, Boolean createLayout, Boolean reuseTextInSearchablePdf, String log, String saveDocument, String correctSkewMode)
    09:11:48.830 (0) t:DC0 p:1A9DB08 System.Runtime.InteropServices.COMException (0x80004005): File \\ssasvidmsdnv2\Datacap\DOCSCANDEBS\batches\20210405.000002\tm000001.pdf has access restrictions and cannot be added to the document.
       at FREngine.IEngine.GetNumberOfPagesInImageFile(String ImageFilePath, IImagePasswordCallback PasswordCallback)
       at Datacap.Libraries.Convert.PdfFRE.ExtractTIFFsFromPDFEx(String filePath, Boolean useFastBinarization, Int32 jpegQuality, Int32 resolution, Int32 compressionBW, Int32 compressionColor, Int32 compressionGray, String extensionBW, String extensionColor, String extensionGray, Int32 convertMode, Int32 maxPagesForInMemProcess, String language, Boolean createLayout, Boolean reuseTextInSearchablePdf, String log, String saveDocument, String correctSkewMode)
    09:11:48.830 (0) t:DC0 p:1A9DB08 PDF to TIF extraction complete.
    09:11:48.846 (16) t:DC0 p:1A9DB08 Conversion exception encountered: File \\ssasvidmsdnv2\Datacap\DOCSCANDEBS\batches\20210405.000002\tm000001.pdf has access restrictions and cannot be added to the document.


    09:11:48.846 (0) t:DC0 p:1A9DB08 Setting the batch to abort...
    09:11:48.846 (0) t:DC0 p:1A9DB08                   result 1[1] = false
    09:11:48.846 (0) t:DC0 p:1A9DB08                /call
    09:11:48.846 (0) t:DC0 p:1A9DB08                action returned false
    09:11:48.846 (0) t:DC0 p:1A9DB08                execute statement On Action False
    09:11:48.846 (0) t:DC0 p:1A9DB08                   executing code:
    09:11:48.846 (0) t:DC0 p:1A9DB08                   Call OnActionFailure()
    09:11:48.846 (0) t:DC0 p:1A9DB08  Action esec='0.85938'
    09:11:48.846 (0) t:DC0 p:1A9DB08                /execute statement On Action False
    09:11:48.846 (0) t:DC0 p:1A9DB08                execute statement On Action Abort
    09:11:48.846 (0) t:DC0 p:1A9DB08                   nothing to exec
    09:11:48.846 (0) t:DC0 p:1A9DB08                /execute statement On Action Abort
    09:11:48.846 (0) t:DC0 p:1A9DB08             /action
    09:11:48.846 (0) t:DC0 p:1A9DB08          /func
    09:11:48.846 (0) t:DC0 p:1A9DB08       /rule
    09:11:48.846 (0) t:DC0 p:1A9DB08    /dco
    09:11:48.846 (0) t:DC0 p:1A9DB08 /ruleset
    09:11:48.846 (0) t:DC0 p:1A9DB08 Error (385875969=hex:17000001). In CIMainAlgorithm::execute4DCO: Aborting: Action [PDFFREDocumentToImage] requested abort [api source:]

    09:11:48.846 (0) t:DC0 p:1A9DB08 EXCEPTION: code="385875969" msg="Aborting: Action [PDFFREDocumentToImage] requested abort" loc="CIMainAlgorithm::execute4DCO" API=""
    09:11:48.846 (0) t:DC0 p:1A9DB08 CIMainAlgorithm::Execute::finalize_after_process:
    09:11:48.846 (0) t:DC0 p:1A9DB08 execute statement On Process End
    09:11:48.846 (0) t:DC0 p:1A9DB08    executing code:
    09:11:48.846 (0) t:DC0 p:1A9DB08    Quit()
    09:11:48.846 (0) t:DC0 p:1A9DB08 /execute statement On Process End
    09:11:48.846 (0) t:DC0 p:1A9DB08 CIMainAlgorithm::Execute::finalize_after_process:SaveDCO:
    09:11:48.846 (0) t:DC0 p:1A9DB08 unload script [m0x="1a76954"]
    09:11:48.846 (0) t:DC0 p:1A9DB08    execute statement (null)
    09:11:48.846 (0) t:DC0 p:1A9DB08       executing code:
    09:11:48.846 (0) t:DC0 p:1A9DB08       Call set_CDCOnothing()
    09:11:48.846 (0) t:DC0 p:1A9DB08    /execute statement (null)
    09:11:48.846 (0) t:DC0 p:1A9DB08    script released
    09:11:48.846 (0) t:DC0 p:1A9DB08 /unload
    09:11:48.846 (0) t:DC0 p:1A9DB08 unload COM m0x="1a76924">
    09:11:48.893 (47) t:DC0 p:1A9DB08 /unload
    09:11:48.893 (0) t:DC0 p:1A9DB08 c:\datacap\RRS\Logs\wrrs
    09:11:48.893 (0) t:DC0 p:1A9DB08 end log to batch


    ------------------------------
    Walter Fu
    ------------------------------



  • 4.  RE: Batch abort: possible to automatically unset it?
    Best Answer

    Posted Mon April 05, 2021 01:16 PM

    Have you tried using the ExceptionSetHandler action to avoid the abort?

     

    It's in the Convert -> Datacap.Libraries.Convert.Common library.

     

    Thank you,

     

    Robert Stegall / Sr DevOps Engineer

    AAA Texas / Information Systems

    1225 Freeport Parkway, Coppell, TX 75019

    469-221-8384

     

    *** Disclaimer *** This communication (including all attachments) is solely for the use of the person to whom it is addressed and is a confidential AAA communication. If you are not the intended recipient, any use, distribution, printing, or copying is prohibited. If you received this email in error, please immediately delete it and notify the sender.





  • 5.  RE: Batch abort: possible to automatically unset it?

    Posted Wed April 07, 2021 11:01 AM
    Hi Robert,
    The ExceptionSetHandler is exactly what I needed. I got the exception in Function1 to be skipped and Function2 gets to run. Thank you for your help!
    Regards,
    Walter

    ------------------------------
    Walter Fu
    ------------------------------



  • 6.  RE: Batch abort: possible to automatically unset it?

    Posted Mon April 05, 2021 10:28 AM
    You might be able to accomplish this using Maintenance Manager actions.

    ------------------------------
    Tom DeLuca
    ------------------------------



  • 7.  RE: Batch abort: possible to automatically unset it?

    Posted Mon April 05, 2021 01:07 PM
    Hi Tom,
    I have not looked at using Maintenance Manager yet. Would I be re-routing the batch to a different task if I see it in Abort?
    Thanks,
    Walter​

    ------------------------------
    Walter Fu
    ------------------------------