param=new AppParameter(ap.toValue(),fpId,fpMode,paramVal,SharkUtilities.getJavaClass(fp));
parameters.add(param);
}
ApplicationMappingManager mm=SharkEngineManager.getInstance().getApplicationMapPersistenceManager();
ApplicationMap tad=null;
if (mm!=null) {
XMLComplexElement cOwn=(XMLComplexElement)app.getParent().getParent();
boolean isProcessApp=(cOwn instanceof WorkflowProcess);
ApplicationMappingTransaction t=null;
try {
t = SharkUtilities.createApplicationMappingTransaction();
tad= mm.getApplicationMap(
t,
XMLUtil.getPackage(app).getId(),
((isProcessApp)? cOwn.get("Id").toValue() : null),
applicationId
);
SharkUtilities.commitMappingTransaction(t);
} catch (RootException e) {
SharkUtilities.rollbackMappingTransaction(t,e);
throw e;
} finally {
SharkUtilities.releaseMappingTransaction(t);
}
}
SessionHandle shandle=null;
String tacn=(tad!=null) ? tad.getToolAgentClassName() : defaultToolAgentClassName;
String uname=(tad!=null) ? tad.getUsername() : "";
String pwd=(tad!=null) ? tad.getPassword() : "";
String appN=(tad!=null) ? tad.getApplicationName() : "";
Integer appM=(tad!=null) ? tad.getApplicationMode() : null;
ToolAgent ta=SharkEngineManager.getInstance().
getToolAgentFactory().
createToolAgent(transaction,tacn);
// try to connect to the tool agent
try {