I have attempted to include a custom method execution statement in an XML application and am receiving a string index out of range error. I have narrowed the issue down to passing an element variable as an argument to the method. So based on the XML Application documentation, I thought I had determined this to be legal:
1. Declare appropriate java class(es) in XML application.
2. Declare a variable to capture the specific XML element I need to analyze in the custom method
3. Pass the variable defined in 2 to the method in 1 (receive in the method as a string)
4. Process the XML string
5. Return a string value (to be stored into a dctm_attr) as a string
So the behavior I'm seeing is that I'm able to pass a string to my custom method, however when I try to pass the element variable the following stack trace is provided in the log and from the client:
13:36:50,111 ERROR [http-8080-1] com.documentum.webcomponent.library.contenttransfer.checkin.CheckinContainer - WARNING: unexpected error occured
DfException:: THREAD: Timer-61; MSG: String index out of range: 50; Additional msg: String index out of range: 50; ERRORCODE: ff; NEXT: null
at com.documentum.xml.DfBuildNodeFromXML.execute(DfBuildNodeFromXML.java:345)
at com.documentum.xml.DfDetectAppAndBuildNodes.executeInternal(DfDetectAppAndBuildNodes.java:401)
at com.documentum.xml.DfDetectAppAndBuildNodes.execute(DfDetectAppAndBuildNodes.java:30)
at com.documentum.operations.nodeactions.inbound.DfApplyXMLForImport.applyXMLApplication(DfApplyXMLForImport.java:186)
at com.documentum.operations.nodeactions.inbound.DfApplyXMLForImport.execute(DfApplyXMLForImport.java:41)
at com.documentum.operations.steps.impl.OperationStep.executeStep(OperationStep.java:151)
at com.documentum.operations.steps.impl.OperationStep.execute(OperationStep.java:40)
at com.documentum.operations.impl.OperationExecutionEngine.execute(OperationExecutionEngine.java:51)
at com.documentum.operations.DfOperation.execute(DfOperation.java:342)
at com.documentum.operations.inbound.impl.InboundOperation.execute(InboundOperation.java:104)
at com.documentum.web.contentxfer.DFCOperationSupport.execute(DFCOperationSupport.java:61)
at com.documentum.web.contentxfer.ContentTransferService.execute(ContentTransferService.java:377)
at com.documentum.web.contentxfer.JobAdapter.execute(JobAdapter.java:108)
at com.documentum.job.async.AsyncJobManager$AsyncTimerJob.executeJob(AsyncJobManager.java:236)
at com.documentum.job.async.AsyncJobManager$AsyncTimerJob.run(AsyncJobManager.java:215)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
...
The syntax I've used to include the variable reference in my XML application config file is:
<dctmattr_repeating>
<name>sys_attr_name</name>
<template><expression>myMethod:getStr(<var name="myVar"/>)</expression></template>
</dctmattr_repeating>
Does anyone have a suggestion for where I may be going wrong? Thanks.