Structure of custom job-type plug-in
Provides an overview of the structure of a custom job-type plug-in.
When you create a custom job-type plug-in project in the Integration Workbench, you see
something similar to the following figure:The following sections give some outline information
about how to modify the project for your needs.
- <ProjectName>Action.java
- This file contains the classes that control the job validation. As can be seen from the screen capture, you can code validation to be performed when the job is defined (typically, semantic validation) and when the job is run (for example checking that a file exists).
- <ProjectName>ApplicationDescriptor.java
- In the application descriptor, you can manually add the category property
to describe the type of plug-in. The property must have the ID of a predefined category, or a user-defined value. The IDs of the predefined plug-in categories are:
- native
- ERP
- database
- file_transfer
- cloud
- system_management
- business_analytics
If your plug-in does not fall into any of the predefined categories, you can enter a new category and it will be added to the list of plug-in types in the Workload Designer section of the Dynamic Workload Console.
The following example shows the application descriptor of a plug-in that falls within the database category:EJB Application descriptor service provider com.ibm.scheduling.agent.database.jobexecutor.DatabaseApplicationDescriptor application=database factory=com.ibm.scheduling.agent.database.jobexecutor.DatabaseJobExecutor FactorysupportedWorkstations=agent,pool,d-pool supportedOS=UNIX,WNT,OTHER,IBM_i isJobStoppable=true producesJobOutput=true category=database schemaLocation=com/ibm/scheduling/resources/xsd/JSDL-DATABASE.xsd namespace=http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdldatabase version=${agent.executors.ver} label=Database
- Father of <ProjectName>Action.java
- Contains various useful material, such as:
- The logger
- A method for discovering the job log name
- The possibility of customizing the success message label
- The possibility to change the exit codes
- Methods for canceling the job
- com.<CompanyName>.<ProjectName>.msg
- Contains the properties file where you add the messages. Messages can be localized by adding the locale code.
- JSDL-<PROJECTNAME>.xsd
- Contains the XML schema of the panel you created. It is not normally necessary to edit the schema, but it can be a useful point of reference.
- MANIFEST.MF
- This file records the version of your plug-in project.
- labels.properties
- Where you assign the name of your job type, as you want it to be displayed on the Create Workload Definition ► New ► Job Definition drop-down in the Dynamic Workload Console. Localized versions can also be specified here, and are automatically used when the console is in use on systems with the corresponding locale set.
Developing the plug-in
During the process of development, you might decide to modify the input data panel. In this event, you can use the option to regenerate the plug-in using the modified panel. Any coding you added is treated in the following way:- If you removed a field from the panel, you must manually delete any associated coding that you added.
- If you modified a field in the panel, you must check if any associated coding still applies and amend it if not.
- If you added fields, supply any additional coding required.