Does PDSOE have any Ant tasks for generating the service/catalog files for defined services? Specifically the .pidl files in .services/AppServer and the .json files in PASOEContent/static ? I am able to successfully generate the .war file using the ABLWebAppPackage Ant task. However, the .war file generation relies on the existence of the .pidl and .json files - which themselves are generated based upon the contents of the ABL classes. Currently, I have to manually generate these by right clicking a service -> Edit -> Finish to trigger this generation. How can I perform this task via Ant?
Per the discussion at PUG Challenge Americas, I have submitted a case to Progress requesting a command line utility for PIDL file generation. The suggested workaround is to use Web Handler Data Object services instead of REST, as they do not require PIDL files.
Vote for the idea here.
Hi Peter,
I was able to generate the .paar files, but this process does not create the .pidl and .json (catalog) files required by the .war file process. I was able to generate the catalog .json files via the CatalogGeneration Ant task (see "Generating a Data Object Service Catalog File" from the link you sent), but it requires you to manually input the names of all the class files. The article states that a fileset task can be used to dynamically configure the resources element, but I receive the following error when attempting to do this:
CatalogGeneration doesn't support the nested "fileset" element.
Also - I wasn't able to find any way to generate the .pidl files in these articles. Can I do this from the .paar files? I'm not familiar with a .paar file.
OpenEdge version 11.7.5
Ant version 1.9.8
Here's my build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="Apps" default="build" basedir=".">
<property environment="env" />
<property name="DLC" value="${env.DLC}" />
<property name="JAVA" value="${DLC}/java" />
<property name="SRC" value="${basedir}" />
<property name="DEST" value="${SRC}\build" />
<property name="RCODE" value="${basedir}/rcode" />
<property name="DB_LOCAL" value="${env.USERPROFILE}\db-local" />
<property name="APP" value="api" />
<!-- Target for defining 'taskdef' -->
<target name="taskdef">
<echo>Task Definitions</echo>
<!-- Standard Libraries -->
<taskdef resource="com/progress/openedge/pdt/ant/ablwebapp/ablwebapps.properties">
<classpath>
<pathelement location="${JAVA}/ant-ablwebapp.jar" />
<!-- ABLWebApp Dependencies -->
<pathelement location="${JAVA}/ant-libs/ablwebapp.jar" />
<pathelement location="${JAVA}/ant-libs/ablwebapp-dependencies.jar" />
<!-- CodeModel Dependencies -->
<pathelement location="${JAVA}/ant-libs/codemodel-dependencies.jar" />
<!-- AST and its Dependencies -->
<pathelement location="${JAVA}/ant-libs/ast.jar" />
<pathelement location="${JAVA}/ant-libs/ast-dependencies.jar" />
<!-- Additional deps -->
<pathelement location="${JAVA}/ant-libs/velocity-1.7.jar" />
<pathelement location="${JAVA}/ant-libs/velocity-1.7-dep.jar" />
<pathelement location="${JAVA}/ant-libs/1padapters-restExpose.jar" />
<pathelement location="${JAVA}/1padapters-idl.jar" />
<pathelement location="${JAVA}/ext/jettison-1.2.jar" />
<!-- For OpenEdge 12.0 -->
<!--<pathelement location="${dlc.java.dir}/ext/commons-logging-1.2.jar"/>
<pathelement location="${dlc.java.dir}/ext/xmlschema-core-2.2.1.jar"/>-->
</classpath>
</taskdef>
<!-- PCT Libraries -->
<taskdef resource="PCT.properties" />
<typedef resource="types.properties" />
<!-- Next line only for tasks using OpenEdge parser, see ClassDocumentation task -->
<!--<typedef resource="extras.properties" />-->
</target>
<!-- Main task -->
<target name="build" depends="taskdef,clean,compile,war">
</target>
<!-- Clean build, rcode directories -->
<target name="clean" description="clean output for sample web application">
<delete dir="${DEST}" />
<mkdir dir="${DEST}" />
<delete dir="${RCODE}" />
<mkdir dir="${RCODE}" />
</target>
<target name="war" description="generate .war file">
<ABLWebAppPackage
srcdir="${SRC}"
dlc="${DLC}"
destdir="${DEST}"
/>
</target>
<target name="compile" description="generate r-code">
<echo>Generate r-code</echo>
<PCTCompile destDir="${basedir}/rcode" dlcHome="${DLC}" >
<fileset dir="${SRC}/AppServer">
<exclude name="*.i" />
</fileset>
<propath>
<pathelement location="${SRC}/AppServer" />
</propath>
<DBConnection dbName="coinsf1" dbDir="${DB_LOCAL}\coinsf1" readOnly="true" singleUser="false">
<PCTAlias name="acctmas" />
</DBConnection>
<DBConnection dbName="favmas" dbDir="${DB_LOCAL}\favmas" readOnly="true" singleUser="false" />
<DBConnection dbName="coinsadm" dbDir="${DB_LOCAL}\coinsadm" readOnly="true" singleUser="false" />
<DBConnection dbName="favadm" dbDir="${DB_LOCAL}\favadm" readOnly="true" singleUser="false" />
</PCTCompile>
</target>
</project>
Also, I double checked the paar file generation process. It also fails if the .pidl and .json files are not already present. So, essentially what I'm looking for is the step in between compiling ABL code and generating .paar/.war files.
Hi Keerthy,
I have attempted usage of the CatalogGeneration task as advised. While I was able to successfully generate .json catalog files for each service, it required manually listing out each class file in the build.xml that was to be associated with a given service. Can this not be done automatically by referencing the .services/Expose/rest/<servicename>/*.xml files? All of this information is contained in there, and PDSOE uses it to create the .pidl and .json files when editing a service.
Also, I am confused as to how to generate .war/.paar files if there is no available task to create the .pidl files. Yes, I can successfully generate the correct .war and .paar files, but if and only if the .pidl files are present and up to date with the source code (the contents of the .pidl files are subject to change based upon annotations in the class files, and compiling the code does not update the .pidl files). If I cannot generate the .pidl files, how then can I generate the .war or .paar files?
To clarify, my understanding of the relationship between .paar and .war files is as follows (correct me if I am wrong):
A .war file is an archive much like a .zip file that contains all the .paar files for deployment of all services, in addition to other resources.
Individual .paar files can be generated for incremental deployment of specific services.
To clarify, my understanding of the relationship between .paar and .war files is as follows (correct me if I am wrong):
A .war file is an archive much like a .zip file that contains all the .paar files for deployment of all services, in addition to other resources.
Individual .paar files can be generated for incremental deployment of specific services.
Peter - thank you for the explanation. This gives me a better understanding of the software architecture.
Keerthy - The reason I said I had to specify all the files individually is because we have multiple services that have some resources in common. So, while I am sure using the fileset directive would work for a single service, I don't think it would work here.
For example, consider I have 3 resources ClassA.cls, ClassB.cls, and ClassC.cls and 2 services Service1 and Service2. Service1 contains ClassA and ClassB. Service2 contains ClassB and ClassC. How can fileset be used to find the correct class files? If resources were always unique to a service, a folder hierarchy could easily be used, but since the resources are shared, I don't think they can.
I understand that .pidl files can be generated with PDSOE, and there are no Ant tasks available to perform such function. Is there no other utility or PRO* tool that accomplishes this? What I'm really getting to is that using Ant as a build/deploy automation tool is only useful if the whole process is automated. "A chain is only as strong as its weakest link" sort of thing. Do you know if Progress plans to create an Ant task in the future for this?
So, if there is no other way to generate these files other than PDSOE, I have one last follow-up question. We use git as our version control system, and I had initially listed .pidl files in the .gitignore to be untracked since I found out they were generated files. Should I instead continue to track the .pidl files and put the responsibility on each developer to ensure their .services/ folder content (.pidl, .xml, etc.) is up to date with their source code?
Trying to catch up, is there a way to generate the PIDL files from command line ? And then to automate that in Ant / PCT ?
We don't "want" the PIDL files per se; they are just a required intermediary that we must use because WAR / PAAR file generation relies on them. We want to write the ABL code, define the services, and then use Ant / PCT / command line to generate the artifacts required for deployment to a PASOE server. We know the PASOE server requires a WAR or PAAR file to deploy services. We know how to create WAR and PAAR files using the Ant utilities. However, since creating WAR / PAAR requires up to date PIDL files, we need to know how to generate them as well.
How is PDSOE able to generate PIDL files but there is no command line utility or Ant process for us to run the process automatically? Without full automation, we cannot perform CI / CD.
Per the discussion at PUG Challenge Americas, I have submitted a case to Progress requesting a command line utility for PIDL file generation. The suggested workaround is to use Web Handler Data Object services instead of REST, as they do not require PIDL files.
Vote for the idea here.