Index: modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlBinding.java =================================================================== --- modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlBinding.java (revision 6461) +++ modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlBinding.java (working copy) @@ -56,7 +56,7 @@ parse.addProblem(XmlUtil.errorMessageAttribute(element, "name", name, "is empty"), element); } - boolean isActivityAllowSlash = false; + boolean isActivityAllowSlash = true; Boolean candidateCondition = (Boolean) EnvironmentImpl.getFromCurrent("jbpm.activity.allow.slash", false); if (candidateCondition != null) { isActivityAllowSlash = candidateCondition.booleanValue(); Index: modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ActivityParsingTest.java =================================================================== --- modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ActivityParsingTest.java (revision 6461) +++ modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ActivityParsingTest.java (working copy) @@ -34,15 +34,6 @@ */ public class ActivityParsingTest extends JpdlParseTestCase { - public void testInvalidActivityName() { - List problems = parseProblems( - "" + - " " + - "" - ); - assertTextPresent("attribute problems = parseProblems( "" + Index: modules/test-cfg/src/test/java/org/jbpm/test/slashinactivity/SlashInActivityTest.java =================================================================== --- modules/test-cfg/src/test/java/org/jbpm/test/slashinactivity/SlashInActivityTest.java (revision 6461) +++ modules/test-cfg/src/test/java/org/jbpm/test/slashinactivity/SlashInActivityTest.java (working copy) @@ -1,52 +1,60 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -/** - * - */ -package org.jbpm.test.slashinactivity; - -import org.jbpm.api.Configuration; -import org.jbpm.api.Execution; -import org.jbpm.api.ExecutionService; -import org.jbpm.api.JbpmException; -import org.jbpm.api.ProcessEngine; -import org.jbpm.api.ProcessInstance; -import org.jbpm.test.JbpmCustomCfgTestCase; -import org.jbpm.test.JbpmTestCase; - - -public class SlashInActivityTest extends JbpmCustomCfgTestCase { - - private static final String PROCESS_KEY = "test_process"; - - private static final String TEST_PROCESS = - "" + - " " + - " " + - " " + - " " + - ""; - - public void testSlashInActivity() { - deployJpdlXmlString(TEST_PROCESS); - } -} +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +/** + * + */ +package org.jbpm.test.slashinactivity; + +import org.jbpm.api.Configuration; +import org.jbpm.api.Execution; +import org.jbpm.api.ExecutionService; +import org.jbpm.api.JbpmException; +import org.jbpm.api.ProcessEngine; +import org.jbpm.api.ProcessInstance; +import org.jbpm.test.JbpmCustomCfgTestCase; +import org.jbpm.test.JbpmTestCase; + +/** + * @author Huisheng Xu + */ +public class SlashInActivityTest extends JbpmCustomCfgTestCase { + + private static final String PROCESS_KEY = "test_process"; + + private static final String TEST_PROCESS = + "" + + " " + + " " + + " " + + " " + + ""; + + public void testSlashInActivity() { + try { + deployJpdlXmlString(TEST_PROCESS); + fail("shouldn't success deploy"); + } catch(JbpmException ex) { + assertEquals("error: attribute - + Index: modules/userguide/src/main/docbook/en/modules/ch09-Configuration.xml =================================================================== --- modules/userguide/src/main/docbook/en/modules/ch09-Configuration.xml (revision 6461) +++ modules/userguide/src/main/docbook/en/modules/ch09-Configuration.xml (working copy) @@ -101,12 +101,13 @@ The "" isnot allowed to be used by the name of activity. - The name of activity cannot contain slash(/). It comes from jBPM 3.x. + Before jBPM 4.4, the name of activity cannot contain slash(/). It comes from jBPM 3.x. Because jBPM 3.x supported hierarchical names, it allowed an execution could jump from a super-state to the other level of activities. But in jBPM 4.x, there would be no chance to achieve this feature. - So if someone want to use slash(/) in the name of activity. - He could add this configuration parameter into jbpm.cfg.xml. + So since jBPM 4.4, we allowed slash(/) in the name of activity by default. + If someone want to use the previous validation rule for slash(/) in jBPM 4.4, + he could add this configuration parameter into jbpm.cfg.xml. <jbpm-configuration> <import resource="jbpm.default.cfg.xml" /> @@ -114,11 +115,10 @@ <import resource="jbpm.jpdl.cfg.xml" /> <process-engine-context> - <true name='jbpm.activity.allow.slash'/> + <false name='jbpm.activity.allow.slash'/> </process-engine-context> </jbpm-configuration> - By using this, JpdlBinding will skip validation for slash(/) in activity name.