We perform many custom validations during the Import phase, mostly in several different events in the ImportAction script. When a submission does not pass a given validation, we use mProcessLog to set the Import status to failure in most Events, however, I can't get the following to work in the PostWorkToMainProcess ImportAction Event:
Is there a way to set the Import status to failure in either the ImportAction/PostWorkToMainProcess or ImportAction/EndProcess Events without scripting a purposely erroneous command? For instance, I can insert RES.PcolScriptInfo.Item("ScriptInfo").ColFlds.Item("Cancel").varValue = True into the PostWorkToMainProcess Event, which will cause the Import to fail because PostWorkToMainProcess is not cancelable, however, I also get an InfoBar Automation Error message that would incite users to call the help desk. I definitely want to avoid that.
Implemented a workaround. Instead of attempting to fail the Import in the ImportAction\PostWorkToMainProcess Event, I instead fail the Validation phase if the error file generated during the ImportAction\PostWorkToMainProcess Event is populated.