-
Notifications
You must be signed in to change notification settings - Fork 1
Process Station
As most workers will be called from process station this part of the settings will be more complex, it's also common to send parameters to the workers, that can be passed as settings.
Let's break down this portion of the file.
60. <Pipeline Target="ProcessStation" RunAt="Service">
61. <StepList>
62. <Step From="Workspace:ToProcess" Using="PrefetchWorker" To="ToProcess">
63. <SettingList>
64. <Setting Name="DownloadDoc" Value="True" />
65. <Setting Name="bufferSize" Value="5" />
66. </SettingList>
67. </Step>
This is basic settings to get the documents that are in the state ToProcess in the database and send them to a queue to be processed locally (local ToProcess).
68. <Step From="ToProcess" Using="OCRExtractionWorker" To="OCRCompleted">
69. <SettingList>
70. <Setting Name="OcrSavePageText" Value="False" />
71. <Setting Name="PdfExtractTextWords" Value="True" />
72. <Setting Name="OcrEngine" Value="" />
73. <!-- OcrEngineCustomParams: plafondPath; saveGoogleOcr; settingsGoogleOcrPageModelPrefixFieldName -->
74. <Setting Name="OcrEngineCustomParams" Value=";False" />
75. </SettingList>
76. </Step>
Next the process station will preform optical character recognition (OCR) extraction, here you can set if you want to save OCR, set if available to extract OCR embedded in pdf files, and which provider to use. Recently we added Google API as a external OCR provider for better performance in natural image documents. See OCR Providers to know more.
78. <Step From="OCRCompleted" Using="ProcessInvoiceWorker" To="DocumentRecognized" Assembly="SmartDocumentor.GenericPlugin" Namespace="SmartDocumentor.GenericPlugin.Workers">
79. <SettingList>
80. <Setting Name="WebApiUrl" Value="" />
81. <Setting Name="WebApiKey" Value="" />
82. <Setting Name="WebApiSecret" Value="" />
83. <Setting Name="RemoveCalculatedFields" Value="True" />
85. <Setting Name="CustomerFiscalNumber" Value="" />
86. <Setting Name="UseTaskOCR" Value="False" />
87. <Setting Name="UseOnlyFirstPage" Value="false" />
88. </SettingList>
89. </Step>
Here the documents are sent to the process station passing by the custom plugin. If you want to send them to the SmartDocumentor's API you to need to set the WebApiUrl, WebApiKey and WebApiSecret to call the API. Contact us asking the elements you need.
90. <Step From="OCRCompleted" Using="BaseProcessDocumentWorker" To="DocumentProcessed" Assembly="SmartDocumentor.GenericPlugin" Namespace="SmartDocumentor.GenericPlugin.Workers">
91. <SettingList />
92. </Step>
93. <Step From="DocumentProcessed" Using="TaskUploadWorker" To="Workspace:ToReview">
94. <RetryPolicyConfig Type="RetryN" NumberOfRetries="5" IntervalBetweenRetries="5" />
95. <SettingList />
96. </Step>
97. <Step From="Workspace:ToIntegrate" Using="RouterWorker" To="Integrated">
98. <SettingList>
99. <Setting Name="route:Integrate" Value=""{$ReviewAction}"=="Integrate Document"" />
100. <Setting Name="route:Deleted" Value=""{$ReviewAction}"=="Delete Document"" />
101. </SettingList>
102. </Step>
103. <Step From="Deleted" Using="TaskUploadWorker" To="Workspace:Deleted">
104. <RetryPolicyConfig Type="RetryN" NumberOfRetries="5" IntervalBetweenRetries="5" />
105. <SettingList />
106. </Step>
Inside this block it is showed how to set multiples paths after the same step. Here we send the document to be deleted locally and at the same time to run a integration process.
107. <Step From="Integrate" Using="GenericOutputWorker" To="Integrated" Assembly="SmartDocumentor.GenericPlugin.Demo" Namespace="SmartDocumentor.GenericPlugin.Demo.Workers">
108. <SettingList>
109. <Setting Name="OutputFolder" Value="C:\devscope\DemoInvoice\Output" />
110. <Setting Name="ConfigFileName" Value="SmartDocumentor.GenericPlugin.InvoiceDemo.Fields.xml" />
111. <Setting Name="PluginId" Value="Invoice" />
112. </SettingList>
113. </Step>
114. <Step From="Integrated" Using="TaskUploadWorker" To="Workspace:Final">
115. <SettingList />
116. </Step>
117. </StepList>
118. <Design>
119. <Elements />
120. </Design>
121. </Pipeline>
Integration process can be personalized from the client's plugin. It's common from the clients to require to be kept a PDF file with the original document and to write to a specific API our XML file. Here we are outputting the file to an output folder.
This is a high level view of the configuration part of the process station. Please take a look at our SmartDocumentor Workers Documentation to see more about each process.
Adress: R. de Passos Manuel 223 3°, 4000-385 Porto, Portugal
Email: support@devscope.net
Phone: +315 22 375 1350
Working Days/Hours: Mon-Fri/9:00AM-19:00PM
Copyright © DevScope