Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Problem with Deploy of nested replicants
Bill_Stolp
We are having a problem with DataDeploy of nested replicants.
In our DCT there is a multiselect box with a list of products inside of each replicant with a question number (the question is unique in each replicant). The deployment result should create a row for each combination of the question and product. This is the simplified version of our DCT:
<container name="QPS" min="1" max="10">
<database deploy-column="f" />
<item name="Question" rowcontinue="f">
<hidden>
<text maxlength="3000" size="80" required="t"/>
</hidden>
</item>
<item name="Products" >
<label>Product Name</label>
<description>Select a product for which the worksheet is approved</description>
<select size="5" required="t" multiple="t">
<inline command="perlscript that populates this multi select box with a list of products "/>
</select>
</item>
</container>
-------------------------------------------------------------------------------------
Following is a simplified database schema definition for this DCT:
<dbschema>
<group name="Condition_Rule" table="Condition_Rule" root-group="yes">
<attrmap>
<column name="Product_Id" data-type="INTEGER" list-to-replicant="yes" list-field="QPS/[0-55]/Products" value-from-field="QPS/[0-55]/Products/[0-56]/Product" is-replicant="yes" allows-null="yes" is-url="no"/>
<column name="Question_ID" data-type="INTEGER" value-from-field="QPS/[0-55]/Question" is-replicant="yes" allows-null="yes" is-url="no"/>
</attrmap>
</group>
</dbschema>
--------------------------------------------------------------------
When we try to deploy the data, it appears that DataDeploy is unable to loop well through the nested replicants to the innermost level. Any attempt to modify the dbschema in order to make it work failed. We are not sure if this is a known DataDeploy problem with a nested replicants or something related to our code.
We would greatly appreciate if anyone who has an experience with Deploy of nested replicants, can suggest something.
Find more posts tagged with
Comments
Migrateduser
HI,
Here is my test case that seems to be working,
You might want to post your DCR. Also TS and OD versions.
thanks
srini
Bill_Stolp
Hi,
Thank you very much for your reply.
However, our dbschema is following the same logic. I found out that it is working when you deploy only one replicant item.
If you have more than one, it is failing.
I have attached our DCR and dbschema files. They are little bit more complicated because they have more items than i originally showed in my examples, the the logic is the same.
You might want to take a look and tell if there is something wrong.
Thank you a lot.
Migrateduser
Hi,
DD has a limitation for the use of "list-to-replicant" and "list-field",
1. you can not have more than one column using these fields to replicate elements from the "same level" in your xml tree.
In your case you have:
<column name="Condition_Rule_ID"
list-field="QPS/[0-10]/Ids"
<column name="State_Id" data-type="CHAR(2)"
list-field="QPS/[0-10]/States"
both "states" and "ids" are at the same level in the tree.
2. The values in the xml source for the "list-filed" should not be empty.
in your case QPS/[0-10]/States in some nodes is empty
I used the following the have DD deploy the content.
<attrmap>
<column name="Condition_Rule_ID"
data-type="INTEGER"
list-to-replicant="yes"
list-field="QPS/[0-10]/Ids"
value-from-field="QPS/[0-10]/Ids/[0-56]/Id"
is-replicant="yes"
allows-null="no" is-url="no"/>
<column name="State_Id" data-type="CHAR(255)"
value-from-field="QPS/[0-10]/States"
is-replicant="yes"
allows-null="yes" is-url="no"/>
<column name="Product_Id"
data-type="CHAR(3000)"
value-from-field="QPS/[0-10]/Products"
is-replicant="yes"
allows-null="yes"
is-url="no"/>
<column name="Question_ID"
data-type="INTEGER"
value-from-field="QPS/[0-10]/Question"
is-replicant="yes"
allows-null="no"
is-url="no"/>
</attrmap>
Not very sure about your use case,Sorry if i have it wrong ;-)
From the dcr and dbschema that you posted It might be helpful to look at using DCT replicants such that you have something like this in your DCR
<root>
<question/>
<questionText/>
<pro_Id>
<product>
<state>
</product>
</prod_Id>
</root>
thanks
srini
Bill_Stolp
I guess you gave me a right explanation why this does not work.
We have more than one column as a list-to-replicant with the same root: one for condition rule ids, another is for a
state or product list. We have to generate as many condition_rule ids as we have products or states, which means
state and product should be a list field as well. This causes the problem with DD since it is limited to only one list-to-replicant field.
Thank you very much for your time and help.
cliffhanger
DD has a limitation for the use of "list-to-replicant" and "list-field",
1. you can not have more than one column using these fields to replicate elements from the "same level" in your xml tree.
What if you use two groups for the
same table
? Map one of the list-to-replicant in one group, and map the other in the second one? Would DD have any problem with that?
Bill_Stolp
What name of the second group should be if it refers to the same table?
Thank you
cliffhanger
You could give it any logical name you'd like as long as that's different than the first group name.
Bill_Stolp
Unfortunately, when i tried to use a few groups for the same table, i got the error:
ERROR:Multiple root groups found.
Thank you
cliffhanger
You cannot have multiple
root-group="yes"
, so make that equal to no for all other groups in your dd cfg.
Bill_Stolp
I broke one group in two, each with only one list-to-replicant.
I have left root-group to "Yes" in one group, and set it to "No" in all others.
Still, i got the DD error, which was unable to process the DCR file.
Thank you