I get it now.
I would suggest to use the EJB to invoke LiveCycle. Like you mentioned, you should be able to create a generic function that takes the name of the process as an input parameter and then you call that process using a generic call (if the input/output parameters are the same).
This is an example:
public InvocationResponse InvokeShortLived(String service, String operation, Map parameters){
try {
// Create a ServiceClient object
ServiceClient myServiceClient = _factory.getServiceClient();
InvocationRequest request = _factory.createInvocationRequest(
service, // Specify the short-lived process name
operation, // Specify the operation name
null, // Specify input values
false); // Create a synchronous request
// Send the Invocation request to the short-lived process and
// get back an InvocationResponse object
InvocationResponse response = myServiceClient.invoke(request);
response.getOutputParameter("result");
eturn response;
} catch (Exception ex) {
System.out.println(" ERROR -> " + ex.getMessage());
ex.printStackTrace();
return null;
}
}
Jasmin