Creating an Import Package to add a Column
Copy
When creating an import package that adds a column to the Configurable InBasket you must ensure that the order in which the property is added to the PolyItems is correct or the import will fail.
In the example below there are steps on how to create a package that will add a column that shows the Part_Number of an InBasket task.
From the source database, use the Export tool to export the Workflow_Task and InBasket_Task ItemTypes, and their corresponding SQL queries
- The Workflow_Task and InBasket_Task ItemTypes, and SQL queries are located in the com.aras.innovator.inbasket package definitions
Figure 18.
From the InBasket_Task.xml you will need to remove the following lines (typically located near the end of the file):
Figure 19.
NoteIt is recommended you copy and paste the above lines for future use in the upcoming steps.
- From the InBasket_Task.xml you will need to remove the new column property (shown below) to avoid errors during the import.
Figure 20.
- In the new import package folder, create an … /Imports/Fixes folder
- Inside the fixes folder you will add the xml files shown below:
- Workflow_Task.xml
- InBasket_Task.xml
- 1 Workflow_Task.xml will look something like the following:
<AML><Item type="ItemType” id="321BD822949149C597FD596B1212B85C” action="edit"><Relationships><Item type="Property” id="EB9B7F4B06064C378EF5CEC3E94FB58E” action="add"><column_alignment>left</column_alignment><data_type>string</data_type><is_hidden>0</is_hidden><is_hidden2>0</is_hidden2><is_indexed>0</is_indexed><is_keyed>0</is_keyed><is_multi_valued>0</is_multi_valued><is_required>0</is_required><label xml:lang="en">test</label><range_inclusive>0</range_inclusive><readonly>0</readonly><sort_order>4608</sort_order><source_id keyed_name="Workflow Task” type="ItemType” name="Workflow Task">321BD822949149C597FD596B1212B85C</source_id><stored_length>32</stored_length><track_history>0</track_history><name>test</name></Item></Relationships></Item><Item type="ItemType” id="BC7977377FFF40D59FF14205914E9C71" action="edit"><Relationships><Item type="Morphae” id="9657383E16C64B86AB06E17CDD20AE23" action="add"><related_id keyed_name="Workflow Task” type="ItemType” name="Workflow Task">321BD822949149C597FD596B1212B85C</related_id><sort_order>128</sort_order><source_id keyed_name="InBasket Task” type="ItemType” name="InBasket Task">BC7977377FFF40D59FF14205914E9C71</source_id></Item></Relationships></Item></AML>
The code highlighted in yellow is taken from the exported Workflow_Task.xml where the information is that of the property that will be used for the new column. The code highlighted in green is taken from the deleted lines of the InBasket_Task.xml. 3 Inbasket_task.xml will only include code to add the new column property as shown below:
<AML><Item type="ItemType” id="BC7977377FFF40D59FF14205914E9C71" action="edit"><Relationships><Item type="Property” id="6DCBE94B46044404B74F15A613A02811" action="add"><column_alignment>left</column_alignment><data_type>string</data_type><is_hidden>0</is_hidden><is_hidden2>0</is_hidden2><is_indexed>0</is_indexed><is_keyed>0</is_keyed><is_multi_valued>0</is_multi_valued><is_required>0</is_required><label xml:lang="en">test</label><range_inclusive>0</range_inclusive><readonly>0</readonly><sort_order>1024</sort_order><source_id keyed_name="InBasket Task” type="ItemType” name="InBasket Task">BC7977377FFF40D59FF14205914E9C71</source_id><stored_length>1024</stored_length><track_history>0</track_history><name>test</name></Item></Relationships></Item></AML>
- 1 Workflow_Task.xml will look something like the following:
- From a browser, go to http://localhost/innovator/client/scripts/nash.aspx
- Fill in Login information for the appropriate target database
- Under Action select generateNewGUID
- Click on Submit
- Copy the newly generated ID and add that to the 3 Inbasket_Task.xml file in the highlighted area above
- To ensure that the fixes folder is imported with the import tool, you will need to add the path as follows:
<package name="com.aras.innovator.solution.InBasketFix” path="InBasketFix\Import"><dependson name="com.aras.innovator.inbasket” /></package>