blob: 4ec0873cbe0b2b0f3b5a4cda26de668ee6991f70 [file] [log] [blame]
jhha42adf82019-11-06 13:38:31 -06001/*-
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
21package rules;
22
jhh2b0f8002019-11-11 16:18:27 -060023import org.onap.policy.drools.controller.internal.MavenDroolsControllerUpgradesTest;
24
jhha42adf82019-11-06 13:38:31 -060025declare Version
26 version : String
27end
28
29rule "SETUP.2"
30when
31then
32 Version v2 = new Version();
33 v2.setVersion("2");
34 insert(v2);
35
jhh2b0f8002019-11-11 16:18:27 -060036 MavenDroolsControllerUpgradesTest.running2a.countDown();
jhha42adf82019-11-06 13:38:31 -060037end
38
39rule "VERSION.2"
40when
41 $v1 : Version( version == "1")
42then
43 retract($v1);
44
45 Version v12 = new Version();
46 v12.setVersion("12");
47 insert(v12);
48
jhh2b0f8002019-11-11 16:18:27 -060049 MavenDroolsControllerUpgradesTest.running2b.countDown();
jhha42adf82019-11-06 13:38:31 -060050end