I need to upload relationship between Operation Document and the Documents.
As you can see from the picture below the hierarchy of Process Plan is:
Process Plan--> Operation Number (which is `sort_order`, in this case it is 20)-->Document
I have an excel sheet of the missing documents that need to show under an operation (20)
The document relationship cannot by uploaded just to Operation because the operation 20 will exist under other Process Plans.
However, under one process plan the operation number is unique, so in this case there will be only one operation with sort_order 20.
The documents already exist, I just need them to be shown here.
From the AML script I have the `get` command works. The code is below.
<AML>
<Item type="mpp_processPlan" action="get">
<item_number>080824-S10</item_number>
<Relationships>
<Item type="mpp_Operation" action="get">
<sort_order>20</sort_order>
<Relationships>
<Item type="mpp_operationDocument" action="get">
</Item>
</Relationships>
</Item>
</Relationships>
</Item>
</AML>
However, in the above script in the line `<Item type="mpp_operationDocument" action="get">` when `action = Update` it won't work.
Basically the following doesn't work
<AML>
<Item type="mpp_processPlan" action="get">
<item_number>080824-S10</item_number>
<Relationships>
<Item type="mpp_Operation" action="get">
<sort_order>20</sort_order>
<Relationships>
<Item type="mpp_operationDocument" action="Update">
<item_number>MADL074161</item_number>
</Item>
</Relationships>
</Item>
</Relationships>
</Item>
</AML>
Result of scriopt with all `action=get`
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <Result> <Item type="mpp_ProcessPlan" typeId="4E030A4723224002B3E94F40F01AC1DE" id="767F3FCDCC0F4CCF95F3CA3D9DB9D391"> <config_id keyed_name="080824-S10" type="mpp_ProcessPlan">767F3FCDCC0F4CCF95F3CA3D9DB9D391</config_id> <created_by_id keyed_name="Data Migration" type="User">08880028FF8C43D48CB02B44EB74B127</created_by_id> <created_on>2024-02-20T11:49:02</created_on> <current_state name="Released" keyed_name="Released" type="Life Cycle State">7109CDD337C84AFF87F55B21CCAC34AC</current_state> <description></description> <generation>1</generation> <has_change_pending>0</has_change_pending> <id keyed_name="080824-S10" type="mpp_ProcessPlan">767F3FCDCC0F4CCF95F3CA3D9DB9D391</id> <is_current>1</is_current> <is_released>1</is_released> <keyed_name>080824-S10</keyed_name> <location>10</location> <major_rev>PP000</major_rev> <modified_on>2024-02-20T11:49:02</modified_on> <name>Slitter Knife Arm, Rotary Tip, 35" Ring, C/R</name> <new_version>1</new_version> <not_lockable>0</not_lockable> <owned_by_id keyed_name="Mfg Eng" type="Identity">D46B8ECBDB0C4D94BFF7A93D36FAB474</owned_by_id> <permission_id keyed_name="Process Plan - Released" type="Permission">E4EB045B2622409BA09AC91778FAE18C</permission_id> <release_date>2024-01-29T00:00:00</release_date> <state>Released</state> <item_number>080824-S10</item_number> <itemtype>4E030A4723224002B3E94F40F01AC1DE</itemtype> <Relationships> <Item type="mpp_Operation" typeId="91B674D7C7AF47F99CA1C2FB26C38DBF" id="77DD37200C7B4858833A6D6D8A48F4FA"> <config_id keyed_name="20" type="mpp_Operation">77DD37200C7B4858833A6D6D8A48F4FA</config_id> <created_by_id keyed_name="Data Migration" type="User">08880028FF8C43D48CB02B44EB74B127</created_by_id> <created_on>2024-02-20T12:06:27</created_on> <cycle_time>60</cycle_time> <description xml:lang="en">MC-1B MC2 CNC Machine Centre S10</description> <generation>1</generation> <id keyed_name="20" type="mpp_Operation">77DD37200C7B4858833A6D6D8A48F4FA</id> <is_current>1</is_current> <is_released>0</is_released> <keyed_name>20</keyed_name> <major_rev>PP000</major_rev> <modified_on>2024-02-20T12:06:27</modified_on> <name xml:lang="en">MC-1B</name> <new_version>1</new_version> <nmg_erp_name>MC-1B</nmg_erp_name> <nmg_location_id>10</nmg_location_id> <not_lockable>0</not_lockable> <permission_id keyed_name="Process Plan - Released" type="Permission">E4EB045B2622409BA09AC91778FAE18C</permission_id> <setup_time>0</setup_time> <source_id keyed_name="080824-S10" type="mpp_ProcessPlan">767F3FCDCC0F4CCF95F3CA3D9DB9D391</source_id> <wi_details xml:lang="en"></wi_details> <sort_order>20</sort_order> <Relationships> <Item type="mpp_OperationDocument" typeId="38BA57E0616B49A58317C267E436AE4C" id="106F5032EE7F4C5497717888370A3BB6"> <config_id keyed_name="106F5032EE7F4C5497717888370A3BB6" type="mpp_OperationDocument">106F5032EE7F4C5497717888370A3BB6</config_id> <created_by_id keyed_name="Data Migration" type="User">08880028FF8C43D48CB02B44EB74B127</created_by_id> <created_on>2024-02-20T12:36:02</created_on> <generation>1</generation> <id keyed_name="106F5032EE7F4C5497717888370A3BB6" type="mpp_OperationDocument">106F5032EE7F4C5497717888370A3BB6</id> <is_current>1</is_current> <is_released>0</is_released> <keyed_name>106F5032EE7F4C5497717888370A3BB6</keyed_name> <major_rev>A</major_rev> <modified_on>2024-02-20T12:36:02</modified_on> <new_version>1</new_version> <not_lockable>0</not_lockable> <permission_id keyed_name="Process Plan - Released" type="Permission">E4EB045B2622409BA09AC91778FAE18C</permission_id> <related_id keyed_name="MADL074152" type="Document"> <Item type="Document" typeId="B88C14B99EF449828C5D926E39EE8B89" id="BD9ECB6D5C5D4AEEBC0ED65680C5505C"> <classification>Manufacturing Aid</classification> <config_id keyed_name="MADL074152" type="Document">BD9ECB6D5C5D4AEEBC0ED65680C5505C</config_id> <created_by_id keyed_name="NMIS _MADL" type="User">41E9090B65234C899CAFF690C7C0F562</created_by_id> <created_on>2024-02-19T11:12:07</created_on> <current_state name="Released" keyed_name="Released" type="Life Cycle State">8EDE39438A7E4A56A1B4A9D07EF4A2FF</current_state> <description>35" SLITTER ARM C/R</description> <effective_date>2018-11-16T14:35:00</effective_date> <generation>1</generation> <has_change_pending>0</has_change_pending> <has_files>1</has_files> <id keyed_name="MADL074152" type="Document">BD9ECB6D5C5D4AEEBC0ED65680C5505C</id> <is_current>1</is_current> <is_released>1</is_released> <is_template>0</is_template> <keyed_name>MADL074152</keyed_name> <major_rev>V007</major_rev> <modified_on>2007-07-09T08:17:00</modified_on> <name>080824</name> <new_version>0</new_version> <nmg_department>Manufacturing</nmg_department> <nmg_type>Program (CAD/CAM)</nmg_type> <not_lockable>0</not_lockable> <owned_by_id keyed_name="Mfg Eng" type="Identity">D46B8ECBDB0C4D94BFF7A93D36FAB474</owned_by_id> <permission_id keyed_name="Released Document" type="Permission">74C205C37E7C4D56BBBE99B52B28431E</permission_id> <release_date>2018-11-16T14:35:00</release_date> <state>Released</state> <item_number>MADL074152</item_number> <itemtype>B88C14B99EF449828C5D926E39EE8B89</itemtype> </Item> </related_id> <source_id keyed_name="20" type="mpp_Operation">77DD37200C7B4858833A6D6D8A48F4FA</source_id> </Item> </Relationships> </Item> </Relationships> </Item> </Result> </SOAP-ENV:Body> </SOAP-ENV:Envelope>