cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ME Adding Routing Script

Former Member
0 Kudos

Hi All,

I am trying to add a custom routing script to the system so it can be selected from the dropdown list like other built-in ones(Failure, Pass, etc.).

I created ScriptBO.idat in the Global Configuration. The content looks like this:

     ...

     <SCRIPT_ID>THROW_NC</SCRIPT_ID>

     <DESCRIPTION>I18N[SCRIPT.THROW_NC.desc]</DESCRIPTION>

     ...

I also added value for SCRIPT.THROW_NC.desc in LocaleSpecificText.properties and LocaleSpecificText_en.properties files in the same project:

      SCRIPT.THROW_NC.desc = THROW NC

Then I did full deployment and initial data load. This script is loaded into SCRIPT table in the database and when I tried to select routing script in the "Routing Maintenance" there is a pop-up window with the error message:

java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key SCRIPT.THROW_NC.desc

I was not able to find any document regarding adding custom script to the dropdown list. Can someone please help? Thanks a lot!

-Alex

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You are hitting one of the internationalization features built into the IDAT processing.  In the case of scripts, it expects a bundle entry for each pre-defined script in the IDAT.  Since the language bundle does not include a 'SCRIPT.THROW_NC.desc' entry, it will always fail on IDAT load.

As an alternative, you could create the script using DataXchange instead.  That should allow you to provide the script description in plain text.  The format is very similar to IDAT.

Former Member
0 Kudos

Thanks for the reply Mike. I understand there needs to be a 'SCRIPT.THROW_NC.desc' entry in the resource bundle and put it LocaleSpecificText.properties and LocaleSpecificText_en.properties

SCRIPT.THROW_NC.desc = THROW NC

Is this the wrong place to put the entry?

Actually, I was able to load IDAT and see the new entry in SCRIPT table, the exception was thrown when I tried to edit routing script in "routing maintenance".

Another thing I observed is that DESCRIPTION column of this record in DB is "Throw NC" instead of "I18N[SCRIPT.THROW_NC.desc]". I don't understand why it's using the actual text instead of the key and since the value is loaded why it' still trying to get value from resource bundle?

Thanks,

Alex

Former Member
0 Kudos

Ok, I thought the problem was the IDAT load itself failed.  I think the IDAT logic should attempt to convert the "I18N[SCRIPT.THROW_NC.desc]" using a resource bundle lookup.  It appears it is doing that, but I am not sure why your description is converted to 'Throw NC' since the key SCRIPT.THROW_NC.desc does not exist in the bundle.  If you added this key to a custom bundle, then that might explain it.

Routing Maintenance should not be throwing an exception.  It should be using the description exactly as found in the database.  This may be a bug in Routing Maintenance or something has changed from the code I was looking at (6.x).  You may need tolog a ticket with the stack trace from Routing Maintenance.

Former Member
0 Kudos

Thanks Mike. We are using ME 5.2.7.9.

0 Kudos

Hi Alex,

Basically, it is not recommended to change master/configuration data in order to avoid such issues   By default there is 'Custom' type in that dropdown that fit all custom scripts you create.

Could you share the corresponding data record from SCRIPT table, so I can try the same on my side?

Br,

Alex.

Former Member
0 Kudos

Thanks Alex. We have a requirement to include custom scripts in the dropdown so admins can choose instead of copying and pasting

I have attached sql statement, thanks again for you help!

-Alex