回答是肯定的。
因为WorkflowData中可以设置ErrorText,然后将下一个状态设置为Error,这样就可以将批次置入到质量控制中。
记住我的教训:不要直接抛出异常来将批次置入质量控制中,因为AC存在的一个bug,如果你这样操作将导致批次永远停留在质量控制中,怎么关闭批次都出不来?(不过如果你在批次管理器中查看一下批次的属性,再进质量控制中关闭批次,发现又可以出来啦。奇怪)
还有更加标准的方法如下:
就是访问ACDataElement,将Runtime批次的State设置成32即可。
--------
The Ascent Capture error log will show all errors that are encountered within Ascent Capture, including those that cause the Batch to be forwarded to the Quality Control (QC) module. The Ascent Capture error log will also list various status updates along with errors; this includes errors that do not cause a Batch to be routed to QC. As a consequence, the use of the Ascent Capture error log for this particular task is not practical.
The User Tracking database will show when a Batch has been routed to QC and the status of that Batch, but the structure of the User Tracking database makes it less than efficient for this type of application.
If attempting to determine which batches are being routed to QC because of an error status, the best solution is to do so through a Workflow Agent (WFA).
A Workflow Agent can make use of the ACWorkflowModule and ACDataElement objects.
The ACWorkflowModule object contains the ACWorkflowState and ACWorkflowStates collection which can be used to assess a Batch’s status.
An easier method, however, is to use the ACDataElement object to access the Batch's state.
The file ACBatch.htm located in the Ascent shared folder details the layout of the ACDataElement object. On a Standalone system, this file islocated in the "Ascent" folder. On a client/Server system, this file is located in the "AscentSV" folder.
The Batch element for the Batch has the attribute "State" which reflects the Batch’s status: Ready, Suspended, Error, Completed or Reserved. If a Batch has encountered an error, the "State" attribute will be set to a value of "32" or "Error".
The ACDataElement can be used to check the Batch's state after it has been processed after each module to determine the Batch status. The Workflow Agent can then take the desired actions to update the Ascent Capture system administrator as needed.