jhh | a42adf8 | 2019-11-06 13:38:31 -0600 | [diff] [blame] | 1 | /*- |
| 2 | * ============LICENSE_START======================================================= |
| 3 | * ONAP |
| 4 | * ================================================================================ |
| 5 | * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. |
| 6 | * ================================================================================ |
| 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | * you may not use this file except in compliance with the License. |
| 9 | * You may obtain a copy of the License at |
| 10 | * |
| 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | * |
| 13 | * Unless required by applicable law or agreed to in writing, software |
| 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | * See the License for the specific language governing permissions and |
| 17 | * limitations under the License. |
| 18 | * ============LICENSE_END========================================================= |
| 19 | */ |
| 20 | |
| 21 | package rules; |
| 22 | |
jhh | 2b0f800 | 2019-11-11 16:18:27 -0600 | [diff] [blame] | 23 | import org.onap.policy.drools.controller.internal.MavenDroolsControllerUpgradesTest; |
| 24 | |
jhh | a42adf8 | 2019-11-06 13:38:31 -0600 | [diff] [blame] | 25 | declare Version |
| 26 | version : String |
| 27 | end |
| 28 | |
| 29 | rule "SETUP.2" |
| 30 | when |
| 31 | then |
| 32 | Version v2 = new Version(); |
| 33 | v2.setVersion("2"); |
| 34 | insert(v2); |
| 35 | |
jhh | 2b0f800 | 2019-11-11 16:18:27 -0600 | [diff] [blame] | 36 | MavenDroolsControllerUpgradesTest.running2a.countDown(); |
jhh | a42adf8 | 2019-11-06 13:38:31 -0600 | [diff] [blame] | 37 | end |
| 38 | |
| 39 | rule "VERSION.2" |
| 40 | when |
| 41 | $v1 : Version( version == "1") |
| 42 | then |
| 43 | retract($v1); |
| 44 | |
| 45 | Version v12 = new Version(); |
| 46 | v12.setVersion("12"); |
| 47 | insert(v12); |
| 48 | |
jhh | 2b0f800 | 2019-11-11 16:18:27 -0600 | [diff] [blame] | 49 | MavenDroolsControllerUpgradesTest.running2b.countDown(); |
jhh | a42adf8 | 2019-11-06 13:38:31 -0600 | [diff] [blame] | 50 | end |