ybuffetaud
Active Member
Hi I have the requirement to get the output from the orchestration response in case of failure. We would like to create a table dedicated to end users, so they could now why their request failed.
So if my output is like that :
{ "status":"ERROR", "message" : "SR_FR_GenerationCollecteCreationFicheLogCde1) Code-Control: 019U-13_51, Title: Error: Version Effective - From Date incorrecte, Description: - Mois incorrect (il doit être situé entre 1 et 12). - Jour incorrect (il doit être situé entre 1 et 31, et compatible avec le mois). - Année incorrecte (elle doit être située entre 00 et 99). - Date non entrée. SOLUTION - Entrez une valeur Effective - From Date correcte.", "exception" : "java.lang.Exception", "timeStamp" : "2019-01-25T09:27:41.840+0100", "userDefinedErrorText" : "stefan texte supplémentaire suite err création fiche log!", "type" : "application","exceptionProcessResponse":{"ServiceRequest1":{"fs_P90CB020_W90CB020D":{"title":"Recherche d'opportunités","data":{"gridData":{"id":1,"fullGridId":"1","columns":{"z_DSCRP1_19":"Description","z_AN8_17":"Client Facturation","z_ALPH_18":"Nom client Facturation","z_ALPH_81":"Nom contact Facturation","z_CUSAN8_89":"Client Expédition","z_ALPH_90":"Nom client Expédition","z_ALPH_91":"Nom contact Expédition","z_PBLTY_21":"%","z_CLDATE_22":"Date Clôture","z_PTAMT_23":"Montant Potentiel","z_CRCD_24":"Code Monétaire","z_OPTYCD_25":"Code type Opportunité","z_QUFSCR_26":"Note Qualification","z_QUFGL_27":"Objectif Qualification","z_OPPID_28":"Nº Opp.","z_PBLTYQ_44":"Probabilité Interr."},"rowset":[{"z_OPTYCD_25":"DIR","z_PBLTYQ_44":100,"z_ALPH_18":"Suepermarché 17","z_CRCD_24":"EUR","z_QUFSCR_26":0,"z_ALPH_81":null,"z_AN8_17":2083025,"z_CUSAN8_89":2083025,"z_CLDATE_22":"2018-11-23T01:00:00.000+0100","z_ALPH_91":null,"z_ALPH_90":"Suepermarché 17","z_QUFGL_27":0,"z_DSCRP1_19":"stef67","z_PBLTY_21":100,"z_OPPID_28":446,"z_PTAMT_23":0}],"summary":{"records":1,"moreRecords":false}}},"errors":[],"warnings":[]},"stackId":0,"stateId":0,"rid":"","currentApp":"P90CB020_W90CB020D_FRSAR0001","timeStamp":"2019-01-25:09.27.56","sysErrors":[]}}}
I'd like to get back the following subtext :
So how do I strip this information from the entire strin, I didn't found any cleaver C function in JDE to do that.
If you could help me, It will be great.
I'm running JDE 9.2, tools 9.2.3.1 under an AS400 V7R3.
Regards
So if my output is like that :
{ "status":"ERROR", "message" : "SR_FR_GenerationCollecteCreationFicheLogCde1) Code-Control: 019U-13_51, Title: Error: Version Effective - From Date incorrecte, Description: - Mois incorrect (il doit être situé entre 1 et 12). - Jour incorrect (il doit être situé entre 1 et 31, et compatible avec le mois). - Année incorrecte (elle doit être située entre 00 et 99). - Date non entrée. SOLUTION - Entrez une valeur Effective - From Date correcte.", "exception" : "java.lang.Exception", "timeStamp" : "2019-01-25T09:27:41.840+0100", "userDefinedErrorText" : "stefan texte supplémentaire suite err création fiche log!", "type" : "application","exceptionProcessResponse":{"ServiceRequest1":{"fs_P90CB020_W90CB020D":{"title":"Recherche d'opportunités","data":{"gridData":{"id":1,"fullGridId":"1","columns":{"z_DSCRP1_19":"Description","z_AN8_17":"Client Facturation","z_ALPH_18":"Nom client Facturation","z_ALPH_81":"Nom contact Facturation","z_CUSAN8_89":"Client Expédition","z_ALPH_90":"Nom client Expédition","z_ALPH_91":"Nom contact Expédition","z_PBLTY_21":"%","z_CLDATE_22":"Date Clôture","z_PTAMT_23":"Montant Potentiel","z_CRCD_24":"Code Monétaire","z_OPTYCD_25":"Code type Opportunité","z_QUFSCR_26":"Note Qualification","z_QUFGL_27":"Objectif Qualification","z_OPPID_28":"Nº Opp.","z_PBLTYQ_44":"Probabilité Interr."},"rowset":[{"z_OPTYCD_25":"DIR","z_PBLTYQ_44":100,"z_ALPH_18":"Suepermarché 17","z_CRCD_24":"EUR","z_QUFSCR_26":0,"z_ALPH_81":null,"z_AN8_17":2083025,"z_CUSAN8_89":2083025,"z_CLDATE_22":"2018-11-23T01:00:00.000+0100","z_ALPH_91":null,"z_ALPH_90":"Suepermarché 17","z_QUFGL_27":0,"z_DSCRP1_19":"stef67","z_PBLTY_21":100,"z_OPPID_28":446,"z_PTAMT_23":0}],"summary":{"records":1,"moreRecords":false}}},"errors":[],"warnings":[]},"stackId":0,"stateId":0,"rid":"","currentApp":"P90CB020_W90CB020D_FRSAR0001","timeStamp":"2019-01-25:09.27.56","sysErrors":[]}}}
I'd like to get back the following subtext :
- "status":"ERROR" => I'd like to know if the statut is ERROR or other
- "message" : "SR_FR_GenerationCollecteCreationFicheLogCde1) Code-Control: 019U-13_51, Title: Error: Version Effective - From Date incorrecte, Description: - Mois incorrect (il doit être situé entre 1 et 12). - Jour incorrect (il doit être situé entre 1 et 31, et compatible avec le mois). - Année incorrecte (elle doit être située entre 00 et 99). - Date non entrée. SOLUTION - Entrez une valeur Effective - From Date correcte." => I'd like to have the entire message
- "userDefinedErrorText" : "stefan texte supplémentaire suite err création fiche log!" => i'd like to have the entire message.
So how do I strip this information from the entire strin, I didn't found any cleaver C function in JDE to do that.
If you could help me, It will be great.
I'm running JDE 9.2, tools 9.2.3.1 under an AS400 V7R3.
Regards