Topic
  • 1 reply
  • Latest Post - ‏2013-07-04T11:29:45Z by franzw
NinadTamras
NinadTamras
11 Posts

Pinned topic Error when using Map Relevant Data

‏2013-07-02T17:53:47Z |
In ITIM 5.0, when I try to retrieve the Map object from Relevant Data and try to print its size using below script :
 
var participantMap = approverDNMap.get();
process.auditEvent("participantMap.size() = " + participantMap.size());
 
Then I am getting the below exception :
 
Error calling method 'size()' on an object of type 'object'
 
And When I try to retrieve the Map object from Relevant Data and try to print its size using below script :
 
var participantMap = (java.util.ArrayList)approverDNMap.get();
process.auditEvent("participantMap.size() = " + participantMap.size());
 
Then I am getting the below exception :
 
The following error occurred.
Error: Syntax error at line 30, column 41.
Invalid 'approverDNMap'
 
I am not able to figure out how to work with the collection objects in Relevant Data Items.
 
Could anyone please look into this and provide me pointers on the same.

 

Regards,

Ninad

 
  • franzw
    franzw
    396 Posts

    Re: Error when using Map Relevant Data

    ‏2013-07-04T11:29:45Z  

    Take a look at this technote : http://www.ibm.com/support/docview.wss?uid=swg21426000

    It explains a little bit how Maps are used in IBMJS.

    To enable Java methods directly in IBMJS you will have to add the to the scriptframework.properties. This line will add support for java.util :

    ITIM.java.access.util=java.util.*

    But be aware that casting in the normal Java way is npot supported in IBMJS.

    HTH

    Regards

    Franz Wolfhagen