Custom Pipeline Component -how to loop through Ibasemessage.bodypart

Home Page Forums BizTalk 2004 – BizTalk 2010 Custom Pipeline Component -how to loop through Ibasemessage.bodypart

Viewing 1 reply thread
  • Author
    Posts
    • #24240

      I wrote a custom pipeline component to validate csv data before inserting into Sql server DB.

      my problem is I have to be able to read the following data and retreive each field data to check if  required fields are empty or not and then let the orchestration process the data.

      my Ibasemessage.bodypart looks like foll:

      “<Sales xmlns=\”http://ADI.ADI_FlatFile\“>

      <SalesDetailInfo DealID=\”&quot;Deal #\” Logon_StoreID=\”Logon/Store#\” CustomerID=\”Customer #\” Customer_Name_Salutation=\”Customer Name Salutation\” Customer_First_Name=\”Customer First Name\” Customer_Middle_Name=\”Customer Middle Name\” Customer_Last_name=\”Customer Last Name\” Customer_Name_Suffix=\”Customer Name Suffix\” Customer_Employer_name=\”Customer Employer Name\” Customer_Job_Title=\”Customer Work Position/Job Title\” Customer_Birth_Date=\”Customer Birth Date\” Address=\”Address\” Address2=\”Address 2\” City=\”City\” State=\”State\” Zipcode=\”Zip\” HomePhone=\”Home Phone\” WorkPhone=\”Work Phone\” CellPhone=\”Cell Phone\” Email=\”EMail\” StockID=\”Stock #\” VIN=\”VIN\” Make=\”Make\” Odometer=\”Odometer\” Ext_Color=\”Exterior Color\” Int_Color=\”Interior Color\” Veh_Type_N_U_C=\”New/Used/Certified\” Agreed_Selling_Price=\”Agreed Selling Price\” MSRP=\”MSRP\” Trade1_StockID=\”Trade 1 Stock #\” Trade1_VIN=\”Trade 1 VIN\” Trade1_Payoff_Amount=\”Trade 1 Payoff Amount\” Trade1_ACV=\”Trade 1 ACV\” Trade2_StockID=\”Trade 2 Stock #\” Trade2_VIN=\”Trade 2 VIN\” Trade2_Payoff_Amount=\”Trade 2 Payoff Amount\” Trade2_ACV=\”Trade 2 ACV\” Salesman1_ID=\”Salesman 1 #\” Salesman1_FirstName=\”Salesman 1 First Name\” Salesman1_LastName=\”Salesman 1 Last Name\” Salesman1_Email=\”Salesman 1 Email\” Salesman2_ID=\”Salesman 2 #\” Salesman2_FirstName=\”Salesman 2 First Name\” Salesman2_LastName=\”Salesman 2 Last Name\” Salesman2_Email=\”Salesman 2 Email\” SalesManager_ID=\”Sales Manager #\” SalesManager_FirstName=\”Sales Manager First Name\” SalesManager_LastName=\”Sales Manager Last Name\” SalesManager_Email=\”Sales Manager Email\” F_I_managerID=\”F&amp;I Manager #\” F_I_ManagerFirstName=\”F&amp;I Manager First Name\” F_I_ManagerLastName=\”F&amp;I Manager Last Name\” F_I_ManagerEmail=\”F&amp;I Manager Email\” Deal_Sale_Type=\”Deal Sale Type\” Deal_Date=\”Deal Date\” Term=\”Term\” First_Payment_Date=\”First Payment Date\” Cash_Down=\”Cash Down\” Bank_Code=\”Bank Code\” Bank_Name=\”Bank Name\” Purchase_Monthly_Payment=\”Purchase Monthly Payment\” Amount_Financed=\”Amount Financed\” Deferred_Balloon_Payment=\”Deferred/Balloon Payment\” Base_Payment=\”Base Payment\” Lease_Monthly_payment=\”Lease Monthly Payment\” Net_Capitalized_Cost=\”Net Capitalized Cost\” Residual_Amount=\”Residual Amount\” Yearly_Miles=\”Yearly Miles\” Penalty_Rate=\”Penalty Rate\” Warranty_Company=\”Warranty Company\” Warranty_Miles=\”Warranty Miles\” Warranty_Term=\”Warranty Term\” Model_Number=\”Model Number&quot;\” xmlns=\”\” />

      <SalesDetailInfo DealID=\”&quot;311154\” CustomerID=\”50160\” Customer_Last_name=\”MERCEDES-BENZ OF HOUSTON NORTH\” Address=\”17510 NORTH FWY\” City=\”HOUSTON\” State=\”TX\” Zipcode=\”77090-4902\” HomePhone=\”2818856000\” StockID=\”2744\” VIN=\”WDDHF5GBXAA113364\” Make=\”MERCEDES-BENZ\” Odometer=\”12\” Ext_Color=\”WHITE\” Veh_Type_N_U_C=\”NEW\” Agreed_Selling_Price=\”52484.00\” MSRP=\”0\” Trade1_Payoff_Amount=\”0\” Trade1_ACV=\”0\” Trade2_Payoff_Amount=\”0\” Trade2_ACV=\”0\” Salesman1_ID=\”997\” Salesman1_FirstName=\”DEALER\” Salesman1_LastName=\”TRANSFER\” SalesManager_ID=\”351\” SalesManager_LastName=\”STERN\” F_I_managerID=\”2950\” F_I_ManagerLastName=\”VASQUEZ\” Deal_Sale_Type=\”P\” Deal_Date=\”01/08/2010\” Term=\”0\” First_Payment_Date=\”01/29/2010\” Cash_Down=\”0\” Bank_Code=\”CASH\” Bank_Name=\”CASH\” Purchase_Monthly_Payment=\”52484.00\” Amount_Financed=\”52484.00\” Deferred_Balloon_Payment=\”0\” Residual_Amount=\”0\” Yearly_Miles=\”0\” Penalty_Rate=\”0\” Warranty_Company=\”Vehicle Service Contr\” Warranty_Miles=\”100000\” Warranty_Term=\”60\” Model_Number=\”&quot;\” xmlns=\”\” />
      </Sales>

      I am unable to understand this format and how do I retreive my field names from this stream of data :
      eg: I have to check if  (Deal# = “” & VIN =””) then
          “DO NOT PROCESS THE ROW”
          “GO TO NEXT ROW “
          “AND INSERT ONLY THOSE ROWS THAT HAVE rREQUIRED FIELDS”
          “I HAVE 73 fields in each ROW.
          “1st row is header row (I need to exclude that row too)

      HOW DO I DO THIS , Please any support is gr8tly appreciated

    • #24244

      Hi.

      Which pipeline component you have made?

      I beleive that you should build a Validate Pipeline Component. It’s sound like the message isn’t a xml yet, and you have a message like this.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.