Skip to Content

<p>To run a program job that is published to Enterprise you need to set classpath which contains Business Objects or other 3rd party SDK Jars that you may be using in the program object. You will need to update the classpath of the object as well as any recurring scheduled instances if you update the Jars location or update to different set of Jars or migrate from older version of Enterprise to a newer one. The following code can be use to update that in a batch. Also to update the classpath for already existing schedules you can only do it via custom code similar to the following:</p><p>Java SDK Code<br /><textarea cols=”75″ rows=”10″><%@ page import = “com.crystaldecisions.sdk.framework.*,

                   com.crystaldecisions.sdk.exception.*,

                   com.crystaldecisions.sdk.properties.*,

                   com.crystaldecisions.sdk.occa.infostore.*”

%>

<%
     IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon( “administrator”, “<password>”, “<cmsname>”, “secEnterprise”);
     IInfoStore infoStore = (IInfoStore)enterpriseSession.getService(“”, “InfoStore”);
     IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query(“SELECT TOP 1 si_id, si_processinfo FROM CI_INFOOBJECTS WHERE SI_KIND = ‘Program’ AND SI_RECURRING=1” );
     IInfoObject programObject = (IInfoObject) oInfoObjects.get(0);
     programObject.getProcessingInfo().properties().setProperty(“SI_CLASSPATH”,”newclasspath”);
     infoStore.commit(oInfoObjects);
     enterpriseSession.logoff();
%></textarea></p>

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply