I have a workflow, in this workflow it has many loops. Up until this
point they were all working. Now this next one is not. I iterate through
a multi-valued flowdata item by calling the .get() method which will
return an empty string or just the first element. When I want to iterate
I call a function called removeFirstElement() in s mapping activity
which replaces the current value with everything except the first
element. This allows me to iterate through the multiple values without
math. Very nice (I think it came from an example from Wolfgang).

What I can't figure out is why this works in the first 8 places I do
this and not here. I have to figure I'm tired and I am just not seeing
it...

anyways here's the code and trace if anyone sees anything please let me
know, I'm going to sleep before my eyes start bleeding...

-rob

Global Inline Scripts
function msg(m)
{
java.lang.System.out.println('== trace ==> ' + m);
}

function removeFirstElement(flowdata,xpath)
{
msg("removeFirstElement("+xpath+")");

var result = new java.util.Vector();
try
{
var objectsRemaining = flowdata.getObject(xpath)

// start loop with second element
for ( var i=1; i < objectsRemaining.size(); i++)
{
try
{
v=objectsRemaining.get(i).getFirstChild().getNodeV alue();
msg(v);
result.add(v);
}
catch (e) {}
}
}
catch (e)
{
msg("removeFirstElement() "+ e.toString());
}
return result;
} ;

Condition Activity
flowdata.get('start/request_form/PlantProvidedAccess') == ""

False path leads to Entitlement Activity which succeeds

Forward to mapping activity144
removeFirstElement(flowdata,'start/request_form/PlantProvidedAccessList');
==maps to==> flowdata.start/request_form/PlantProvidedAccessList

which fails as follows

