Decision Management & Intelligence (ODM, DI)

Decision Management & Intelligence (ODM, DI)

Connect with experts and peers to elevate technical expertise, solve problems and share insights


#Data
#Data
#Businessautomation
#DecisionManagement
 View Only
  • 1.  Class Casting

    Posted 07/14/21 01:29 PM

    Hello - I am stuck with classcastexception during the run time

    I have a nested complex type which has complex type of list and trying to get the first list item as below

    sources = (java.util.List)sourceGroups.get(sgCount-1);

    This is fine with no errors but during runtime there is an exception...

    Here sources is java.util.List and sourceGroups is of type list<SourceGroup> where SourceGroup is another complex type.

    How can I resolve this issue? Kindly suggest...

    Thanks,



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 2.  RE: Class Casting
    Best Answer

    Posted 07/14/21 02:46 PM

    if sourceGroups is a list of SourceGroup the operation get() is going to return a SourceGroup and not a list no? should you cast to SourceGroup first

    then inside the SourceGroup there is an attribute of type list.



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 3.  RE: Class Casting
    Best Answer

    Posted 07/14/21 03:48 PM