1 #-------------------------------------------------------------------------------
2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2019 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19 #-------------------------------------------------------------------------------
21 model create name=ExecutionPropertiesRestTestPolicyModel
23 schema create name=SimpleStringType flavour=Java schema=java.lang.String
25 event create name=Event0200 nameSpace=org.onap.policy.apex.domains.test source=Junit target=Decide
26 event parameter create name=Event0200 parName=testToRun schemaName=SimpleStringType
28 event create name=Event0201 nameSpace=org.onap.policy.apex.domains.test source=Decide target=OutSide
29 event parameter create name=Event0201 parName=testToRun schemaName=SimpleStringType
32 task create name=TaskFetchHttpCode
34 task inputfield create name=TaskFetchHttpCode fieldName=testToRun schemaName=SimpleStringType
35 task outputfield create name=TaskFetchHttpCode fieldName=testToRun schemaName=SimpleStringType
37 task logic create name=TaskFetchHttpCode logicFlavour=JAVASCRIPT logic=LS
38 #MACROFILE:"src/test/resources/policies/executionproperties/logic/TaskFetchHttpCode.js"
41 task create name=TaskTagUrl
43 task inputfield create name=TaskTagUrl fieldName=testToRun schemaName=SimpleStringType
44 task outputfield create name=TaskTagUrl fieldName=testToRun schemaName=SimpleStringType
46 task logic create name=TaskTagUrl logicFlavour=JAVASCRIPT logic=LS
47 #MACROFILE:"src/test/resources/policies/executionproperties/logic/TaskTagUrl.js"
51 policy create name=Policy2 template=freestyle firstState=Junit
53 policy state create name=Policy2 stateName=Decide triggerName=Event0201 defaultTaskName=TaskTagUrl
54 policy state output create name=Policy2 stateName=Decide outputName=TagUrlOut eventName=Event0201 nextState=NULL
55 policy state taskref create name=Policy2 stateName=Decide taskLocalName=tag taskName=TaskTagUrl outputType=DIRECT outputName=TagUrlOut
57 policy state create name=Policy2 stateName=Junit triggerName=Event0200 defaultTaskName=TaskFetchHttpCode
58 policy state output create name=Policy2 stateName=Junit outputName=HttpCodeOut eventName=Event0201 nextState=Decide
59 policy state taskref create name=Policy2 stateName=Junit taskLocalName=check taskName=TaskFetchHttpCode outputType=DIRECT outputName=HttpCodeOut