3 Replies Latest reply: Jun 7, 2012 7:12 AM by 827293 RSS

    Need rolled back if either of table insertion getting failed while testing

    827293
      I have one simple project containing DBAdapter related files and one Business service.
      The DB Adapter operation contains only one operation to insert data into two tables.
      The payload is as given below

      <add:F47011Collection xmlns:add="http://xmlns.oracle.com/pcbpel/adapter/db/top/AddToF47011AndF47012">
      <!--Zero or more repetitions:-->
      <add:F47011>
      <add:syekco>strin</add:syekco>
      <add:syedoc>999150016</add:syedoc>
      <add:syedct>st</add:syedct>
      <add:f47012Collection>
      <!--Zero or more repetitions:-->
      <add:F47012>
      <add:szedln>1000</add:szedln>
      <add:szinmg>1234567890</add:szinmg>
      </add:F47012>
      </add:f47012Collection>
      </add:F47011>
      </add:F47011Collection>

      I the above case, F47011 represents Header table and F47012 represents Detail table.

      In both the tables i am pushing the mandatory fields.

      Problem:

      The length of szinmg field in Detail table is 10.
      While testing ,if value for szinmg exceeds 10 characters,it prompts me an error.And data is not inserted into Details(F47012) table.

      But Header is populated.So my workaround is whenever the data is not inserted into Detail table because of data truncation(Exceeds length),in that case the data should not be populated into Header Table..

      How to roll back the data from Header table if detail table data is not inserted because of some error.

      And please send me the workout plan to solve the problem

      It's very very important.