Commit 03269732 authored by George Tziavas's avatar George Tziavas
Browse files

new file: .bpmn/src/main/resources/processes/ServiceCreationProcess.bpmn2d

	new file:   .bpmn/src/main/resources/processes/TerminateScheduledServices.bpmn2d
	modified:   src/main/java/org/etsi/osl/osom/management/AutomationCheck.java
	new file:   src/main/java/org/etsi/osl/osom/management/MetricoOrchestrationService.java
	modified:   src/main/resources/processes/ServiceCreationProcess.bpmn
parent e043086f
Loading
Loading
Loading
Loading
Loading
+947 −0

File added.

Preview size limit exceeded, changes collapsed.

+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ASCII"?>
<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="BPMNdiagram" name="TerminateScheduledServices" snapToGrid="true" version="0.13.0">
  <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
  <colors red="227" green="238" blue="249"/>
  <colors red="255" green="255" blue="255"/>
</pi:Diagram>
+4 −2
Original line number Diff line number Diff line
@@ -89,6 +89,8 @@ public class AutomationCheck implements JavaDelegate {
				execution.setVariable("brokeActivity", "RFS_OSM" ); 						
			}  else if ( spec.getType().equals("ResourceFacingServiceSpecification") &&  ( spec.findSpecCharacteristicByName( "_CR_SPEC" ) != null ) ) {
				execution.setVariable("brokeActivity", "RFS_CRSPEC" );
			}  else if ( spec.getType().equals("ResourceFacingServiceSpecification") &&  ( spec.findSpecCharacteristicByName( "_MT_" ) != null ) ) {
				 execution.setVariable("brokeActivity", "RFS_MTSPEC" );
			} else if ( spec.getType().equals("ResourceFacingServiceSpecification") ) {
              execution.setVariable("brokeActivity", "GRSPEC" );                      
          }		
+50 −0
Original line number Diff line number Diff line
package org.etsi.osl.osom.management;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.etsi.osl.tmf.sim638.model.Service;
import org.etsi.osl.tmf.sim638.model.ServiceUpdate;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component(value = "metricoOrchestrationService")
public class MetricoOrchestrationService implements JavaDelegate {
    private static final transient Log logger = LogFactory.getLog(MetricoOrchestrationService.class.getName());

    @Value("${spring.application.name}")
    private String compname;

    @Autowired
    private ServiceOrderManager serviceOrderManager;

