if (xpdlFactoryClass != null)
{
env.put(org.huihoo.workflow.xpdl.parser.Constants.WORKFLOW_FACTORY_XPDL, xpdlFactoryClass);
}
XPDLParser xpdlParser = XPDLParserFactory.newInstance(env).newXPDLParser();
env.clear();
String xpdlFileBase = xpdlFileURL.toString();
if (xpdlFileBase.startsWith("file://"))
{
xpdlFileBase = xpdlFileBase.substring(7);
}
else if (xpdlFileBase.startsWith("file:"))
{
xpdlFileBase = xpdlFileBase.substring(5);
}
WorkflowPackage workflowPackage;
try
{
workflowPackage = xpdlParser.parse(new File(xpdlFileBase));
}
catch (IOException e)
{
throw new WorkflowException(e);
}