After the parameters for the AUD_Operations have been configured using the IBM FileNet Content Engine acce web administration tool, the Workflow Component Queues have to be configured using the IBM Process Designer Java application. The menu item View ➤ Configuration allows the Component Queues to be configured, as shown in Figure 3-278.
Figure 3-278The View ➤ Configuration menu launches the Configuration tool
Figure 3-279The highlighted icon on the Action bar line commits changes back to the Object Store Component Queue Workflow system
Figure 3-280The list of Queue Properties to be updated is displayed
Figure 3-281The AUD_Operations queue is created by right-clicking the Component Queues node in the Process Designer Configuration tool view
Figure 3-282The Security JAAS Credentials are entered
NoteThe Configuration Context was updated from the displayed FileNetP8 value to CELogin in Figure 3-282.
Figure 3-283The Code Module is selected using the highlighted icon
Figure 3-284The AUDOperations.jar file is selected from the OS1 Design Object store
Figure 3-285The sendJMSMessage parameters are displayed
Figure 3-286The Component step is dragged and dropped to the new Workflow
Figure 3-287The highlighted icon is selected to allow selection of the required queue
Figure 3-288The sendJMSMessage method is clicked to load the call parameters
Figure 3-289The Expression values can be filled with String values
Figure 3-290The right-mouse click on the Component node is used to add additional Java classes
Additional supporting MQ libraries are required in the AUD_Operations Classpath to allow the installed methods to run correctly. These are added as follows.
Figure 3-291The required MQ Series JMS message libraries are copied for installation
Figure 3-292The required .jar libraries are imported from the Installs directory
Figure 3-293The workflow is saved as AUD_JMSMessage.pep
Figure 3-294The changes to the AUD_Operations queue are committed
Figure 3-295The initial parameter order is shown to be incorrect!
As shown in Figure 3-295, the initial sendJMSMessage method argument list order was incorrect, because the template parameters are not correctly ordered in the list box! The parameters were then reentered singly.
Figure 3-296The AUD_Operations parameters are reentered one at a time
Figure 3-297The Component step parameters are now ordered correctly
Figure 3-298The workflow is validated and resaved
NoteIt was discovered that the following original section of code (lines in red bold) caused Java reflection to fail in the import tool, so parameters were not exposed!
MessageProducer myProducer = JMSsession.createProducer(myDest);
if (Message.length() > 0) {
TextMessage outMessage = JMSsession.createTextMessage();
outMessage.setText(Message);
myProducer.send(outMessage);
JMSsession.commit();
}
The new code is as follows (using a different Queue Factory class):
private void putMsg( Destination myDest, String outString, javax.jms.Session jmssession )
throws JMSException, Exception
{
// Use generic MessageProducer instead of Queue/Topic Producer
MessageProducer myProducer = jmssession.createProducer(myDest);
// Get user input and create messages. Loop until user sends CR.
if (outString.length() > 0) {
TextMessage outMessage = jmssession.createTextMessage();
outMessage.setText(outString);
myProducer.send(outMessage);
jmssession.commit();
}
myProducer.close();
}