This deployment operation step is responsible for parsing and attaching the bpm-platform.xml file on tomcat.
We assume that the bpm-platform.xml file is located under $CATALINA_HOME/conf/bpm-platform.xml.
$CATALINA_HOME/conf/bpm-platform.xml
151152153154155156157158159160161
@Test public void getBpmPlatformXmlFromCatalinaConfDirectory() throws MalformedURLException { System.setProperty(CATALINA_HOME, BPM_PLATFORM_XML_LOCATION_PARENT_DIR); try { URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXmlFromCatalinaConfDirectory(); assertEquals(new File(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION).toURI().toURL(), url); } finally { System.clearProperty(CATALINA_HOME); }
164165166167168169170171172
@Test public void lookupBpmPlatformXml() throws NamingException, MalformedURLException { Context context = new InitialContext(); context.bind("java:comp/env/" + BPM_PLATFORM_XML_LOCATION, BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION); URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXml(); assertEquals(new File(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION).toURI().toURL(), url); }