    @Override
    public void execute(DelegateExecution execution) {

        logger.info( "MetricoOrchestrationService" );
        logger.info( execution.getVariableNames().toString() );

        if ( execution.getVariable("contextServiceId") == null) {

            logger.error( "Variable contextServiceId is NULL!" );
            execution.setVariable("serviceDeploymentFinished", Boolean.TRUE );
            return;
        }
        Service aService = serviceOrderManager.retrieveService( (String) execution.getVariable("contextServiceId") );

        if ( aService == null ) {
            logger.info( "aService is null for contextServiceId = " +(String) execution.getVariable("contextServiceId") );
            execution.setVariable("serviceDeploymentFinished", Boolean.TRUE );
            return;
        }

        execution.setVariable("serviceDeploymentFinished", Boolean.FALSE );

        ServiceUpdate supd = new ServiceUpdate();
        boolean propagateToSO = false;


    }
}
+29 −13
Original line number Diff line number Diff line
@@ -85,6 +85,9 @@
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${brokeActivity=='GRSPEC'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow46" sourceRef="activityGenericResourceDeploymentReq" targetRef="servicetaskCheckForCreatedServices"></sequenceFlow>
    <callActivity id="parallelMetricoReq" name="Metrico Request" activiti:async="true" calledElement="procMetricoDeploymentRequest" activiti:inheritVariables="false"></callActivity>
    <sequenceFlow id="flow47" sourceRef="parallelMetricoReq" targetRef="servicetaskCheckForCreatedServices"></sequenceFlow>
    <sequenceFlow id="flow48" sourceRef="exclusivegateway2" targetRef="parallelMetricoReq"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_CreateServiceProcess">
    <bpmndi:BPMNPlane bpmnElement="CreateServiceProcess" id="BPMNPlane_CreateServiceProcess">
@@ -148,6 +151,9 @@
      <bpmndi:BPMNShape bpmnElement="activityGenericResourceDeploymentReq" id="BPMNShape_activityGenericResourceDeploymentReq">
        <omgdc:Bounds height="71.0" width="130.0" x="1094.0" y="820.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="parallelMetricoReq" id="BPMNShape_parallelMetricoReq">
        <omgdc:Bounds height="71.0" width="121.0" x="1070.0" y="900.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow19" id="BPMNEdge_flow19">
        <omgdi:waypoint x="72.0" y="230.0"></omgdi:waypoint>
        <omgdi:waypoint x="100.0" y="231.0"></omgdi:waypoint>
@@ -164,7 +170,7 @@
        <omgdi:waypoint x="557.0" y="250.0"></omgdi:waypoint>
        <omgdi:waypoint x="557.0" y="326.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="70.0" width="100.0" x="567.0" y="256.0"></omgdc:Bounds>
          <omgdc:Bounds height="65.0" width="100.0" x="567.0" y="256.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow23" id="BPMNEdge_flow23">
@@ -176,7 +182,7 @@
        <omgdi:waypoint x="577.0" y="230.0"></omgdi:waypoint>
        <omgdi:waypoint x="711.0" y="230.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="576.0" y="197.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="576.0" y="197.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow25" id="BPMNEdge_flow25">
@@ -192,7 +198,7 @@
        <omgdi:waypoint x="907.0" y="283.0"></omgdi:waypoint>
        <omgdi:waypoint x="1094.0" y="283.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="917.0" y="270.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="917.0" y="270.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow28" id="BPMNEdge_flow28">
@@ -200,7 +206,7 @@
        <omgdi:waypoint x="907.0" y="520.0"></omgdi:waypoint>
        <omgdi:waypoint x="1094.0" y="520.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="927.0" y="484.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="927.0" y="484.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow29" id="BPMNEdge_flow29">
@@ -208,7 +214,7 @@
        <omgdi:waypoint x="907.0" y="625.0"></omgdi:waypoint>
        <omgdi:waypoint x="1095.0" y="625.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="917.0" y="584.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="917.0" y="584.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow30" id="BPMNEdge_flow30">
@@ -216,7 +222,7 @@
        <omgdi:waypoint x="907.0" y="100.0"></omgdi:waypoint>
        <omgdi:waypoint x="1040.0" y="100.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="917.0" y="131.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="917.0" y="131.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow31" id="BPMNEdge_flow31">
@@ -228,7 +234,7 @@
        <omgdi:waypoint x="1256.0" y="186.0"></omgdi:waypoint>
        <omgdi:waypoint x="1172.0" y="186.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="1261.0" y="139.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="1261.0" y="139.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow33" id="BPMNEdge_flow33">
@@ -241,7 +247,7 @@
        <omgdi:waypoint x="1407.0" y="100.0"></omgdi:waypoint>
        <omgdi:waypoint x="1407.0" y="341.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="1289.0" y="70.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="1289.0" y="70.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow35" id="BPMNEdge_flow35">
@@ -264,14 +270,14 @@
        <omgdi:waypoint x="557.0" y="519.0"></omgdi:waypoint>
        <omgdi:waypoint x="508.0" y="520.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="577.0" y="393.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="577.0" y="393.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow39" id="BPMNEdge_flow39">
        <omgdi:waypoint x="537.0" y="346.0"></omgdi:waypoint>
        <omgdi:waypoint x="420.0" y="346.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="70.0" width="100.0" x="439.0" y="290.0"></omgdc:Bounds>
          <omgdc:Bounds height="65.0" width="100.0" x="439.0" y="290.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow40" id="BPMNEdge_flow40">
@@ -284,7 +290,7 @@
        <omgdi:waypoint x="907.0" y="750.0"></omgdi:waypoint>
        <omgdi:waypoint x="1095.0" y="750.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="910.0" y="699.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="910.0" y="699.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow42" id="BPMNEdge_flow42">
@@ -297,7 +303,7 @@
        <omgdi:waypoint x="907.0" y="377.0"></omgdi:waypoint>
        <omgdi:waypoint x="1094.0" y="377.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="941.0" y="344.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="941.0" y="344.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow44" id="BPMNEdge_flow44">
@@ -309,7 +315,7 @@
        <omgdi:waypoint x="907.0" y="855.0"></omgdi:waypoint>
        <omgdi:waypoint x="1094.0" y="855.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="100.0" x="910.0" y="789.0"></omgdc:Bounds>
          <omgdc:Bounds height="39.0" width="100.0" x="910.0" y="789.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow46" id="BPMNEdge_flow46">
@@ -317,6 +323,16 @@
        <omgdi:waypoint x="1407.0" y="855.0"></omgdi:waypoint>
        <omgdi:waypoint x="1407.0" y="412.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow47" id="BPMNEdge_flow47">
        <omgdi:waypoint x="1191.0" y="935.0"></omgdi:waypoint>
        <omgdi:waypoint x="1407.0" y="935.0"></omgdi:waypoint>
        <omgdi:waypoint x="1407.0" y="412.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow48" id="BPMNEdge_flow48">
        <omgdi:waypoint x="907.0" y="250.0"></omgdi:waypoint>
        <omgdi:waypoint x="907.0" y="935.0"></omgdi:waypoint>
        <omgdi:waypoint x="1070.0" y="935.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
 No newline at end of file