Running custom activity beans in a separate process

User-created code can do almost anything, but could adversely affect the reliability of the IPA server, especially if any of the user-created code created problems or accessed libraries that introduced problems. For this reason, it is possible to run custom adapters in their own process separate from the IPA server. Isolated in a separate process, it is more difficult for custom code to adversely affect the operation of the IPA server. Another reason to run a custom activity in a separate process would be if the custom activity needs access to versions of libraries different than those used by IPA. It is possible to specify a completely different classpath for the custom activity if it is run in a separate process.

To specify that a custom activity is to run in a separate process, add the custom activity Java Bean’s full classpath to the pfi.customActivity.beansToRunSeparate property in Infor Grid. To specify special runtime options for custom activities that run in a separate process, use the pfi.customActivity.beansToRunSeparateOptions property.

Custom activities that run in a separate process may not have complete access to all of the functions made available by the BPMAdapterRuntime interface.

When running a custom activity as a separate process, IPA invokes the class through a Runtime.exec() running the "java" command and specifying the class. The runtime options specified in the pfi.customActivity.beansToRunSeparateOptions property are also added to the java command. IPA communicates with the spawned process through a pipe. The spawned process invokes the bean in the same manner as when calling a bean directly and communicates the results back to IPA through the pipe.