Forum Stats

  • 3,769,805 Users
  • 2,253,023 Discussions
  • 7,875,211 Comments

Discussions

BPMN Processes - Data Assignment - - Optional Data to Variable

Jaya Lakshmi
Jaya Lakshmi Member Posts: 9

I have a BPMN process and in that data assignment, I have a variable called RFINumber

(I want this to be a optional data) - When I tested this with value - it works fine.

But when data is not sent to this variable, I am getting an error.

What has to be modified, Please help.

<bpmn:assignment>

                        <bpmn:extensionElements>

                            <bpmnext:OracleExtensions>

                                <bpmnext:DataAssignment operation="copy" ignoreMissingData="false"/>

                            </bpmnext:OracleExtensions>

                        </bpmn:extensionElements>

                        <bpmn:from xsi:type="bpmn:tFormalExpression" language="http://www.w3.org/1999/XPath" xpathns:ns="http://xmlns.cenovus.com/purchasing/CAP/ApprovalRequest/v1" xpathns:bpmn="http://www.omg.org/bpmn20" xmlns:xpathns="http://xmlns.oracle.com/bpm/XPathNamespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">bpmn:getDataObject('approvalRequest')/ns:RFINumber

                            <bpmn:extensionElements>

                                <bpmnext:OracleExtensions>

                                    <bpmnext:Expression mode="xpath"/>

                                </bpmnext:OracleExtensions>

                            </bpmn:extensionElements>

                        </bpmn:from>

                        <bpmn:to xsi:type="bpmn:tFormalExpression" language="http://www.w3.org/1999/XPath" xpathns:ns="http://xmlns.cenovus.com/purchasing/CAP/WorkflowServicesRequestObjects/v1" xpathns:bpmn="http://www.omg.org/bpmn20" xmlns:xpathns="http://xmlns.oracle.com/bpm/XPathNamespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">bpmn:getDataInput('notifyTaskAssigneeRequest')/ns:BasicApprovalRequestInformation/ns:RFINumber

                            <bpmn:extensionElements>

                                <bpmnext:OracleExtensions>

                                    <bpmnext:Expression mode="simple"/>

                                </bpmnext:OracleExtensions>

                            </bpmn:extensionElements>

                        </bpmn:to>

                    </bpmn:assignment>

                   

I tried  giving operation  ignoreMissingData as true, But still it is erroring out.

Original: <bpmnext:DataAssignment operation="copy" ignoreMissingData="false"/>

Modified to: <bpmnext:DataAssignment operation="copy" ignoreMissingData="true"/>

Error msg:

<bpelFault><faultType>0</faultType><selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>empty expression result.

The expression bpmn:getDataInput('BasicApprovalRequestInfo')/ns:RFInumber is empty.

An attempt to read or copy data referenced or computed by the XPath expression either had invalid data, according to the XML schema, or did not contain certain optional data.

Ensure that the variable or expression result named in the error message is not empty. Enable XML schema validation of related data elements to ensure the run-time data is valid.

</summary></part></selectionFailure></bpelFault>

I tried  giving operation as "insert_after" and ignoreMissingData as true, But still it is erroring out.

Original: <bpmnext:DataAssignment operation="copy" ignoreMissingData="false"/>

Modified to:<bpmnext:DataAssignment operation="insert_after" ignoreMissingData="true"/>

Error msg: (Null Pointer Exception)

<bpelFault><faultType>0</faultType><runtimeFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>null</summary></part><part name="detail"><detail>java.lang.NullPointerException

at com.collaxa.cube.xml.dom.DOMUtil.isRootElement(DOMUtil.java:236)

at oracle.bpm.bpmn.engine.runtime.xpath.BPMNXPathUtil.insertAfter(BPMNXPathUtil.java:375)

at oracle.bpm.bpmn.engine.model.runtime.util.DataHandlingUtils.performInsertAfter(DataHandlingUtils.java:1687)

at oracle.bpm.bpmn.engine.model.runtime.util.DataHandlingUtils.performAssignmentOperation(DataHandlingUtils.java:1313)

at oracle.bpm.bpmn.engine.model.runtime.util.DataHandlingUtils.processInputData(DataHandlingUtils.java:411)

at oracle.bpm.bpmn.engine.model.runtime.util.DataHandlingUtils.processInputData(DataHandlingUtils.java:348)

at oracle.bpm.bpmn.engine.map.builder.visitors.impl.CallActivityVisitorImpl$MIProcessInputDataAssociation.doExecute(CallActivityVisitorImpl.java:218)

at oracle.bpm.bpmn.engine.microkernel.MIBase.execute(MIBase.java:34)

at oracle.bpm.bpmn.engine.microkernel.MISequenceBlock.doExecute(MISequenceBlock.java:68)

at oracle.bpm.bpmn.engine.microkernel.MIBase.execute(MIBase.java:34)

at oracle.bpm.bpmn.engine.microkernel.MicroInstructionContext.callMicroInstruction(MicroInstructionContext.java:205)

at oracle.bpm.bpmn.engine.microkernel.MICall.doExecute(MICall.java:38)

at oracle.bpm.bpmn.engine.microkernel.MIBase.execute(MIBase.java:34)

at oracle.bpm.bpmn.engine.microkernel.MISequenceBlock.doExecute(MISequenceBlock.java:68)

at oracle.bpm.bpmn.engine.microkernel.MIBase.execute(MIBase.java:34)

at oracle.bpm.bpmn.engine.microkernel.MicroInstructionContext.callMicroInstruction(MicroInstructionContext.java:205)

at oracle.bpm.bpmn.engine.microkernel.MicroInstructionContext.callProcedure(MicroInstructionContext.java:212)

at oracle.bpm.bpmn.engine.microkernel.MicroInstructionContext.executeProcedure(MicroInstructionContext.java:335)

at oracle.bpm.bpmn.engine.model.runtime.MIBPMNActivityWMP.executeProcedure(MIBPMNActivityWMP.java:257)

at oracle.bpm.bpmn.engine.model.runtime.MIBPMNActivityWMP.__executeStatements(MIBPMNActivityWMP.java:222)

at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform(BaseBPELActivityWMP.java:188)

at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:2868)

at com.collaxa.cube.engine.CubeEngine._handleWorkItem(CubeEngine.java:1264)

at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1159)

at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:106)

at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:308)

at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:387)

at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4859)

at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4783)

at com.collaxa.cube.engine.CubeEngine._callbackPerformer(CubeEngine.java:1462)

at com.collaxa.cube.engine.CubeEngine.callbackPerformer(CubeEngine.java:1398)

at com.collaxa.cube.engine.delivery.DeliveryHelper.callbackPerformer(DeliveryHelper.java:407)

at com.collaxa.cube.engine.delivery.DeliveryService.handleCallback(DeliveryService.java:952)

at com.collaxa.cube.engine.delivery.DeliveryService.handleCallback(DeliveryService.java:855)

at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleCallback(CubeDeliveryBean.java:390)

at oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliveryBean_of8dk6_ICubeDeliveryLocalBeanImpl.__WL_invoke(Unknown Source)

at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:33)

at oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliveryBean_of8dk6_ICubeDeliveryLocalBeanImpl.handleCallback(Unknown Source)

at com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMessageHandler.handle(CallbackDeliveryMessageHandler.java:63)

at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:153)

at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:132)

at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:90)

at com.collaxa.cube.engine.dispatch.WMExecutor$W.run(WMExecutor.java:239)

at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)

at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

</detail></part><part name="code"><code>java.lang.NullPointerException</code></part></runtimeFault></bpelFault>

Thanks,

Jayalakshmi Sampath

Answers

This discussion has been closed.