build.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project basedir="../../../." name="CRM_PROCES_tree" default="default_db:PROCES_INIT:tree"
  3. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd">
  4. <description>
  5. To retrieve process tree - just process menu and structurized processes
  6. </description>
  7. <property name="CRM_PROCES_tree_basedir" location="${basedir}/WPS_Functions/default_db/CRM_PROCES_tree" />
  8. <property name="CRM_PROCES_tree_basedir.temp" location="${CRM_PROCES_tree_basedir}/temp" />
  9. <property name="public_html" location="${basedir}" />
  10. <property name="root_build.xml" location="${public_html}/build.xml"/>
  11. <!--<property name="build_properties.xml" location="${public_html}/build_properties.xml" />-->
  12. <property name="build_properties.xml" location="${public_html}/build_properties.xml" />
  13. <target name="default_db:CRM_PROCES:tree:create_tempdir">
  14. <mkdir dir="${CRM_PROCES_tree_basedir.temp}"/>
  15. </target>
  16. <target name="read_build_properties.xml" depends="default_db:CRM_PROCES:tree:create_tempdir">
  17. <ant antfile="${root_build.xml}" target="save_build_properties.xml"/>
  18. <loadproperties srcfile="${build_properties.xml}"/>
  19. </target>
  20. <target name="default_db:CRM_PROCES:tree" depends="read_build_properties.xml">
  21. <ant antfile="${default_db:recurse_ant}" target="clean_temp_dir"/>
  22. <ant antfile="${default_db:recurse_ant}" target="xml_recursed_from_tr_map_with_RelatedFeatureLoop">
  23. <property name="uuid" value="CRM_PROCES_tree"/>
  24. <property name="typeName" value="p5_default_db:CRM_PROCES"/>
  25. <property name="xpath" value="PARENT_ID"/>
  26. <property name="xpath_value" value="0"/>
  27. <property name="xpath_query" value="[ not(local-name()='PROCES_INIT') and not(local-name()='CRM_WSKAZNIK') and not(local-name()='CRM_LISTA_ZASOBOW') ]"/>
  28. </ant>
  29. </target>
  30. <target name="default_db:PROCES_INIT:from_recurse" depends="read_build_properties.xml">
  31. <ant antfile="${default_db:recurse_ant}" target="clean_temp_dir"/>
  32. <ant antfile="${default_db:recurse_ant}" target="xml_recursed_from_tr_map_with_RelatedFeatureLoop">
  33. <property name="uuid" value="PROCES_INIT_list"/>
  34. <property name="typeName" value="default_db:PROCES_INIT"/>
  35. <property name="xpath" value="TYPE"/>
  36. <property name="xpath_value" value="PROCES_INIT"/>
  37. <property name="xpath_query" value="[ local-name()='PROCES_INIT' ]"/>
  38. </ant>
  39. <loadfile property="PROCES_INIT.RelatedFeatureRoot" srcfile="${default_db:recurse_ant_basedir.out}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml"/>
  40. </target>
  41. <target name="default_db:PROCES_INIT" depends="read_build_properties.xml" description="Get Process List">
  42. <echo>TODO currently testing just one process 994 ${default_db:recurse_ant}
  43. simpleSchema_dir = ${simpleSchema_dir}</echo>
  44. <property name="uuid" value="PROCES_INIT_list"/>
  45. <ant antfile="${get_wfs}" target="GetFeature">
  46. <property name="uuid" value="${uuid}"/>
  47. <property name="typeName" value="default_db:CRM_PROCES"/>
  48. <property name="xpath" value="TYPE"/>
  49. <property name="xpath_value" value="PROCES_INIT"/>
  50. <!--<property name="xpath_query" value="[1=2 ]"/>-->
  51. </ant>
  52. <loadfile property="PROCES_INIT.FeatureCollection" srcfile="${get_wfs_basedir.temp}/${uuid}.wfs_output.xml"/>
  53. <!--<echo>$PROCES_INIT.FeatureCollection ${PROCES_INIT.FeatureCollection}</echo>-->
  54. </target>
  55. <target name="default_db:PROCES_INIT:tree_from_wfs" depends="read_build_properties.xml,default_db:PROCES_INIT" description="By generating default_db:CRM_PROCES:tree we will respond with structurized PROCES_INIT with child process and resources xml structures - in parallel ant queries">
  56. <!-- foreach PROCES_INIT.FeatureCollection/ -->
  57. <property name="uuid" value="PROCES_INIT_list"/><!-- moze nie dzialac nowe uuid -->
  58. <loadfile property="PROCES_INIT.FeatureCollection" srcfile="${get_wfs_basedir.temp}/${uuid}.wfs_output.xml"/>
  59. <property name="default_db:PROCES_INIT:tree.raport.xml" location="${CRM_PROCES_tree_basedir.temp}/PROCES_INIT_list.raport.xml"/>
  60. <tempfile property="properties.xml" prefix="properties-for-PROCES_INIT_Tree" suffix=".xml" destdir="${CRM_PROCES_tree_basedir.temp}" deleteonexit="no"/>
  61. <tempfile property="properties_override.xml" prefix="properties_override-for-PROCES_INIT_Tree" suffix=".xml" destdir="${CRM_PROCES_tree_basedir.temp}" deleteonexit="no"/>
  62. <echoxml file="${properties_override.xml}">
  63. <properties>
  64. <property name="uuid" value="PROCES_INIT_TREE_$${xpath_value}"/> <!-- to be evaluated in child xsl/ant-->
  65. <property name="typeName" value="default_db:PROCES_INIT"/>
  66. <property name="xpath" value="ID"/>
  67. </properties>
  68. </echoxml>
  69. <!--<property name="uuid" value="PROCES_INIT_TREE_$${xpath_value}"/>-->
  70. <echoproperties destfile="${properties.xml}" format="xml"/>
  71. <!--<loadfile property="PROCES_INIT.RelatedFeatureRoot" srcfile="${default_db:recurse_ant_basedir.out}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml"/>-->
  72. <!--<echo> $PROCES_INIT.RelatedFeatureRoot ${PROCES_INIT.RelatedFeatureRoot}</echo>-->
  73. <delete file="${default_db:PROCES_INIT:tree.raport.xml}"/>
  74. <xslt basedir="${CRM_PROCES_tree_basedir.temp}" style="${build_ant_universal_by_xsl_match.xsl}" in="${get_wfs_basedir.temp}/${uuid}.wfs_output.xml" destdir="${CRM_PROCES_tree_basedir.temp}" out="${default_db:PROCES_INIT:tree.raport.xml}" >
  75. <factory name="net.sf.saxon.TransformerFactoryImpl">
  76. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  77. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="RelatedFeatureRoot"/>-->
  78. </factory>
  79. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  80. <param name="match_root_element" expression="wfs:FeatureCollection"/>
  81. <param name="match_element" expression="default_db:CRM_PROCES"/>
  82. <param name="antfile_prefix" expression="PROCES_INIT_tree_child"/>
  83. <param name="temp" expression="${CRM_PROCES_tree_basedir.temp}"/>
  84. <param name="basedir" expression="${CRM_PROCES_tree_basedir}"/>
  85. <param name="antfile" expression="${default_db:recurse_ant}"/>
  86. <param name="target" expression="xml_recursed_from_tr_map_with_RelatedFeatureLoop"/>
  87. <param name="match_child_element" expression="ID"/>
  88. <param name="match_child_element_property_name" expression="xpath_value"/>
  89. <param name="properties.xml" expression="${properties.xml}"/>
  90. <param name="properties_override.xml" expression="${properties_override.xml}"/>
  91. <param name="parallel" expression="1"/>
  92. <param name="threadCount" expression="10"/>
  93. </xslt>
  94. </target>
  95. <!-- depends ,default_db:PROCES_INIT:from_recurse -->
  96. <target name="default_db:PROCES_INIT:tree" depends="read_build_properties.xml" description="By generating default_db:CRM_PROCES:tree we will respond with structurized PROCES_INIT with child process and resources xml structures - in parallel ant queries">
  97. <!-- foreach PROCES_INIT.FeatureCollection/ -->
  98. <property name="uuid" value="PROCES_INIT_list"/>
  99. <property name="default_db:PROCES_INIT:tree.raport.xml" location="${CRM_PROCES_tree_basedir.temp}/build_PROCES_INIT_list.raport.xml"/>
  100. <tempfile property="properties.xml" prefix="properties-for-PROCES_INIT_Tree" suffix=".xml" destdir="${CRM_PROCES_tree_basedir.temp}" deleteonexit="no"/>
  101. <tempfile property="properties_override.xml" prefix="properties_override-for-PROCES_INIT_Tree" suffix=".xml" destdir="${CRM_PROCES_tree_basedir.temp}" deleteonexit="no"/>
  102. <echoxml file="${properties_override.xml}">
  103. <properties>
  104. <property name="uuid" value="PROCES_INIT_TREE_$${xpath_value}"/> <!-- to be evaluated in child xsl/ant-->
  105. <property name="typeName" value="default_db:PROCES_INIT"/>
  106. <property name="xpath" value="ID"/>
  107. </properties>
  108. </echoxml>
  109. <property name="uuid" value="PROCES_INIT_TREE_$${xpath_value}"/>
  110. <echoproperties destfile="${properties.xml}" format="xml"/>
  111. <!--<loadfile property="PROCES_INIT.FeatureCollection" srcfile="${get_wfs_basedir.temp}/${uuid}.wfs_output.xml"/>-->
  112. <loadfile property="PROCES_INIT.RelatedFeatureRoot" srcfile="${default_db:recurse_ant_basedir.out}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml"/>
  113. <!--<echo> $PROCES_INIT.RelatedFeatureRoot ${PROCES_INIT.RelatedFeatureRoot}</echo>-->
  114. <delete file="${default_db:PROCES_INIT:tree.raport.xml}"/>
  115. <xslt basedir="${CRM_PROCES_tree_basedir.temp}" style="${build_ant_universal_by_xsl_match.xsl}" in="${default_db:recurse_ant_basedir.out}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml" destdir="${CRM_PROCES_tree_basedir.temp}" out="${default_db:PROCES_INIT:tree.raport.xml}" >
  116. <factory name="net.sf.saxon.TransformerFactoryImpl">
  117. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  118. <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="RelatedFeatureRoot"/>-->
  119. </factory>
  120. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  121. <param name="match_root_element" expression="RelatedFeatureRoot"/>
  122. <param name="match_element" expression="PROCES_INIT"/>
  123. <param name="antfile_prefix" expression="PROCES_INIT_tree_child"/>
  124. <param name="temp" expression="${CRM_PROCES_tree_basedir.temp}"/>
  125. <param name="basedir" expression="${CRM_PROCES_tree_basedir}"/>
  126. <param name="antfile" expression="${default_db:recurse_ant}"/>
  127. <param name="target" expression="xml_recursed_from_tr_map_with_RelatedFeatureLoop"/>
  128. <param name="match_child_element" expression="ID"/>
  129. <param name="match_child_element_property_name" expression="xpath_value"/>
  130. <param name="properties.xml" expression="${properties.xml}"/>
  131. <param name="properties_override.xml" expression="${properties_override.xml}"/>
  132. <param name="parallel" expression="1"/>
  133. <param name="threadCount" expression="10"/>
  134. </xslt>
  135. </target>
  136. </project>