Modify intent base code. 87/130287/4
authorhekeguang <hekeguang@chinamobile.com>
Tue, 16 Aug 2022 01:39:05 +0000 (09:39 +0800)
committerhekeguang <hekeguang@chinamobile.com>
Tue, 16 Aug 2022 09:06:35 +0000 (17:06 +0800)
Issue-ID: USECASEUI-696
Change-Id: I66ef2a36e555d4c0ee50c91a5ae37d3285922eb3
Signed-off-by: hekeguang <hekeguang@chinamobile.com>
15 files changed:
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagementFunctionRegInfo.java [moved from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagerRegInfo.java with 96% similarity]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessActuationModule.java [moved from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/ActuationModuleImpl.java with 75% similarity]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessDecisionModule.java [moved from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/DecisoinModuleImpl.java with 90% similarity]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessKnowledgeModule.java [new file with mode: 0644]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/KnownledgeModuleImpl.java [deleted file]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentController.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentHandleService.java [new file with mode: 0644]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentModule/KnowledgeModule.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDetectionService.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentInvestigationService.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentProcessService.java

index 53e13e0..9061036 100644 (file)
@@ -17,21 +17,21 @@ package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt;
 
 
 import lombok.Data;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl.ActuationModuleImpl;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl.DecisoinModuleImpl;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl.KnownledgeModuleImpl;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessActuationModule;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessDecisionModule;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessKnowledgeModule;
+import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
-import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
 import org.springframework.stereotype.Component;
 
 @Data
 @Component("CLLBusinessIntentManagementFunction")
 public class CLLBusinessIntentManagementFunction extends IntentManagementFunction {
-    private ActuationModule actuationModule  = new ActuationModuleImpl();
-    private DecisionModule decisoinModule = new DecisoinModuleImpl();
-    private KnowledgeModule knowledgeModule = new KnownledgeModuleImpl();
+    private ActuationModule actuationModule  = new CLLBusinessActuationModule();
+    private DecisionModule decisoinModule = new CLLBusinessDecisionModule();
+    private KnowledgeModule knowledgeModule = new CLLBusinessKnowledgeModule();
 
 
 }
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl;
+package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule;
 
 
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.intentBaseService.IntentHandleService;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
 import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService.IntentProcessService;
