As presented at Progress NEXT 2019 - Doing more with PASOE and Spring, May 2019.
This repository is maintained @ GitLab and is then mirrored here.
This project will continue to reflect the one originally demonstrated at the Progress NEXT 2019 session, with the following differences
- minor updates, enhancements, and cleanup making the project easier to build.
- the slides used during the session have been added
No other changes will be made to this project. However, feedback and pull-requests are welcomed.
These instructions walk through the setup and deployment of the NextScheduler. If you wish, you may also choose to color outside-the-lines.
This project makes the assumption that you:
- Have your own OpenEdge installation that includes the PASOE product
- Are familiar with OpenEdge and PASOE -- enough to start and stop a PASOE instance.
- Will be using either the Progress Developer Studio for OpenEdge (PDSOE), or a simillary configured Eclipse IDE -- referred to as
IDE
orthe IDE
below - Have left the project named
NextScheduler
- Will read all instructions and take full responsibility for anything you break ;^)
Following initial clone/check-out/load of this project, it will very-likely fail to build. You might even be presented with errors.
There are a few steps that must be taken to prepare the project for use.
The project references the Java libraries shipped with a PASOE 11.7.4 installation. If you are using a different version, you may need to update the dependencies configuration.
All the required dependencies must be resolved before a build will successfully complete.
The Java Build Path has been pre-configured with a Java User Library.
While there are other, and maybe better, dependency management techniques, to keep this project portable, with minimal setup requirements, all of the dependancy .jar files, relative to the PASOE installation folder, are included in the pre-defined Java User Library.
To avoid duplication of resources, and to promote flexibility, all paths within the Java User Library have been configured relative to the root folder of this project.
This project has a sub-folder called PASOE_REF
. The PASOE_REF
folder is merely a pointer to a location that contains the necessary dependencies.
The location of the pointer is configured using a project path variable, also called PASOE_REF
.
The value of the PASOE_REF
variable must be set to the location containing the PASOE 11.7.4 common/lib
sub-folder structure.
Within the IDE, access the Project Properties to set the correct value for the PASOE_REF
variable.
For example, assuming a local OpenEdge installation (referred to as DLC
) that includes the PASOE product, the PASOE_REF
variable can be set relative to that installation folder as: PASOE_REF = DLC/servers/pasoe
Once the PASOE_REF
variable value has been set correctly, refreshing the project will reveal the dependency files within the PASOE_REF
project folder.
Do not continue until this is working as expected
The Java User Library has been exported to a file in the project called userlib/pasoe_ref_local.userlibraries
. This library must be imported before the Java Build Path configuration can resolve all project dependencies.
You may wish to note the full path to the user library file before continuing.
There are several ways to load a user library. One possible method is, within the IDE:
- choose
Window -> Preferences -> Java -> Build Path -> User Libraries
- click
import
- browse and locate, or enter the path for the user library file from project
- ensure the checkbox for
pasoe_ref_local
is marked - click OK or Apply and Close until back in the IDE the project window
If all goes well, and if you have Build Automatically
set, you may notice the error markers disappear from the project as it is built.
Do not continue until this is working as expected
Once built, depending on your IDE filter settings, you may not be able to view the generated .class files, but it's still a good sign if there aren't any error markers within the project.
To simplify deployment, a .jar file can be used to ease the packaging of resources and classes.
To assist with the preparation of the .jar file, a Jar Export Descriptor file was provided in the project nextscheduler.jardesc
.
Simply execute the JAR Export Wizard, and follow the prompts. Once completed, the JAR Export Wizard should have create a new file: /deploy/pasoe/NextScheduler.jar
.
Depending on your IDE settings, some contents may be hidden. You may find it beneficial to view the entire contents of the /deploy
folder. Either configure the IDE filters to show all files, or view the contents of the folder outside of IDE.
Now that the project has been successfully built and packaged, the deployment files in the /deploy
folder need to be copied to specific locations within a PASOE instance, and the NextScheduler enabled within a webapp.
The /deploy/openedge/**/*.cls
files are OpenEdge ABL class files, and must be placed somewhere on the runtime PROPATH
, keeping the folder structure.
For example, the QueueProcessor.cls
file should appear as: /PASInst/openedge/psc/queue/QueueProcessor.cls
.
The file /deploy/openedge/logging.config
can be used to control the messages output by the OpenEdge class files. The logging.config
should appear within the PASOE instance as: /PASInst/openedge/logging.config
.
The /deploy/pasoe/common/lib/NextScheduler.jar
file should be copied to the instance and appear as PASOEInst/common/lib/NextScheduler.jar
.
The /deploy/webapps/WEB-INF/taskexec.xml
file should be placed into the WEB-INF of your webapp as: PASOEInst/webapps/[yourwebapp]/WEB-INF/taskexec.xml
.
The files in the /deploy/ref/
folder are for reference only and demonstrate how to enable the NextScheduler within a webapp, as well as control the logging verbosity.
To enable the NextScheduler for your webapp:
- open the
web.xml
from your web app, usually located/PASInst/webapps/[yourwebapp]/WEB-INF/web.xml
- locate the following line
<param-value/WEB-INF/oeablSecurity.xml</param-value>
- change it the following four lines
<param-value> /WEB-INF/oeablSecurity.xml /WEB-INF/taskexec.xml </param-value>
If you would like to increase logging of the NextScheduler, copy the following line from /deploy/ref/loggin.xml
and paste it to the logging.xml of your webapp <logger name="psc.services.pasoescheduler" level="TRACE" />
.
You will want to restart your PASOE instance to reload the new webapp configuration.
Have fun with your new Spring-powered ABL task scheduler!