Yea, I haven't used this code in 5 years, and this may just be a one off project this time, so not sure how much effort I can put into it for now.  It was pretty cool how it worked though.  Put it on the list of things I would like to work on in the future :-)

I could see it easily being a maven torque target... I was able to just re-use my old code and have it generate the SQL I needed for this project.


-

Jeff



On 5/6/21 4:54 AM, Georg Kallidis wrote:
Hi Jeff,

yes - I never used it. The ant task TorqueDataSQLTask was still in release
candidate Torque 3_2_RC1, but not in Torque 4, which highly restructured
the code.

The velocity templates are quite different if you compare
src/generator/src/templates (old) and
torque-templates/src/main/resources/org/apache/torque/templates (new).

Bu the input generator code seems quite robust, using SAX, the effort
might be more in adapting to the new velocity template structures - if
anyone thinks about code reusing ;-)

Further discussion should be done in [email protected], though IMO
;-)

Best regards, Georg



Von:    Jeffery Painter <[email protected]>
An:     [email protected]
Datum:  06.05.2021 00:26
Betreff:        Re: application data schema not being parsed in torque-4.0
/ turbine 5.0



This is more of a torque question than turbine... I had just grown used
to using it in my old turbine environment.  I found the old task that
did the job here:

http://svn.apache.org/viewvc/db/torque/tags/TORQUE_3_1_1/src/generator/src/java/org/apache/torque/task/TorqueDataSQLTask.java?revision=229611&view=markup



However, it looks like it has been removed from newer versions of
torque.  It was an old maven-1  target  torque-data-sql

I think the easiest option for now is to run the old code, let it
generate the SQL output and then bring that into my new project :-(


-

Jeff


On 5/5/21 5:34 PM, Jeffery Painter wrote:
Hello turbine users,


I feel like I have asked this question before and don't remember the
answer (if there was one).

I have an old project where I had made extensive use of the
application-data.xml - it was still based on turbine-2.3.3 and I am
upgrading this app now to the latest and greatest since I need to use
it on another project.

I had it generating screens based on a templating system I could
configure from the application-data.xml (I would define for example
multiple choice questions and have all possible values defined in the
xml schema)...

It worked great and allowed me to generate these "form" apps quickly
since I can re-use the question types and options pretty easily.


An example:

I have grouped questions by top level..

<QuestionGroup RefId="1" Name="Poster Data" DisplayOrder="1"/>

Then, the actual questions assigned to a group have properties like
the following:

  <SelectQuestion RefId="10"     GroupId="1" DisplayOrder="1"
Question="ReporterType" Label="Who is posting" HasOther="0"
Instructions="HCP: An HCP includes doctors, nurses, pharmacists and
other professional health care providers." />
  <SelectQuestion RefId="11"     GroupId="1" DisplayOrder="2"
Question="NoYesOption"  Label="Patient's own experience" HasOther="0"
     Instructions="If post is from a patient, does it represent their
own experience?" />
  <SelectQuestion RefId="12"     GroupId="1" DisplayOrder="3"
Question="AgeGroup"      Label="Patient age range" HasOther="0"
Instructions="" />
  <SelectQuestion RefId="13"     GroupId="1" DisplayOrder="4"
Question="Gender"          Label="Patient gender" HasOther="0"
Instructions="" />

... then for "Question" I had defined options to select from...
HasOther is a flag to allow for additional free text entry.

for the first one above, "Who is posting" would have the following
options in a drop down select control:

   <SelectOption RefId="51" DisplayOrder="1" Question="ReporterType"
Name="Unknown" DefaultOption="1"/>
   <SelectOption RefId="52" DisplayOrder="2" Question="ReporterType"
Name="Patient/consumer" DefaultOption="0"/>
   <SelectOption RefId="53" DisplayOrder="3" Question="ReporterType"
Name="HCP" DefaultOption="0"/>
   <SelectOption RefId="54" DisplayOrder="4" Question="ReporterType"
Name="Other Family Member or Friend" DefaultOption="0"/>

If I have to extract all of this and generate SQL again from the XML
myself, that is going to be a lot of work.

I can get things to load if I manually convert and stick into the
application-data.sql when creating a new app from scratch, but the new
setup simply ignores my XML file for application data.... kind of
annoying.

Does anyone have any suggestions? Did I miss something in the torque
setup that would make it load this?


Thanks!

Jeff



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to