Before you attempt to run a Java™ application
or applet, you must deploy it on the Application Engine server.
Note: If you upgrade to a new
Content Platform Engine version, you must redeploy
all existing custom applications and applets. Existing applications/applets,
including all Java Step Processors
and Launch Step Processors, are to be recompiled and then redeployed.
If you get compilation errors, check for applicable changes in the
new version's sample Java Processors.
For more information, see
Java Step Processor Sample Files and
Java Launch
Step Processor Sample Files).
The steps to deploy
a Java application/applet are
as follows:
- Copy
the new Java Archive (JAR) file
to the Application Engine server.
- Create
an Event JavaServer Pages (JSP) page.
- Create a corresponding
JSP view (User Interface) page.
- Configure the server
for the web application.
- Complete the
deployment.
Copy
the new JAR file to the Application Engine Server
Copy
the JAR file that contains your custom Java application
or applet to filenet_installation_directory\Workplace\download.
Create an Event
JSP Page
The Event page services Content Platform Engine requests for a JSP
page, redirecting control to the View (UI) JSP page. For more information,
see the Web Application Toolkit Framework Page.
In this procedure, you
modify the supplied Step or Launch Processor Event JSP file to create
the new Event JSP page. The JSP file needs to be in the directory
you are deploying.
- For Step Processors, on the Application Engine host,
go to the filenet_installation_directory\Workplace\eprocess\stepprocs\java.
For Launch Step Processors, go to the filenet_installation_directory\Workplace\eprocess\launchers\java.
- Under the appropriate Java directory,
create a new directory to contain the JSP page.
- For Step Processors, copy the filenet_installation_directory\Workplace\eprocess\stepprocs\java\ootb\WcmStepProc.jsp file
to the new directory. Place the copy into the new directory. For Launch
Step Processors, copy the filenet_installation_directory\Workplace\eprocess\launchers\java\ootb\WcmLaunchSP.jsp file
to the new directory.
- Rename the file to reflect the function of the new processor,
and change the attribute of the renamed file from read-only to read/write.
- Open the renamed file and find the following statement:
<%String jarVersionValues = com.filenet.wcm.toolkit.util.WcmBuildStamp.jarVersion + ", "
+ filenet.vw.toolkit.utils.VWBuildStamp.jarVersion;%>
- Change it to specify your JAR file version. For example:
<%String jarVersionValues = com.filenet.wcm.toolkit.util.WcmBuildStamp.jarVersion + ", "
+ filenet.vw.toolkit.utils.VWBuildStamp.jarVersion + ", " + "2.0.0"%>
The number "2.0.0" is the JAR file version.
- Find the following statement in the <%---UI Beans---%> section:
<jsp:setProperty name="plugInModule"property="appletClassName"
value="filenet.vw.apps.steps.tabbed.VWTabbedStepApplet" />
Modify this line to reflect the name of the package
you used when you compiled your new processor. For example, if your
JAR file was created in the \newStep directory
and the applet is named newStepApplet, your statement would be similar
to the following statement:
<jsp:setProperty name="plugInModule"property="appletClassName"
value="newstep.newStepApplet" />
- On the next line, see the following statement:
<jsp:setProperty name="plugInModule"property="jarArchiveValues"
value="wcm.jar, Process Engine.jar" />
Modify this statement to add the name and location
of the new JAR file. For example, if your custom JAR file is named newSteps.jar,
your statement would be:
<jsp:setProperty name="plugInModule"property="jarArchiveValues"
value="wcm.jar, Process Engine.jar, newSteps.jar" />
If you intend to use several JAR files, place all
of the JAR files into a single JAR file and reference only this one
JAR file. Alternatively, you can specify multiple JAR files by using
a comma delimiter. Not all browsers support multiple JAR files. Also,
each JAR file must be signed.
- Save and close the file.
Create a View Page
Create
a View JSP page (see Framework Page) that corresponds to the JSP Event
page you created. The JSP page file needs to be in the directory you
are deploying.
- For Step Processors, on Application Engine host,
go to the filenet_installation_directory\Workplace\UI-INF\jsp\ui\eprocess\stepprocs\java.
For Launch Step Processors, go to the filenet_installation_directory\Workplace\UI-INF\jsp\ui\eprocess\launchers\java.
- Create a directory under the appropriate java directory. Give
it the same directory name as the directory that contains the Event
JSP page.
- For Step Processors, copy the filenet_installation_directory\Workplace\UI-INF\jsp\ui\eprocess\stepprocs\java\ootb\WcmStepProc.jsp file
to the newly created directory. For Launch Step Processors, copy the filenet_installation_directory\Workplace\UI-INF\jsp\ui\eprocess\launchers\java\ootb\WcmLaunchSP.jsp file
to the newly created directory.
- Rename the file to the exact name (case-sensitive) you used for
the Event JSP page file name.
- Change the attribute of the renamed file from read-only to read/write.
- Open the renamed file, and locate the following statement:
WcmString topic = new WcmString("server.WcmStepProc_jsp.topic", "Java Step Processor");
- Change the display name for the custom Processor by changing the
text that is stored in the topic variable. For example, if you want
to change the name to "My Custom Step Processor", the statement is
to look like the following example:
WcmString topic = new WcmString("server.myCustomStepProcessor_jsp.topic", "My Custom Step Processor");
- Save the renamed file.
Configure the Server for the Web Application
Before
you can run your application or applet, you must configure the server
for the Web application that is being used. To configure the server,
use the IBM® Administration Console for Content
Platform Engine to
specify the Web application that is defined for the workflow system.
For more information, see Configuring
web applications.
Specify the web application
as a parameter when you run your application/applet, as follows:
- For standard (Workplace) applications/applets, specify: webApp=WORKPLACE
- For FileNet® Web Services
applications/applets, specify: webApp=WEB_WORKFLO
- For FileNet Open Client
applications/applets, specify: webApp=OPEN_CLIENT
- For a web application other than FileNet, specify: webApp=CUSTOM
or webApp=NONE
Complete the
Deployment
To complete the deployment of your application:
- If your application is for any of the following items, use Process Designer to add the processor to the workflow:
- Step
- Launch step
- Submap in a workflow (such as a Step Processor)
- Run your application.