2012-09-26 21:05:05,796 INFO [STDOUT] (pool-13-thread-11) 721009492
[pool-13-thread-11] INFO com.novell.soa.af.impl.LogEvent -
[Entitlement_Grant] Entitlement CN=ManualTask,CN=ACME-CUST
Loopback,CN=DirXML-DriverSet,O=CUST with parameter data\Manual\Plant
Provided Access\CIMSI/LDC1 grant
ed by USER_APP; Granting Agent DN: cn=admin,o=CUST; User DN:
CN=EVD1234,OU=Internal ACME,O=CUST
2012-09-26 21:05:05,808 INFO [STDOUT] (pool-13-thread-11) INFO [RBPM]
[com.novell.soa.af.impl.LogEvent:logAFEvent] [Workflow_Forwarded]
Initiated by System, Process ID: 497288d0df6d4d718fd83229102054a5,
Process Name:
cn=ACME-Access-Request-Form,cn=RequestDefs,cn=AppConfig,cn=UserApplica
tion,cn=DirXML-DriverSet,o=CUST:2575, Activity: Activity143, Recipient:
cn=admin,o=CUST
2012-09-26 21:05:05,848 INFO [STDOUT] (pool-13-thread-11) 721009544
[pool-13-thread-11] INFO com.novell.soa.af.impl.LogEvent -
[Workflow_Forwarded] Initiated by System, Process ID:
497288d0df6d4d718fd83229102054a5, Process Name:
cn=ACME-Access-Request-Form,cn=RequestDefs,cn=AppConfig,cn
=UserApplication,cn=DirXML-DriverSet,o=CUST:2575, Activity:
Activity143, Recipient: cn=admin,o=CUST
2012-09-26 21:05:05,858 INFO [STDOUT] (pool-13-thread-11) == trace ==>
removeFirstElement(start/request_form/PlantProvidedAccessList)
2012-09-26 21:05:05,859 INFO [STDOUT] (pool-13-thread-11) == trace ==>
cn=CIMS.NET,ou=Plant Provided Access,o=Manual,dc=data
2012-09-26 21:05:05,859 INFO [STDOUT] (pool-13-thread-11) == trace ==>
cn=BPMS/CIMSI,ou=Plant Provided Access,o=Manual,dc=data
2012-09-26 21:05:05,860 INFO [STDOUT] (pool-13-thread-11) == trace ==>
cn=AS400-LAKE,ou=Plant Provided Access,o=Manual,dc=data
2012-09-26 21:05:05,865 INFO [STDOUT] (pool-13-thread-11) INFO [RBPM]
[com.novell.soa.af.impl.LogEvent:logAFEvent] [Workflow_Error] Initiated
by System, Error Message: null, Process ID:
497288d0df6d4d718fd83229102054a5, Process Name:
cn=ACME-Access-Request-Form,cn=RequestDefs,cn=AppConf
ig,cn=UserApplication,cn=DirXML-DriverSet,o=CUST:2575, Activity:
Activity144, Recipient: cn=admin,o=CUST
2012-09-26 21:05:05,904 INFO [STDOUT] (pool-13-thread-11) 721009601
[pool-13-thread-11] INFO com.novell.soa.af.impl.LogEvent -
[Workflow_Error] Initiated by System, Error Message: null, Process ID:
497288d0df6d4d718fd83229102054a5, Process Name:
cn=ACME-Access-Request-Form,cn=RequestDef
s,cn=AppConfig,cn=UserApplication,cn=DirXML-DriverSet,o=CUST:2575,
Activity: Activity144, Recipient: cn=admin,o=CUST
2012-09-26 21:05:05,906 INFO [STDOUT] (pool-13-thread-11) ERROR [RBPM]
[com.novell.soa.af.impl.LogEvent:logError] [Workflow_Error] Initiated by
cn=admin,o=CUST, Error Message: Process requestId
[497288d0df6d4d718fd83229102054a5], Id
[cn=ACME-Access-Request-Form,cn=RequestDefs,cn=AppConfi
g,cn=UserApplication,cn=DirXML-DriverSet,o=CUST], activityId
[Activity144]: Error updating flow data., Process ID:
497288d0df6d4d718fd83229102054a5, Process Name:
cn=ACME-Access-Request-Form,cn=RequestDefs,cn=AppConfig,cn=UserApplicatio n,cn=DirXML-DriverSet,o=CUST:2575,
Activity: Activity
144, Recipient: cn=admin,o=CUST
2012-09-26 21:05:05,944 INFO [STDOUT] (pool-13-thread-11) 721009642
[pool-13-thread-11] ERROR com.novell.soa.af.impl.LogEvent -
[Workflow_Error] Initiated by cn=admin,o=CUST, Error Message: Process
requestId [497288d0df6d4d718fd83229102054a5], Id
[cn=ACME-Access-Request-Form,cn=RequestD
efs,cn=AppConfig,cn=UserApplication,cn=DirXML-DriverSet,o=CUST],
activityId [Activity144]: Error updating flow data., Process ID:
497288d0df6d4d718fd83229102054a5, Process Name:
cn=ACME-Access-Request-Form,cn=RequestDefs,cn=AppConfig,cn=UserApplicatio n,cn=DirXML-DriverSet,o=CUST:2575,
Act
ivity: Activity144, Recipient: cn=admin,o=CUST
2012-09-26 21:05:06,056 INFO [STDOUT] (http-0.0.0.0-8180-1) INFO
[RBPM] [com.novell.pwdmgt.util.PasswordHelper:loginPortal]
[Login_Success] CN=admin,O=CUST successfully logged in.
2012-09-26 21:05:06,096 INFO [STDOUT] (http-0.0.0.0-8180-1) 721009792
[http-0.0.0.0-8180-1] INFO com.novell.pwdmgt.util.PasswordHelper -
[Login_Success] CN=admin,O=CUST successfully logged in.
2012-09-26 21:05:06,111 INFO [STDOUT] (http-0.0.0.0-8180-1) INFO
[RBPM] [com.novell.soa.af.impl.core.EngineImpl:logAction]
[Provision_Success] Initiated by System, Process ID:
497288d0df6d4d718fd83229102054a5, Process Name:
cn=ACME-Access-Request-Form,cn=RequestDefs,cn=AppConfig,cn=User
Application,cn=DirXML-DriverSet,o=CUST, Activity: ENTITLEMENT,
Recipient: CN=EVD1234,OU=Internal ACME,O=CUST


--
rrawson
------------------------------------------------------------------------
rrawson's Profile: https://forums.netiq.com/member.php?userid=403
View this thread: https://forums.netiq.com/showthread.php?t=42636