Commit 991d7360 authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

Merge branch 'issue_30' into 'develop'

MR: Update osom for service state model change

See merge request !17
parents e043086f d1dba903
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -91,13 +91,14 @@ public class CROrchestrationCheckDeploymentService implements JavaDelegate {
            Service serviceResult = serviceOrderManager.updateService( aService.getId(), supd, propagateToSO );
            Service serviceResult = serviceOrderManager.updateService( aService.getId(), supd, propagateToSO );
            return;
            return;
          }
          }
         
          rlist.add(res);
          rlist.add(res);
          
          
        }
        }
        @Valid
        @Valid
        ServiceStateType currentState = aService.getState();        
        ServiceStateType currentState = aService.getState();        
        
        
	    ServiceStateType nextState = aService.findNextStateBasedOnSupportingResources(rlist);
	    ServiceStateType nextState =  aService.findNextStateBasedOnResourceList(rlist);
	    
	    
	    if (!currentState.equals(nextState)) {
	    if (!currentState.equals(nextState)) {
	        supd.setState( nextState );     
	        supd.setState( nextState );     
+1 −1
Original line number Original line Diff line number Diff line
@@ -96,7 +96,7 @@ public class GCOrchestrationCheckDeploymentService implements JavaDelegate {
        @Valid
        @Valid
        ServiceStateType currentState = aService.getState();        
        ServiceStateType currentState = aService.getState();        
        
        
	    ServiceStateType nextState = aService.findNextStateBasedOnSupportingResources(rlist);
	    ServiceStateType nextState = aService.findNextStateBasedOnResourceList(rlist);
	    
	    
	    if (!currentState.equals(nextState)) {
	    if (!currentState.equals(nextState)) {
	        supd.setState( nextState );     
	        supd.setState( nextState );     
+1 −1
Original line number Original line Diff line number Diff line
@@ -34,6 +34,7 @@ public class ProcessOrderItemActionCheck implements JavaDelegate {
		ServiceOrder sor = serviceOrderManager.retrieveServiceOrder((String) execution.getVariable("orderid"));
		ServiceOrder sor = serviceOrderManager.retrieveServiceOrder((String) execution.getVariable("orderid"));
		String orderItemIdToProcess = (String) execution.getVariable("orderItemId");
		String orderItemIdToProcess = (String) execution.getVariable("orderItemId");
		ServiceOrderItem soi = null;
		ServiceOrderItem soi = null;
        execution.setVariable("saction", "NONE");            
		
		
		for (ServiceOrderItem i : sor.getOrderItem()) {
		for (ServiceOrderItem i : sor.getOrderItem()) {
			if (i.getUuid().equals( orderItemIdToProcess )){
			if (i.getUuid().equals( orderItemIdToProcess )){
@@ -46,7 +47,6 @@ public class ProcessOrderItemActionCheck implements JavaDelegate {
            logger.error("In ProcessOrderItemActionCheck cannot find ServiceOrderItem orderItemIdToProcess=:" + orderItemIdToProcess);
            logger.error("In ProcessOrderItemActionCheck cannot find ServiceOrderItem orderItemIdToProcess=:" + orderItemIdToProcess);
            logger.error("In ProcessOrderItemActionCheck cannot find ServiceOrderItem sor.getUuid()=:" + sor.getUuid() );
            logger.error("In ProcessOrderItemActionCheck cannot find ServiceOrderItem sor.getUuid()=:" + sor.getUuid() );
            logger.error("In ProcessOrderItemActionCheck cannot find ServiceOrderItem sor()=:" + sor.toString() );
            logger.error("In ProcessOrderItemActionCheck cannot find ServiceOrderItem sor()=:" + sor.toString() );
            execution.setVariable("saction", "NONE");            
			return;
			return;
		}
		}