Skip to end of metadata
Go to start of metadata

Use of commands

  • The <show_jobs> command shows an outdated behaviour, it is not recognizing the subfolders of the hot folder and therefore the subfolders are not included with the xml response of this command.
  • The <show_state> command is more intelligent. With this command you can request folders and subfolders in a more performant way.

Examples for commands

<show_state subsystems="folder job" what="folders"/>

will return all jobs in all folders. The structure of the response xml will reflect the structure of the folders.

To receive just the first level of a folder structure use this command:

<show_state what="folders job_chains no_subfolders" />

This will result in an xml response with all folders and files of the first level of the hot folder.

To receive the structure of a subfolder, e.g. with name oh, use the following command:

<show_state what="folders job_chains no_subfolders" path="/oh"/>

This has been tested to work for a JobScheduler release

Example for use with a Java class

See the following example how to use the SOSJobSchedulerModel package:

	public final void testCreateShowJobsViaState() {

		JSCmdShowState objCmdShowState = objFactory.createShowState(); // http://localhost:4444/doc/en/xml/show_state.xml
		// objCmdShowState.setWhat("folders job_chains no_subfolders");
		objCmdShowState.setWhat("folders job_chains");;

		State objState = objCmdShowState.getState();
		Folder objFolder = objState.getFolder();

		if (objFolder != null) {

		 * Jobs only with all Folders:
		 *		<show_state subsystems="folder job" what="folders"/>
		 * what for folder view in show_state
		 * 		<show_state what="folders job_chains no_subfolders" path="/oh"/>

	private void TraverseFolders(Folder pobjFolder) {

		final String conMethodName = conClassName + "::TraverseFolders";

		for (Object objAnObject : pobjFolder.getFileBasedOrJobsOrFolders()) {
			if (objAnObject instanceof FileBased) {
				FileBased objFB = (FileBased) objAnObject;
				logger.debug("file = " + objFB.getFile());
				if (objAnObject instanceof JobChains) {
					JobChains objJobChains = (JobChains) objAnObject;
					for (JobChain objJobChain : objJobChains.getJobChain()) {
					if (objAnObject instanceof Jobs) {
						Jobs objJobs = (Jobs) objAnObject;
						for (Job objJob : objJobs.getJob()) {
						if (objAnObject instanceof Folders) {
							Folders objFolders = (Folders) objAnObject;
							for (Folder objFolder : objFolders.getFolder()) {
							if (objAnObject instanceof Orders) {
								Orders objOrders = (Orders) objAnObject;
								for (Order objOrder : objOrders.getOrder()) {
								if (objAnObject instanceof ProcessClasses) {
									ProcessClasses objProcessClasses = (ProcessClasses) objAnObject;
									for (ProcessClass objProcessClass : objProcessClasses.getProcessClass()) {

	} // private void TraverseFolders
Write a comment…