9 Replies Latest reply: Feb 25, 2013 1:56 AM by KTM RSS

    Append in Assign giving error

    user8611954
      \Hello,

      I am using Append in Assign and it is giving me following error.

      Assign Operation Empty result set.
      The to-spec does not yield any data; the append operation cannot be performed.
      The operation named in the error message was not performed because to-spec did not yield any data.
      Verify the to-spec of the assign activity at line number 733 in the BPEL source.

      any idea ?

      thx
        • 1. Re: Append in Assign giving error
          NeerajDhingra
          Hello,
          Looks like target variable (in which append is being performed) is not initialized.
          Target variable needs to be initialized before appending to it.

          Thanks
          -ND
          • 2. Re: Append in Assign giving error
            user8611954
            How you append target variable ?

            thx
            • 3. Re: Append in Assign giving error
              user8611954
              I mean , how do you initialize the Target ?

              thx
              • 4. Re: Append in Assign giving error
                NarsingPumandla
                Hi,

                Generally, we use append to add any element from source to the target variable. And here the element which you are appending, that type of elements are repeating i mean can exixsts 0 to many on the target side. So, whatever you append will be on the last. Make sure the data is there in the element which you are appending and also, while doing an append operation you need to give the correct xpath i mean to the source and also for the target variable. May be if you can post your source, we can figure out.

                Thanks,
                N
                • 5. Re: Append in Assign giving error
                  NarsingPumandla
                  And also while using append, on the source side i mean on the left hand side, select the element which you want to append and on the right hand side you need should not select the repeating element, you should select the top element which contains the repeating element. This way it works. I may not be clear but i'll try to help if you post the source code.

                  Thanks,
                  Naresh
                  • 6. Re: Append in Assign giving error
                    user8611954
                    Hi Naresh,

                    Following is the snippet for your reference.

                    I have While Loop (incoming Multiples). Inside while I get Single Record. Copy Single Record to iterateVariable (temp variable). Then append iterateVariable to Destination. Also, Destination side where i want to inject these Multiple of source ------ I am doing it at ParameterSet level (Inside this, mutiples of Parameters (name, type, value) will appear ....)

                    Also, initially thought it might be namespace issue so Append is failing. But namespace at source and destination is ns3




                    Follwoing is BPEL snippet of problem area.


                    *<while name="WhileOfDetails"*
                    condition="bpws:getVariableData('counterDetails') &lt;= ora:countNodes('singleTransactRecordVAR','/ns13:transacElement/ns13:detail')">
                    *<sequence name="Sequence4">*
                    *<assign name="AssignSingleDetailsRecord">*
                    *<copy>*
                    *<from expression="bpws:getVariableData('singleTransactRecordVAR',&quot;/ns13:transacElement/ns13:detail[position()=bpws:getVariableData('counterDetails')]&quot;)"/>*
                    *<to variable="singleDetailsRecord"/>*
                    *</copy>*
                    *</assign>*
                    *<assign name="AssignDetaislToIterateOfCompositeServiceAtomicServiceCompParameter">*
                    *<copy>*
                    *<from variable="singleDetailsRecord"*
                    query="/ns13:detailElement/@name"/>
                    *<to variable="iterateCompositeServiceServiceCompParameter"*
                    query="/ns3:parameterSet/ns3:parameter/ns3:name"/>
                    *</copy>*
                    *<copy>*
                    *<from variable="singleDetailsRecord"*
                    query="/ns13:detailElement/@type"/>
                    *<to variable="iterateCompositeServiceServiceCompParameter"*
                    query="/ns3:parameterSet/ns3:parameter/ns3:type"/>
                    *</copy>*
                    *<copy>*
                    *<from variable="singleDetailsRecord"*
                    query="/ns13:detailElement/@value"/>
                    *<to variable="iterateCompositeServiceServiceCompParameter"*
                    query="/ns3:parameterSet/ns3:parameter/ns3:value"/>
                    *</copy>*
                    *</assign>*

                    *<assign name="AppendIteratorParameterToServiceItemParameterSet">*
                    *<bpelx:append bpelx:ignoreMissingFromData="yes">*
                    *<bpelx:from variable="iterateCompositeServiceServiceCompParameter"*
                    query="/ns3:parameterSet/ns3:parameter"/>
                    *<bpelx:to variable="outputVariable" part="payload"*
                    query="/ns1:CreateServiceOrderEBM/ns1:DataArea/ns1:CreateServiceOrder/ns1:ServiceOrder/ns3:productOffer/ns3:compositeService/ns3:serviceComponent/ns3:serviceItem/ns3:parameterSet"/>
                    *</bpelx:append>*
                    *</assign>*

                    *<!-- <assign name="Assign1">*
                    *<bpelx:append bpelx:ignoreMissingFromData="yes">*
                    *<bpelx:from variable="iterateCompositeServiceServiceCompParameter"*
                    query="/ns3:parameterSet/ns3:parameter"/>
                    *<bpelx:to variable="outputVariable" part="payload"*
                    query="/ns1:CreateServiceOrderEBM/ns1:DataArea/ns1:CreateServiceOrder/ns1:ServiceOrder/ns3:productOffer/ns3:compositeService/ns3:serviceComponent/ns3:serviceItem/ns3:parameterSet"/>
                    *</bpelx:append>*
                    *</assign> -->*


                    *<assign name="IncrementCounterDetails">*
                    *<copy>*
                    *<from expression="bpws:getVariableData('counterDetails') + 1"/>*
                    *<to variable="counterDetails"/>*
                    *</copy>*
                    *</assign>*
                    *</sequence>*
                    *</while>*



                    As a debug effort, just to see that values are coming in source ........ I changed the Append to Copy operation. Meaning Just copy source side Parameter (name, type, value) to Destination (Parameter - name, type, value). I checked the Trace and Yes it did copy source to destination. Although, destination GOT only single Parameter - name, type value ........ which is correct bcaz i was using Copy operation so previous mutiples GOT overwritten by the LAST Parameter. Anyways, this part was just for debug effort.

                    Practically, i want to use Append - so Mutiples of Parameters (source side), would get injected under ParameterSet of Destination.


                    You already know the error I keep getting when using Append ........ it is as follows ........


                    Assign Operation Empty result set.
                    The to-spec does not yield any data; the append operation cannot be performed.
                    The operation named in the error message was not performed because to-spec did not yield any data.
                    Verify the to-spec of the assign activity at line number 733 in the BPEL source.


                    Thanks
                    d
                    • 7. Re: Append in Assign giving error
                      NarsingPumandla
                      Hi,

                      On your target side, what is the element that contains the name, type and value. I hope that by seeing your xpath on the target side, parameterSet can contain multiple elements and this element contains name, type and value. Is that correct ? So, if that is right, the xpath seems to be correct.

                      Thanks,
                      N
                      • 8. Re: Append in Assign giving error
                        user8611954
                        Yes Naresh that is correct.

                        If xpath is correct then what else would be failing for append to work

                        thx
                        D
                        • 9. Re: Append in Assign giving error
                          KTM
                          Hi Naresh,
                          i am using Jdev 10.1.1.3

                          and am also facing the same problem i.e. *"Assign Operation Misuse. The to-spec does not yield any data; copyList operation cannot be performed. Please check the BPEL source at line number "466"*

                          here is the source for assign activity

                          *<assign name="Assign_SubId">*
                          *<copy>*
                          *<from expression="bpws:getVariableData('Submission_receive_InputVariable','SubmissionnewCollection','/ns21:SubmissionnewCollection/ns21:Submissionnew[position()=$LoopCounter]/ns21:submissionId')"/>*
                          *<to variable="Invoke_SubDetails_Call_PkgSubDetails_InputVariable"*
                          *part="InputParameters"*
                          *query="/ns13:InputParameters/ns13:PI_SUB_ID"/>*
                          *</copy>*
                          *</assign*

                          please help me out. Thank you in advance.
                          Regards,
                          Kotresh