@@ -23,18 +25,21 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 @Service
-public class ActuationModuleImpl implements ActuationModule {
+public class CLLBusinessActuationModule implements ActuationModule {
     @Autowired
     IntentProcessService processService;
+    @Autowired
+    IntentHandleService intentHandleService;
+
 
     @Override
-    public void sendToIntentHandler(IntentManagementFunction intentHandler) {
-        processService.setIntentRole(intentHandler, null);
-        processService.intentProcess();
+    public void sendToIntentHandler(IntentManagementFunction IntentHandler) {
+
     }
 
     @Override
     public void sendToNonIntentHandler() {
+
     }
 
     @Override
@@ -44,5 +49,6 @@ public class ActuationModuleImpl implements ActuationModule {
 
     @Override
     public void saveIntentToDb() {
+
     }
 }
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl;
+package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule;
 
 
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
@@ -21,7 +21,7 @@ import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunct
 import org.springframework.stereotype.Service;
 
 @Service
-public class DecisoinModuleImpl implements DecisionModule {
+public class CLLBusinessDecisionModule implements DecisionModule {
     @Override
     public void determineUltimateGoal() {}
 
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessKnowledgeModule.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessKnowledgeModule.java
new file mode 100644 (file)
index 0000000..51a4ee2
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2022 CMCC, Inc. and others. All rights reserved.
+ *
+ * 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.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule;
+
+import org.onap.usecaseui.intentanalysis.bean.models.Expectation;
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CLLBusinessKnowledgeModule implements KnowledgeModule {
+
+    @Override
+    public Intent intentCognition(Intent intent) {
+        intentResolution(intent);
+        //intentReportResolution();
+        getSystemStatus();
+        //interactWithIntentOwner();
+        determineDetectionGoal();
+        return null;
+    }
+
+    //find similar intents in DB
+    void intentResolution(Intent intent) {
+
+    }
+
+    void intentReportResolution() {
+    }
+
+
+    //query the implementation of intent requirements in the system
+    void getSystemStatus() {
+    }
+
+
+    void interactWithIntentOwner() {
+    }
+
+
+    //Determine add, delete, modify according to theobject,target and context of the expectation
+    void determineDetectionGoal() {
+    }
+
+}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/KnownledgeModuleImpl.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/KnownledgeModuleImpl.java
deleted file mode 100644 (file)
index 14b2ea0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2022 CMCC, Inc. and others. All rights reserved.
- *
- * 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.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl;
-
-import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KnownledgeModuleImpl implements KnowledgeModule {
-    @Override
-    public void intentResolution() {}
-
-    @Override
-    public void intentReportResolution() {}
-
-    @Override
-    public void getSystemStatus() {}
-
-    @Override
-    public void interactWithIntentOwner() {
-
-    }
-}
index 85b683b..ce51440 100644 (file)
@@ -18,6 +18,8 @@ package org.onap.usecaseui.intentanalysis.controller;
 
 
 import java.util.List;
+
+import org.onap.usecaseui.intentanalysis.intentBaseService.IntentHandleService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
@@ -35,6 +37,9 @@ public class IntentController {
     @Autowired
     private IntentService intentService;
 
+    @Autowired
+    private IntentHandleService intentHandleService;
+
     @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
     public ResponseEntity<List<Intent>> getIntentList() {
         return ResponseEntity.ok(intentService.getIntentList());
@@ -63,4 +68,9 @@ public class IntentController {
         intentService.deleteIntentById(intentId);
     }
 
+    @PostMapping(value="/handleIntent",produces = MediaType.APPLICATION_JSON_VALUE)
+    public void handleIntent(@RequestBody Intent intent) {
+        intentHandleService.handleOriginalIntent(intent);
+
+    }
 }
index 785a001..f36df23 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.onap.usecaseui.intentanalysis.controller;
 
-import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService.IntentFunctionManageService;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
@@ -34,7 +34,7 @@ public class IntentFunctionManageController {
     IntentFunctionManageService intentFunctionManageService;
 
     @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
-    public ResponseEntity createIntentManage(@RequestBody IntentManagerRegInfo intentManage) {
+    public ResponseEntity createIntentManage(@RequestBody IntentManagementFunctionRegInfo intentManage) {
         return ResponseEntity.ok(intentFunctionManageService.createFunctionManage(intentManage));
     }
 
@@ -45,12 +45,12 @@ public class IntentFunctionManageController {
 
     @PutMapping(value = "/{intentId}", produces = MediaType.APPLICATION_JSON_VALUE)
     public ResponseEntity updateIntentManageById(
-            @PathVariable(value = "id") String id, @RequestBody IntentManagerRegInfo intentManage) {
+            @PathVariable(value = "id") String id, @RequestBody IntentManagementFunctionRegInfo intentManage) {
         return ResponseEntity.ok(intentFunctionManageService.updateIntentManageById(id, intentManage));
     }
 
     @GetMapping(value = "", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ResponseEntity<List<IntentManagerRegInfo>> getIntentManageByID() {
+    public ResponseEntity<List<IntentManagementFunctionRegInfo>> getIntentManageByID() {
         return ResponseEntity.ok(intentFunctionManageService.getIntentManage());
     }
 
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentHandleService.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentHandleService.java
new file mode 100644 (file)
index 0000000..6144e97
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2022 CMCC, Inc. and others. All rights reserved.
+ *
+ * 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.onap.usecaseui.intentanalysis.intentBaseService;
+
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo;
+import org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService.IntentProcessService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+@Service
+public class IntentHandleService {
+    @Autowired
+    private IntentProcessService processService;
+
+    /**
+     * Process the original intent and find the corresponding IntentManagementFunction
+     * @param intent
+     */
+    public void handleOriginalIntent(Intent intent){
+        IntentManagementFunction intentOwner = selectIntentManagementFunction(intent);
+        handleIntent(intent,intentOwner);
+    }
+
+    public void handleIntent(Intent intent, IntentManagementFunction intentOwner) {
+        processService.setIntentRole(intentOwner, null);
+        processService.intentProcess(intent);
+    }
+
+    public IntentManagementFunction selectIntentManagementFunction(Intent intent) {
+        //select the IntentManagementFunctionRegInfo Based on the IMFRegistry information.
+        //Only internalFunction support.
+        //and based on the IntentManagementFunctionRegInfo, get the right IntentManagementFunction bean.
+        //if  no  IntentManagementFunction selected, that means this intent is not supported by this system.
+        return null;
+    }
+
+    public IntentManagementFunctionRegInfo selectIntentManagementFunctionRegInfo(Intent intent) {
+        //select the IntentManagementFunctionRegInfo Based on the IMFRegistry information.
+        //Both internalFunction and externalFunction support.
+        //This is used to get he IntentManagementFunction for a subIntent decomposition.
+        return null;
+    }
+}
index bccc416..8a1f918 100644 (file)
  */
 package org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService;
 
-import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo;
 
 import java.util.List;
 
 public interface IntentFunctionManageService {
-    int createFunctionManage(IntentManagerRegInfo intentManage) ;
+    int createFunctionManage(IntentManagementFunctionRegInfo intentManage) ;
 
     int deleteFunctionManage(String id);
 
-    int updateIntentManageById(String id, IntentManagerRegInfo intentManage);
+    int updateIntentManageById(String id, IntentManagementFunctionRegInfo intentManage);
 
-    List<IntentManagerRegInfo> getIntentManage();
+    List<IntentManagementFunctionRegInfo> getIntentManage();
 
 }
index 71bf8fa..71a6914 100644 (file)
@@ -15,8 +15,7 @@
  */
 package org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService.impl;
 
-import org.onap.usecaseui.intentanalysis.bean.models.Intent;
-import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo;
 import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService.IntentFunctionManageService;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
@@ -32,7 +31,7 @@ public class IntentFunctionManageServiceImpl implements IntentFunctionManageServ
     @Autowired
     private ApplicationContext applicationContext;
     @Override
-    public int createFunctionManage(IntentManagerRegInfo intentManage)  {
+    public int createFunctionManage(IntentManagementFunctionRegInfo intentManage)  {
         return 0;
     }
 
@@ -42,16 +41,16 @@ public class IntentFunctionManageServiceImpl implements IntentFunctionManageServ
     }
 
     @Override
-    public int updateIntentManageById(String id, IntentManagerRegInfo intentManage) {
+    public int updateIntentManageById(String id, IntentManagementFunctionRegInfo intentManage) {
         return 0;
     }
 
     @Override
-    public List<IntentManagerRegInfo> getIntentManage() {
+    public List<IntentManagementFunctionRegInfo> getIntentManage() {
         return null;
     }
 
-    public List<IntentManagementFunction> filterHandleFunction(IntentManagerRegInfo managementRegInfo) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
+    public List<IntentManagementFunction> filterHandleFunction(IntentManagementFunctionRegInfo managementRegInfo) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
         String managetFunctionRegName =managementRegInfo.getHandleName();
 
         IntentManagementFunction function =
index 2a0032a..4bb803b 100644 (file)
  */
 package org.onap.usecaseui.intentanalysis.intentBaseService.intentModule;
 
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+
 public interface KnowledgeModule {
-    void intentResolution();
-    void intentReportResolution();
-    void getSystemStatus();
-    void interactWithIntentOwner();
-    //actuationModel & knownledgeModel interact
+    //Parse, decompose, orchestrate the original intent
+    Intent intentCognition(Intent intent);
 }
index 0232620..13ed2fd 100644 (file)
@@ -15,6 +15,7 @@
  */
 package org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService;
 
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
 import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
 import org.springframework.stereotype.Service;
@@ -34,12 +35,9 @@ public class IntentDetectionService {
         }
     }
 
-    public void detectionProcess() {
+    public Intent detectionProcess(Intent intent) {
         KnowledgeModule ownerKnowledgeModule = intentOwner.getKnowledgeModule();
-        ownerKnowledgeModule.intentResolution();
-        ownerKnowledgeModule.intentReportResolution();
-        ownerKnowledgeModule.getSystemStatus();
-        ownerKnowledgeModule.interactWithIntentOwner();
 
+        return ownerKnowledgeModule.intentCognition(intent);
     }
 }
index 2dc740a..8c39066 100644 (file)
@@ -19,6 +19,8 @@ import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunct
 import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class IntentInvestigationService {
     private IntentManagementFunction intentHandler;
@@ -33,13 +35,14 @@ public class IntentInvestigationService {
         }
     }
 
-    public void investigationProcess() {
+    public List<IntentManagementFunction> investigationProcess() {
         DecisionModule intentDecisionModule = intentOwner.getDecisionModule();
         intentDecisionModule.needDecompostion();
         intentDecisionModule.intentDecomposition();
         intentDecisionModule.intentOrchestration();
         intentDecisionModule.decideSuitableAction();
         intentDecisionModule.exploreIntentHandlers();//返回handler
+        return null;
     }
 
 
index aadbda0..5fa4b98 100644 (file)
  */
 package org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService;
 
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
 import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class IntentProcessService {
     @Autowired
-    IntentDetectionService intentDetectionServiceImpl;
+    IntentDetectionService intentDetectionService;
     @Autowired
     IntentInvestigationService intentInvestigationService;
     @Autowired
@@ -44,25 +47,28 @@ public class IntentProcessService {
             this.intentHandler= intentHandler;
         }
     }
-    public void intentProcess() {
-        intentDetectionServiceImpl.setIntentRole(intentOwner,intentHandler);
-        intentDetectionServiceImpl.detectionProcess();
+    public void intentProcess(Intent intent) {
+        intentDetectionService.setIntentRole(intentOwner,intentHandler);
+        Intent detectIntent = intentDetectionService.detectionProcess(intent);
 
         //investigation process
         intentInvestigationService.setIntentRole(intentOwner,intentHandler);
-        intentInvestigationService.investigationProcess();//List<handler>?
+        List<IntentManagementFunction> intentManagementFunctions =
+                intentInvestigationService.investigationProcess();//List<handler>?
 
-        //definition process
-        intentDefinitionService.setIntentRole(intentOwner,intentHandler);
-        intentDefinitionService.definitionPorcess();
+        for (IntentManagementFunction intentHandler : intentManagementFunctions) {
+            //definition process
+            intentDefinitionService.setIntentRole(intentOwner,intentHandler);
+            intentDefinitionService.definitionPorcess();
 
-        //distribution process
-        intentDistributionService.setIntentRole(intentOwner,intentHandler);
-        intentDistributionService.distributionProcess();
+            //distribution process
+            intentDistributionService.setIntentRole(intentOwner,intentHandler);
+            intentDistributionService.distributionProcess();
 
-        //operation process
-        intentOperationService.setIntentRole(intentOwner,intentHandler);
-        intentOperationService.operationProcess();
+            //operation process
+            intentOperationService.setIntentRole(intentOwner,intentHandler);
+            intentOperationService.operationProcess();
+        }
     }