This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - 2nd BOM request works every time, but first always fails

esteimle - Thursday, January 12, 2012 5:41 PM:

I finally got my BOM object to populate itself with my CIP parts under another Innovator part.   I have an interesting problem though.   On start up when I click on the part, and click on the CIP_BOM tab nothing loads.   But it I load the part again all the parts load fine after that.

Now if I change the ID returned from the CIP_BOM request it never shows up, only after that ID has been used once and it comes up blank do my parts show up the next time.

Here's my CIP_BOM request / response from my onGet function:

 

-----------------------  Request from Innovator  ----------------------

<SOAP-ENV:Envelope xmlns:SOAP-ENV="schemas.xmlsoap.org/.../">
- <SOAP-ENV:Body>
- <ApplyItem>
- <Item type="CIP Part BOM" action="get" page="1" select="quantity,reference_designator,created_by_id,created_on,modified_by_id,modified_on,locked_by_id,major_rev,css,current_state,keyed_name,related_id(description,manf_part_number,manufacturer,part_number,created_by_id,created_on,modified_by_id,modified_on,locked_by_id,major_rev,css,current_state,keyed_name),source_id" pagesize="">
  <source_id condition="eq">764B412CE4A249AD89E186732740D3D3</source_id>
  </Item>
  </ApplyItem>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
--------------  My Response ---------------
-<SOAP-ENV:Envelope>
-<SOAP-ENV:Body>
-<Result>
-<Item type =" CIP Part BOM " id =" EE8D6833EF2A480994DC7FE3A0C1641E " >
 <quantity>3</quantity>
 <reference_designator>U1, U12, U15</reference_designator>
-<related_id>
-<Item type =" CIP_PART " typeId =" 56D225FB95344D5C87128E28A366C307 " id =" 0BF585C814D84248BDA04D7EDBB7BAB2 " >
 <part_number>CT-AND-000001</part_number>
 <manf_part_number>SN74AHC1G08DRLR</manf_part_number>
 <manufacturer>Texas Instruments</manufacturer>
 <description>IC SNGL 2-IN POS-AND GATE SOT-5</description>
 </Item>
 </related_id>
 </Item>
-<Item type =" CIP Part BOM " id =" EE8D6833EF2A480994DC7FE3A0C1641E " >
 <quantity>30</quantity>
 <reference_designator>C1,C4,C5,C17</reference_designator>
-<related_id>
-<Item type =" CIP_PART " typeId =" 56D225FB95344D5C87128E28A366C307 " id =" E4DB6E6654FC40F09FCF7F507C5E5280 " >
 <part_number>CT-CAP-000001</part_number>
 <manf_part_number>C0402C104K4RACTU</manf_part_number>
 <manufacturer>KEMET</manufacturer>
 <description>KEMET - C0402C104K4RACTU - CAPACITOR CERAMIC, 0.1UF, 16V, X7R, 0402</description>
 </Item>
 </related_id>
 </Item>
-<Item type =" CIP Part BOM " id =" EE8D6833EF2A480994DC7FE3A0C1641E " >
 <quantity>0</quantity>
 <reference_designator>C122</reference_designator>
-<related_id>
-<Item type =" CIP_PART " typeId =" 56D225FB95344D5C87128E28A366C307 " id =" E4DB6E6654FC40F09FCF7F507C5E5280 " >
 <part_number>CT-CAP-000001</part_number>
 <manf_part_number>C0402C104K4RACTU</manf_part_number>
 <manufacturer>KEMET</manufacturer>
 <description>KEMET - C0402C104K4RACTU - CAPACITOR CERAMIC, 0.1UF, 16V, X7R, 0402</description>
 </Item>
 </related_id>
 </Item>
-<Item type =" CIP Part BOM " id =" EE8D6833EF2A480994DC7FE3A0C1641E " >
 <quantity>1</quantity>
 <reference_designator>U1</reference_designator>
-<related_id>
-<Item type =" CIP_PART " typeId =" 56D225FB95344D5C87128E28A366C307 " id =" BC45F23C91094A4C9686268B8A684F53 " >
 <part_number>CT-DIMM-000001</part_number>
 <manf_part_number>NOT IN DBASE</manf_part_number>
 <manufacturer>NOT IN DBASE</manufacturer>
 <description>NOT IN DBASE</description>
 </Item>
 </related_id>
 </Item>
-<Item type =" CIP Part BOM " id =" EE8D6833EF2A480994DC7FE3A0C1641E " >
 <quantity>20</quantity>
 <reference_designator>R20, R21, R105</reference_designator>
-<related_id>
-<Item type =" CIP_PART " typeId =" 56D225FB95344D5C87128E28A366C307 " id =" 5F26D69C50574FEF9B310A390DADD17F " >
 <part_number>CT-RES-000029</part_number>
 <manf_part_number>ERJ-S02F5492X</manf_part_number>
 <manufacturer>Panasonic - ECG</manufacturer>
 <description>RES 54.9K OHM 1/16W 1% 0402 SMD</description>
 </Item>
 </related_id>
 </Item>
-<Item type =" CIP Part BOM " id =" EE8D6833EF2A480994DC7FE3A0C1641E " >
-<related_id>
-<Item type =" CIP_PART " typeId =" 56D225FB95344D5C87128E28A366C307 " id =" 5F26D69C50574FEF9B310A390DADD17F " >
 <part_number>CT-RES-000029</part_number>
 <manf_part_number>RMCF0402FT54K9</manf_part_number>
 <manufacturer>Stackpole Electronics Inc</manufacturer>
 <description>RES 54.9K OHM 1/16W 1% 0402 SMD</description>
 </Item>
 </related_id>
 </Item>
 </Result>
 </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>
Just something I don't have any idea on at the moment, if anyone has suggestions I'd appreciate it :)
Thank you,
-Eric



esteimle - Thursday, January 12, 2012 6:09 PM:

Well turns out even though I set my item type to CIP Part BOM:

bom_item.setType("CIP Part BOM");

I also have to do this:

bom_item.setAttribute("typeId", " 74B6F95348AA4DE3B84F89D45E3ED56D");

That's the item type ID of the CIP Part BOM item.

After that it seems to work, I can send in random IDs as long as I set that typeId attribute.

-Eric