OneData 10.7 | Managing Master Data with webMethods OneData | Implementing webMethods OneData | Scheduling Jobs through Job Center | Job Center | Invoking Jobs From External Schedulers | Calling a Java Program
 
Calling a Java Program
You can invoke a job from an external scheduler by calling a Java program from a command line interface or by calling a batch file and passing the required information through command line parameters. To use this method, the following conditions must be met:
*Java is installed on your machine.
*The class file com.datafoundations.onedata.externalinvocation. ExternalInvocationHandler is in the classpath.
Note:
The class file, com.datafoundations.onedata.externalinvocation. ExternalInvocationHandler, is part of the onedata.jar. You can also package this class as a separate utility because this class has no dependency on any OneData base classes or non-standard Java APIs.
The program accepts the following command line parameters.
Required Parameters
appuri
Web application URI that is used to connect to the servlet, for example, http://localhost:8080
repository
Name of a valid repository.
jobtype
Type of the job. Values can be import or export.
jobname
Name of the job. This parameter can be used to retrieve the Job ID from metadata.
userid
User ID to retrieve authorization credentials to access the job tables.
password
Password of the userid provided. If the service layer security is enabled, then the password is required.
If OneData has LDAP enabled, use the regular OneData password. If OneData does not have LDAP enabled, use the password in the User Profile screen (Personalize -> User Profile).
Optional Parameters
client
Default value is 1.
project
Default value is 1.
schema
Default value is 1 or 2 based on the job type and licensing.
logfile
Name of the log file in which the OneData writes the job output.
Usage Example
The following sample command calls a Java program.
java
  com.datafoundations.onedata.externalinvocation.ExternalInvocationHandler
  -appuri http://localhost:8080/onedata -repository packaged_dev
  -jobtype export
  -jobname Fabric_DB_Job
  -userid admin
  -client 1
  -project 1 -schema 2
  -logfile c:\temp\log1.txt