Hi

I create an array of records from a configuration object that contains
default resources in the below code. The bottom "for loop" is for
debugging purposes and the array appears to fail to be set into the
flowdata variable in the .setValue command. Any help would be
appreciated.

12:11:27,902 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.script.impl.lang.es.impl.EcmaScript Engine:executeExpression]
Evaluating the script : var defaultResourceData = '';
var paramValue = new Array();

defaultResourceData = flowdata.get('resourceList')

var temp = defaultResourceData.split(';');
var temp2 = '';

if(temp.length == defaultResourceData.length) {
var resourceRecord = {resourceDN: '', entitlement: ''};

temp2 = defaultResourceData.split(':');
resourceRecord.resourceDN = 'cn=' + temp2[0] + ',' +
flowdata.get('resourceBaseDN');
resourceRecord.entitlement = temp2[1];
resourceRecord;
} else {
for (var i = 0; i < temp.length; i++)
{
var resourceRecord = {resourceDN: '',
entitlement: ''};

var param = temp[i].toString().split(':');
resourceRecord.resourceDN = 'cn=' + param[0] +
',' + flowdata.get('resourceBaseDN');
resourceRecord.entitlement = param[1];
paramValue.push(resourceRecord);
}
for (var i = 0; i < paramValue.length; i++)
{
Packages.java.lang.System.out.println(
"ResourceDN = " + paramValue[i].resourceDN );
Packages.java.lang.System.out.println(
"Entitlement = " + paramValue[i].entitlement );
}
paramValue;
}
12:11:27,909 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.script.impl.lang.es.impl.EcmaScript Engine:executeExpression]
Evaluating the script : wi.XPath("flow-data/resourceList")
12:11:27,911 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.script.impl.lang.es.impl.EcmaScript Engine:executeExpression]
Evaluating the script : wi.XPath("flow-data/resourceBaseDN")
12:11:27,912 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.script.impl.lang.es.impl.EcmaScript Engine:executeExpression]
Evaluating the script : wi.XPath("flow-data/resourceBaseDN")
12:11:27,936 INFO [STDOUT] ResourceDN = cn=TST LM RM SEQ
AC,ou=ResourceDefs,ou=RoleConfig,ou=AppConfig,ou=U ser
Application,ou=IAMDriverSet2,ou=South,ou=Services, o=IAM
12:11:27,936 INFO [STDOUT] Entitlement = Administrator
12:11:27,937 INFO [STDOUT] ResourceDN = cn=TST LM RM
BC,ou=ResourceDefs,ou=RoleConfig,ou=AppConfig,ou=U ser
Application,ou=IAMDriverSet2,ou=South,ou=Services, o=IAM
12:11:27,937 INFO [STDOUT] Entitlement = Super User
12:11:27,938 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.af.impl.core.DataItemEvaluator:eval uateSource] result:
com.novell.soa.script.mozilla.javascript.NativeArr ay@37946f0c
12:11:27,938 INFO [STDOUT] TRACE [RBPM]
[com.novell.soa.af.impl.activity.ActivityNode:forwa rd] forward(),
activity=Parse Data[Activity2], link=FORWARD[Activity2, Activity10]
12:11:27,946 INFO [STDOUT] TRACE [RBPM]
[com.novell.soa.af.impl.link.Link:<init>] Link() SUCCESS[Activity10,
Activity]
12:11:27,947 INFO [STDOUT] TRACE [RBPM]
[com.novell.soa.af.impl.core.ProcessImpl:forward] forward()
current=Parse Data[Activity2], next=Get Assigned Resources[Activity10]
12:11:27,953 INFO [STDOUT] TRACE [RBPM]
[com.novell.soa.af.impl.activity.ActivityNodeersistStatus]
persistStatus() activity=Parse Data[Activity2], newStatus=Departing
12:11:27,964 INFO [STDOUT] TRACE [RBPM]
[com.novell.soa.af.impl.activity.ActivityNode:notif yDepart]
notifyDepart(), activity=Parse Data[Activity2]
12:11:27,965 INFO [STDOUT] TRACE [RBPM]
[com.novell.soa.af.impl.activity.ActivityNode:apply Changes]
applyChanges() activity=Parse Data[Activity2]
12:11:27,974 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.script.impl.lang.es.impl.EcmaScript Engine:executeExpression]
Evaluating the script : flowdata.getObject('defaultResourceArr
ay')
12:11:27,975 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.script.impl.lang.es.impl.EcmaScript Engine:executeExpression]
Evaluating the script : wi.XPath("flow-data/defaultResourceArr
ay")
12:11:27,976 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.af.impl.core.DataItemEvaluator:eval uateTarget]
evaluating target expression:
wi.createXPath("flow-data/defaultResourceArray
[1]").setValue("com.novell.soa.script.mozilla.javascr ipt.NativeArray@37946f0c")
12:11:27,976 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.script.impl.lang.es.impl.EcmaScript Engine:executeExpression]
Evaluating the script : wi.createXPath("flow-data/defaultResou
rceArray[1]").setValue("com.novell.soa.script.mozilla.javascr ipt.NativeArray@37946f0c")
12:11:27,980 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.af.impl.core.DataItemEvaluator:eval uateTarget] result:
com.novell.soa.script.mozilla.javascript.Undefined @10ad635b
12:11:27,981 INFO [STDOUT] DEBUG [RBPM]
[com.novell.soa.af.impl.activity.ActivityNode:apply Changes] Flushing
Hibernate Session


--
gerardtaylor
------------------------------------------------------------------------
gerardtaylor's Profile: https://forums.netiq.com/member.php?userid=5528
View this thread: https://forums.netiq.com/showthread.php?t=48372