Hi,
I created a simple process that gets initiated by a trigger. I used an XML to create Custom variables for Shipping and Billing Address. When trigger executes, string data is initialized but not the custom objects.
Data mapping:
BillTo and ShipTo are custom objects of Address type
LineItem is a custom object of LineItem type.
Any idea what’s wrong with the mapping?
Author: Dennis Tam
Attachment: Could_not_relay_to_emailId_.zip
The XPaths for the Event element was incorrect. See below for the correct XPaths:
Here is what happened in case of your original XPaths:
shipTo
billTo
items
These XPaths evaluate to “nothing” in the XML document; and “nothing” got assigned to the respective UDAs.
In the bar file you sent, the XPaths were
//billTo[1]/text()
//shipTo[1]/text()
//items[1]/text()
You were close here, but these also evaluate to “nothing”.
At the time of XPath evaluation, IBPM has no way to know whether the application developer made an error in the XPath or whether the developer wanted this to be intended behavior.
I can think of an improvement in the product, that we give the developer a way to validate the Event Element XPaths against the trigger XSD. But even then, the second set of XPaths are valid XPaths. So the application developer does need to make sure they are specifying correct XPaths.
You can use a tool like XMLSpy to verify your Event Element XPaths:
Author: Dennis Tam
Attachment: clip_image001.jpg
clip_image002.jpg
there is an error in the logs, but process instance is created and other UDAs are initialized:
ERR:TENANTID = -1 : Wed May 16 15:56:20 CDT 2012: TID=28372353: JSProcessInstantiatorObject:9603: : @(isValidUda(): ) UDA setUdaValueWithXPath does not exist in process definition PurchaseOrderProcess.
UDA setUdaValueWithXPath does not exist in process definition PurchaseOrderProcess.
at com.fujitsu.iflow.server.impl.jsextension.JSProcessInstantiatorObject.isValidUda(JSProcessInstantiatorObject.java:484)
at com.fujitsu.iflow.server.impl.jsextension.JSProcessInstantiatorObject.getUdaValue(JSProcessInstantiatorObject.java:250)
at com.fujitsu.iflow.server.impl.jsextension.JSProcessInstantiatorObject.get(JSProcessInstantiatorObject.java:274)
at org.mozilla.javascript.ScriptRuntime.getProp(ScriptRuntime.java:713)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1444)
at org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:40)
at org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:34)
at org.mozilla.javascript.Context.evaluateReader(Context.java:612)
at org.mozilla.javascript.Context.evaluateString(Context.java:572)
at com.fujitsu.iflow.server.impl.JavaScriptUtil.evaluateScript(JavaScriptUtil.java:349)
at com.fujitsu.iflow.serveree.impl.triggerimpl.TriggerHandler.processEvent(TriggerHandler.java:217)
at com.fujitsu.iflow.serveree.impl.triggerimpl.TriggerHandler.processFile(TriggerHandler.java:91)
at com.fujitsu.iflow.serveree.impl.triggerimpl.TriggerHandler_jsonw3_ELOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
at com.fujitsu.iflow.serveree.impl.triggerimpl.TriggerHandler_jsonw3_ELOImpl.processFile(Unknown Source)
at com.fujitsu.iflow.serveree.impl.triggerimpl.FileEventProcessor.processFile(FileEventProcessor.java:35)
at com.fujitsu.iflow.filelistener.DirectoryHandler.runDirOperation(DirectoryHandler.java:146)
at com.fujitsu.iflow.serveree.impl.timerfactoryimpl.TimerTaskMBHelper.evaluateDirectoryHandler(TimerTaskMBHelper.java:147)
at com.fujitsu.iflow.serveree.impl.timerfactoryimpl.TimerTaskMB.onMessage(TimerTaskMB.java:189)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
at weblogic.ejb.container.internal.MDListener.run(MDListener.java:893)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Author: Dennis Tam
Attachment: PurchaseOrderApp.zip