I am looking to fill in a couple gaps in my knowledge how to create a custom scheduled job that will appear in WVS Job Scheduler Administration. I have been using the Windchill Customizer's Guide 9.1 for the initial set of steps.
I see I have to add some entries to the wvs.properties.xconf file as shown below from the guide.
Add the following to your wvs.properties.xconf file (edit as needed):
<Property default="MyCustomJob" name="myJob.description"/>
<Property default="ext.wvs.CustomJobs" name=" myJob.class"/>
<Property default="myCustomJob" name=" myJob.method"/>
<Property default="true" name=" myJob.enableOnContainers"/>
<Property default="myJob" name="schedulejobs<N>"/>
I have to create the java class (myJob.java) and then compile it to create the myJob.class.
I have two areas I am having difficulties getting through succesfully.
- How to correctly create the SearchCondition in the java class. Below is an exerpt from the Customizer's Guide. What I want to search for are all representations that were created in a date range. For example, I want to republish all representations (thumbnails) that were created between 2013-06-01 and 2013-09-01 and in a specific context and folder. I am not sure what the correct syntax.
*******
qs.appendWhere(new SearchCondition(WTDocument.class,
Iterated.LATEST_ITERATION,
SearchCondition.IS_TRUE),
******
2. actually compiling the myJob.java file. I included the import statements as shown below. I receive a lot of errors when I try to use 'javac' to compile the myJob.java routine. As I write this, I am wondering if my path variable is not set correctly to compile the routine cleanly. Any hints are greatly appreciated.
*******
package provisur.wvs.CustomJobs;
import java.util.Iterator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import wt.doc.WTDocument;
import wt.epm.EPMDocument;
import wt.epm.build.EPMBuildRule;
import wt.fc.ObjectIdentifier;
import wt.fc.ObjectReference;
import wt.fc.ObjectVector;
import wt.fc.ObjectVectorIfc;
import wt.fc.Persistable;
import wt.fc.PersistenceHelper;
import wt.fc.QueryResult;
import wt.fc.collections.WTArrayList;
import wt.fc.collections.WTList;
import wt.inf.container.ContainerSpec;
import wt.inf.container.WTContained;
import wt.inf.container.WTContainerHelper;
import wt.inf.container.WTContainerRef;
import wt.log4j.LogR;
import wt.part.WTPart;
import wt.pds.StatementSpec;
import wt.pom.PersistenceException;
import wt.query.ClassAttribute;
import wt.query.QuerySpec;
import wt.query.SearchCondition;
import wt.query.SubSelectExpression;
import wt.representation.Representable;
import wt.representation.RepresentationHelper;
import wt.util.WTAttributeNameIfc;
import wt.util.WTException;
import wt.vc.Iterated;
import wt.vc.IterationInfo;
import wt.vc.VersionControlHelper;
import wt.vc.Versioned;
import wt.viewmarkup.DerivedImage;
import com.ptc.wvs.common.util.WVSProperties;
import com.ptc.wvs.server.util.PublishUtils;
******