In my PlanetPress Conect workflow I call +PReS Enhance workflow using REST service and HTTP Client Input component (http://localhost:9340/rest/serverengine/workflow/outputcreation/execute/).
In +PReS Workflow I use Validate component to throw fatal error when there is a problem with metadata (see weaver config below).
<component class="nl.edmond.workflow.components.validate.Validate" id="validate-1">
<config>
<validate>
<rule scope="document" severity="fatal">
<condition>document.myMetadata.DocId == undefined</condition>
<message>DocId not found! TemplateId = ${document.TemplateId}, page number = ${document.sequence.job}</message>
</rule>
</validate>
</config>
</component>
My error message goes to Weaver log (see below), but I want to return it to the calling PlanetPress workflow (and then send it to the error handler).
Is it possible? I want to inform my internal users (and IT Staff) what caused the error during the processing.
FATAL [28 Nov 2017 08:05:03,623][qtp668777304-26] nl.edmond.workflow.components.validate.Validate.beforeStart(Validate.java:?) DocId not found! TemplateId = 4839, page number = 1
ERROR [28 Nov 2017 08:05:03,625][qtp668777304-26] nl.edmond.weaver.engine.WeaverEngineImpl.a(WeaverEngineImpl.java:?) A FATAL-level validation did not succeed
ERROR [28 Nov 2017 08:05:04,399][qtp668777304-26] com.objectiflune.weaver.service.rest.WeaverRestService.execute(WeaverRestService.java:?) A FATAL-level validation did not succeed
com.objectiflune.core.base.ApplicationException: A FATAL-level validation did not succeed
at com.objectiflune.weaver.service.impl.WeaverServiceImpl.execute(WeaverServiceImpl.java)
at com.objectiflune.weaver.service.rest.WeaverRestService.execute(WeaverRestService.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)