Having trouble understanding why my arraylist.size is increasing. For
this test the user is selecting NO roles so the arraylist.size should be
“0”

I have a mapping activity 14, which returns flowdata.rolelist from this
expression

function imgroleadd(){
var pg = flowdata.get('start/request_form/Permission_Group');
Packages.java.lang.System.out.println(pg);
if (flowdata.get('start/request_form/Permission_Group') != "") {
Packages.java.lang.System.out.println(pg);
}
var rolelist = new Packages.java.util.ArrayList();
Packages.java.lang.System.out.println( "ADD Role");
var roles_checked = "";
var num_roles_checked = 0;
fieldNameSelectedOnSubmit = new Array();
fieldNameSelectedOnSubmit[0] = 'IMG';
fieldNameSelectedOnSubmit[1] = 'IMG_LI';
fieldNameSelectedOnSubmit[2] = 'IMG_PD';

for( i=0;i<fieldNameSelectedOnSubmit.length;i++)
{
if
(flowdata.get('start/request_form/'+fieldNameSelectedOnSubmit[i].toString()
) == 'true') {
rolelist.add("cn=" +fieldNameSelectedOnSubmit[i].toString()
+",cn=Level20,cn=RoleDefs,cn=RoleConfig,cn=AppConf ig,cn=UserApplication,cn=idmdrivers,ou=iservices,o =la");

Packages.java.lang.System.out.println("PRINT READLIST: "
+fieldNameSelectedOnSubmit[i].toString());
}
}
Packages.java.lang.System.out.println("READLIST CNT: "
+rolelist.size());
return rolelist;
}
imgroleadd();


It successfully prints READLIST CNT as “0”

Immediately next comes another mapping activity to set a counter and
return flowdata.rolecounter


function rcounter(){
var rc = flowdata.getObject('rolelist').size();
Packages.java.lang.System.out.println("RC: " +rc);
return rc
}
rcounter();

However this section prints RC as “1”. How can this be?

g,cn=UserApplication,cn=idmdrivers,ou=iservices,o= la:3196, Activity:
Activity15, Recipient: cn=IDM,o=la
2013-05-15 12:03:52,670 INFO [STDOUT] (pool-13-thread-6) ADD Role
2013-05-15 12:03:52,672 INFO [STDOUT] (pool-13-thread-6) READLIST CNT:
0
2013-05-15 12:03:52,677 INFO [STDOUT] (pool-13-thread-6) INFO [RBPM]
[com.novell.soa.af.impl.LogEvent:logAFEvent] [Workflow_Forwar
ded] Initiated by System, Process ID: fe8d694f9c534a76a7dd214abb8ce2d1,
Process Name: cn=IMG2,cn=RequestDefs,cn=AppConfig,cn=UserApp
lication,cn=idmdrivers,ou=iservices,o=la:3196, Activity: Activity4,
Recipient: cn=IDM,o=la
2013-05-15 12:03:52,677 INFO [STDOUT] (pool-13-thread-6) 9764870340
[pool-13-thread-6] INFO com.novell.soa.af.impl.LogEvent - [Wor
kflow_Forwarded] Initiated by System, Process ID:
fe8d694f9c534a76a7dd214abb8ce2d1, Process Name:
cn=IMG2,cn=RequestDefs,cn=AppConfi
g,cn=UserApplication,cn=idmdrivers,ou=iservices,o= la:3196, Activity:
Activity4, Recipient: cn=IDM,o=la
2013-05-15 12:03:52,681 INFO [STDOUT] (pool-13-thread-6) RC: 1
2013-05-15 12:03:52,686 INFO [STDOUT] (pool-13-thread-6) INFO [RBPM]
[com.novell.soa.af.impl.LogEvent:logAFEvent] [Workflow_Forwar
ded] Initiated by System, Process ID: fe8d694f9c534a76a7dd214abb8ce2d1,
Process Name: cn=IMG2,cn=RequestDefs,cn=AppConfig,cn=UserApp
lication,cn=idmdrivers,ou=iservices,o=la:3196, Activity: Activity,
Recipient: cn=IDM,o=la


--
ncisrael
------------------------------------------------------------------------
ncisrael's Profile: https://forums.netiq.com/member.php?userid=769
View this thread: https://forums.netiq.com/showthread.php?t=47764