-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/flowable/flowable-engine …
…into flowable-release-6.4.2
- Loading branch information
Showing
44 changed files
with
901 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
...r/src/test/java/org/flowable/cmmn/test/validate/TestValidationFormEngineConfigurator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.flowable.cmmn.test.validate; | ||
|
||
import java.util.Map; | ||
import java.util.concurrent.atomic.AtomicBoolean; | ||
|
||
import org.flowable.form.api.FormInfo; | ||
import org.flowable.form.engine.FlowableFormValidationException; | ||
import org.flowable.form.engine.FormEngineConfiguration; | ||
import org.flowable.form.engine.configurator.FormEngineConfigurator; | ||
import org.flowable.form.engine.impl.FormServiceImpl; | ||
import org.flowable.form.engine.impl.cfg.StandaloneFormEngineConfiguration; | ||
|
||
/** | ||
* @author martin.grofcik | ||
*/ | ||
public class TestValidationFormEngineConfigurator extends FormEngineConfigurator { | ||
|
||
public TestValidationFormEngineConfigurator() { | ||
this.formEngineConfiguration = new StandaloneFormEngineConfiguration(); | ||
this.formEngineConfiguration.setFormService(new ThrowExceptionOnValidationFormService(formEngineConfiguration)); | ||
} | ||
|
||
public static class ThrowExceptionOnValidationFormService extends FormServiceImpl { | ||
|
||
protected static AtomicBoolean activate = new AtomicBoolean(false); | ||
|
||
public ThrowExceptionOnValidationFormService(FormEngineConfiguration engineConfiguration) { | ||
super(engineConfiguration); | ||
} | ||
|
||
@Override | ||
public void validateFormFields(FormInfo formInfo, Map<String, Object> values) { | ||
if (activate.get() && (values == null || !values.containsKey("doNotThrowException"))) { | ||
throw new FlowableFormValidationException("Validation failed by default"); | ||
} | ||
} | ||
|
||
public static void activate() { | ||
activate.set(true); | ||
} | ||
|
||
public static void deactivate() { | ||
activate.set(false); | ||
} | ||
|
||
} | ||
} |
44 changes: 0 additions & 44 deletions
44
...rator/src/test/java/org/flowable/cmmn/test/validate/ThrowExceptionFormFieldValidator.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.