The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…
Can you be more precise please ?
Is it that you want to read the error message ? Or you want to get it in a variable and use it after ? Or you want to send it by email ? or to a file ?
When an action has an error, these variables are set like this :
- CORE_RET_CODE = -1
- CORE_RET_MESS = a single line error message
- CORE_STACK_TRACE = a more detailed error (java stack trace in most cases)
You can refer to these variables from a SqlOperation like this :
INSERT INTO yourtable VALUES (${../ACTION_NAME/CORE_RET_CODE}$, '${../ACTION_NAME/CORE_RET_MESS}$')
(replace ACTION_NAME with the name of the action in error).
And then you can develop a process which reads the table and sends data by email.
From a mapping, the syntax is the same.
The idea is to find the path to the desired action. The path to an action can be found in the CORE_PATH variable of the executed action.
Is there a way to retrieve the last error message, without knowing what ACTION it came from ?
I would actually like to manage any error in a specific subprocess, no matter where it occured. Is that possible, and what is the best way to do it according to you ?
Hello,
Actually this is possible with a Scripting action relying on the Runtime's API.
We can prepare an example of a tool which does this, in the next few days.