Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Deleted Retrieving the error message

More
22 May 2015 11:36 #1 by ikafai
ikafai created the topic: Retrieving the error message
HI,

How can I retrieve the error message of an action ?

Regards
More
01 Jun 2015 15:10 #2 by Thomas BLETON
Thomas BLETON replied the topic: Retrieving the error message
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 ?
More
01 Jun 2015 15:22 #3 by ikafai
ikafai replied the topic: Retrieving the error message
Hi Thomas,
I want to save it in a table, and then send it by email.
More
01 Jun 2015 17:46 #4 by Thomas BLETON
Thomas BLETON replied the topic: Retrieving the error message
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.
More
16 Jun 2015 11:11 #5 by ikafai
ikafai replied the topic: Retrieving the error message
Thanks Thomas, It Works
More
09 Jul 2015 13:54 #6 by Virginie_Samson
Virginie_Samson replied the topic: Retrieving the error message
Hello
And what about, if you want to use it in a mapping?
Is it a different syntax?

Thanks
More
10 Jul 2015 16:00 #7 by Thomas BLETON
Thomas BLETON replied the topic: Retrieving the error message
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.
More
19 Oct 2015 15:16 #8 by fvieillard
fvieillard replied the topic: Retrieving the error message
Hi

Thanks for the tips on retrieveing the message.

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 ?

Thanks !
More
19 Oct 2015 18:14 #9 by Thomas BLETON
Thomas BLETON replied the topic: Retrieving the error message
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.
More
19 Oct 2015 18:24 #10 by fvieillard
fvieillard replied the topic: Retrieving the error message
Hello

Thanks for your answer !
If it's not too complicated, I'd like to see an example :)

Will it be possible to write the result message to a variable and use it to insert into a table ?

Good evening,
François