String processModelName = processQD.getModel();
String processName = processQD.getItem();
String entryName = processQD.getObjectPath();
// Model that contains the process to execute
Model processModel = null;
if (processModelName != null)
{
if (processModelName.charAt(0) != ModelQualifier.PATH_DELIMITER_CHAR)
{
processModelName = ModelQualifier.PATH_DELIMITER_CHAR + processModelName;
}
processModel = engine.getModelMgr().getModelByQualifier(
ModelQualifier.constructModelQualifier(processModelName));
}
if (processModel == null)
{
processModel = context.getExecutingModel();
}
if (processModel == null)
{
String msg = LogUtil.error(getClass(), "Position reference $0 requires a model specification or the executing model to be set. [{1}]", ref, context);
throw new ModelException("NoDefaultProcess", msg);
}
// Absolute reference: The process specification was given in the start reference
ProcessItem process;
if (processName != null)
{
// Resolve the process reference
process = (ProcessItem) processModel.resolveItemRef(processName, ItemTypes.PROCESS);
}
else
{
// Use the model's default process
process = processModel.getDefaultProcess();
if (process == null)
{
String msg = LogUtil.error(getClass(), "Model $0 does not have a default process (position reference: $1). [{2}]", processModel.getQualifier(), ref, context);
throw new ModelException("NoDefaultProcess", msg);
}
}
// Get the entry socket