Before attempting to run a Java™ application
or applet, you must deploy it on the Application Engine server.
Note: If you upgrade to a new
FileNet® Workplace or Process Engine version, you must redeploy
all existing custom applications and applets. Existing applications/applets,
including all Java Step Processors
and Launch Step Processors, should be recompiled and then redeployed.
If you get compilation errors, check for applicable changes in the
new version's sample Java Processors
(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 containing your custom Java application/applet to filenet_installation_directory\Workplace\download.
Create an Event JSP
Page
The Event page services Process Engine requests for a JSP page,
redirecting control to the View (UI) JSP page. See the Web Application
Toolkit's Framework Page for additional information.
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 located in the directory you are deploying.
- For Step Processors, on 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"%>
where "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 compiling 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:
<jsp:setProperty name="plugInModule"property="appletClassName"
value="newstep.newStepApplet" />
- On the next line, you should 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, it is best
to 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 using a comma delimiter. Not all browsers support multiple JAR
files. Also, note that 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 just created. The JSP page file needs to be located 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 new directory under the appropriate java directory. Give
it the same directory name as the directory containing 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 stored in the topic variable. For example, if you want to change
the name to "My Custom Step Processor", the statement should
look like the following:
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 need to configure the server
for the Web application being used. To configure the server, use the
Configuration Console to specify the Web application defined for VWService.
See Managing VWServices in the Process
Configuration Console documentation.
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 non-FileNet web application, specify: webApp=CUSTOM or webApp=NONE
Complete the Deployment
To
complete the deployment of your application:
- If your application is for a step, launch step, or a submap in
a workflow (such as, a Step Processor), use
the Process Designer to add the processor to the workflow.
- Run your application.