?: throw BluePrintException("could't get step($stepName) for workflow($workFlowName)")\r
}\r
\r
- fun workflowStepNodeTemplate(workFlowName: String, stepName: String): NodeTemplate {\r
- val nodeTemplateName = workflowStepByName(workFlowName, stepName).target\r
+ fun workflowStepNodeTemplate(workFlowName: String, stepName: String): String {\r
+ return workflowStepByName(workFlowName, stepName).target\r
?: throw BluePrintException("could't get node template name for workflow($workFlowName)'s step($stepName)")\r
- return nodeTemplateByName(nodeTemplateName)\r
+ }\r
+\r
+ fun workflowFirstStepNodeTemplate(workFlowName: String): String {\r
+ val firstStepName = workflowByName(workFlowName).steps?.keys?.first()\r
+ ?: throw BluePrintException("could't get first step for workflow($workFlowName)")\r
+ return workflowStepNodeTemplate(workFlowName, firstStepName)\r
}\r
\r
fun workflowStepFirstCallOperation(workFlowName: String, stepName: String): String {\r
?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s ArtifactDefinition($artifactName)")\r
}\r
\r
+ fun nodeTemplateArtifactForArtifactType(nodeTemplateName: String, artifactType: String): ArtifactDefinition {\r
+ return nodeTemplateArtifacts(nodeTemplateName)?.filter { it.value.type == artifactType }?.map { it.value }?.get(0)\r
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s Artifact Type($artifactType)")\r
+ }\r
+\r
fun nodeTemplateFirstInterface(nodeTemplateName: String): InterfaceAssignment {\r
return nodeTemplateByName(nodeTemplateName).interfaces?.values?.first()\r
?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s first InterfaceAssignment")\r
\r
fun cleanRuntime()\r
\r
+ fun getAsString(key: String): String?\r
+\r
+ fun getAsBoolean(key: String): Boolean?\r
+\r
+ fun getAsInt(key: String): Int?\r
+\r
+ fun getAsDouble(key: String): Double?\r
+\r
/*\r
Get the Node Type Definition for the Node Template, Then iterate Node Type Properties and resolve the expressing\r
*/\r
return get(key)\r
}\r
\r
+ override fun getAsString(key: String): String? {\r
+ return get(key).asText()\r
+ }\r
+\r
+ override fun getAsBoolean(key: String): Boolean? {\r
+ return get(key).asBoolean()\r
+ }\r
+\r
+ override fun getAsInt(key: String): Int? {\r
+ return get(key).asInt()\r
+ }\r
+\r
+ override fun getAsDouble(key: String): Double? {\r
+ return get(key).asDouble()\r
+ }\r
+\r
/*\r
- Get the Node Type Definition for the Node Template, Then iterate Node Type Properties and resolve the expressing\r
- */\r
+ Get the Node Type Definition for the Node Template, Then iterate Node Type Properties and resolve the expressing\r
+ */\r
override fun resolveNodeTemplateProperties(nodeTemplateName: String): MutableMap<String, JsonNode> {\r
log.info("resolveNodeTemplatePropertyValues for node template ({})", nodeTemplateName)\r
val propertyAssignmentValue: MutableMap<String, JsonNode> = hashMapOf()\r
"artifacts": {
"dg-activate-process": {
"type": "artifact-directed-graph",
- "file": "Plans/ActivateProcess.bpmn"
+ "file": "Plans/CONFIG_ActivateNetconf_1.0.0.xml"
}
}
},
}
},
"steps": {
- "call-resource-assignment": {
+ "activate-process": {
"description": "Netconf Activation Workflow",
- "target": "resource-assignment",
+ "target": "activate-process",
"activities": [
{
"call_operation": "ResourceAssignmentComponent.process"
--- /dev/null
+<!--
+ ~ Copyright © 2017-2018 AT&T Intellectual Property.
+ ~
+ ~ 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.
+ -->
+
+<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
+ <method rpc='ActivateNetconf' mode='sync'>
+ <block atomic="true">
+ <execute plugin="resource-assignment" method="process">
+ <outcome value='failure'>
+ <return status="failure">
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <return status='success'>
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file