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 Question Stockage des erreurs d'execution d'un process

  • Aminatou
  • Aminatou's Avatar Topic Author
15 May 2017 13:57 - 15 May 2017 14:51 #1 by Aminatou
Aminatou created the topic: Stockage des erreurs d'execution d'un process
Bonjour,
Je voudrais gérer de manière globale les erreurs d'execution d'un process. J'arrive à récupérer le message d'erreur. Ce qui me cause des soucis est comment récupérer le nom du composant en erreur?
J'ai ajouté à mon process globale un composant "java native scripting" contenant le code ci dessous

errorsOnly = true;
err = __ctx__.getLstVariablesByName("CORE_STACK_TRACE",errorsOnly);
__ctx__.publishVariable("~/ErrorsFound", err.size());

// Build Error String
errorPath = "";
errorString = "";

if (err.size() > 0) {
errorPath = err.get(0).name;
errorString = err.get(0).value;
}

// Publish to variables on the root process
__ctx__.publishVariable("~/ErrorPath", errorPath);
__ctx__.publishVariable("~/ErrorString", errorString);


la variable "errorString" contient bien le message d'erreur
J'aimerais récupérer dans la variable "errorPath" le nom du composant en erreur
Last Edit: 15 May 2017 14:51 by Aminatou.