Commit ab0deb94 authored by Marta Różańska's avatar Marta Różańska
Browse files

Merge remote-tracking branch 'origin/rc3.1' into MEL-1102-new-types-of-solvers

parents 206b93cf db1e6a28
......@@ -6,7 +6,7 @@
<groupId>eu.melodic</groupId>
<artifactId>interfaces</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
<dependencies>
<!--<dependency>-->
......@@ -184,4 +184,4 @@
<developerConnection>scm:git:https://bitbucket.7bulls.eu/scm/mel/integration.git</developerConnection>
</scm>
</project>
\ No newline at end of file
</project>
......@@ -18,6 +18,9 @@ types:
notificationURI:
description: The URI of an endpoint to sent the result of Constraint Problem creation.
type: string
isSimulation:
type: string
description: bool indicating whether application is launched in simulation mode or not
watermark:
type: ApiLib.Watermark
ApplySolutionRequest:
......@@ -34,7 +37,6 @@ types:
type: string
watermark:
type: ApiLib.Watermark
DifferenceRequest:
type: object
properties:
......@@ -47,13 +49,11 @@ types:
currDeploymentInstanceName:
type: string
description: Name of the deployment instance.
DifferenceResponse:
type: object
properties:
diff:
type: Touple[]
Touple:
type: object
properties:
......@@ -63,7 +63,6 @@ types:
value:
description: "details of deployment for component"
type: ToupleValue
ToupleValue:
type: object
properties:
......@@ -76,7 +75,6 @@ types:
toRemain:
description: "instances to remain"
type: InstanceDetails[]
InstanceDetails:
type: object
properties:
......@@ -86,7 +84,6 @@ types:
type:
description: "component type"
type: string
/applicationDeployment:
post:
body:
......@@ -111,4 +108,4 @@ types:
200:
body:
application/json:
type: DifferenceResponse
\ No newline at end of file
type: DifferenceResponse
......@@ -78,6 +78,38 @@ types:
type: ApiLib.NotificationResult
watermark:
type: ApiLib.Watermark
MetricsNamesResponse:
type: object
properties:
metricsNames:
type: string[]
watermark:
type: ApiLib.Watermark
SimulatedMetricValuesRequest:
type: object
properties:
applicationId:
type: string
description: The identifier of the application.
metricValues:
type: KeyValuePair[]
watermark:
type: ApiLib.Watermark
SimulatedMetricValuesResponse:
type: object
properties:
applicationId:
type: string
description: The identifier of the application.
KeyValuePair:
type: object
properties:
key:
description: "key"
type: string
value:
description: "value"
type: string
/constraintProblemEnhancement:
post:
body:
......@@ -110,4 +142,19 @@ types:
200:
body:
application/json:
type: UpdateSolutionResponse
\ No newline at end of file
type: UpdateSolutionResponse
/provideSimulatedMetricValues:
post:
body:
application/json:
type: SimulatedMetricValuesRequest
description: Interface used by simulationHandler to provide him metric values from GUI.
responses:
200:
body:
application/json:
type: SimulatedMetricValuesResponse
description: if succeeded or not
......@@ -23,6 +23,9 @@ types:
type: array
items:
type: NewCloud
isSimulation:
type: string
description: bool indicating whether application is launched in simulation mode or not
watermark:
type: ApiLib.Watermark
DeploymentProcessResponse:
......
......@@ -22,6 +22,9 @@ types:
type: boolean
default: true
description: Flag indicating if new CP model should be generated by the CP-generator (false). By default (true) cp-model will not be generated.
isSimulation:
type: string
description: bool indicating whether application is launched in simulation mode or not
cdoResourcePath:
type: string
description: The path in the CDO server where existing cp-model can be found. Obligatory for useExistingCP=true
......@@ -44,4 +47,4 @@ types:
200:
body:
application/json:
type: DeploymentProcessResponse
\ No newline at end of file
type: DeploymentProcessResponse
......@@ -96,6 +96,9 @@ types:
notificationSubject:
type: string
description: Notification subject that will be used when reporting the CP notification.
isSimulation:
type: string
description: bool indicating whether application is launched in simulation mode or not
watermark:
type: ApiLib.Watermark
SolutionEvaluationRequest:
......
......@@ -17,7 +17,7 @@
<classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4.3/mail-1.4.3.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="var" path="M2_REPO/eu/melodic/interfaces/3.0.0-SNAPSHOT/interfaces-3.0.0-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/eu/melodic/interfaces/3.1.0-SNAPSHOT/interfaces-3.1.0-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-rs-extension-providers/3.1.9/cxf-rt-rs-extension-providers-3.1.9.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-core/3.1.9/cxf-core-3.1.9.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/woodstox-core-asl/4.4.1/woodstox-core-asl-4.4.1.jar"/>
......@@ -211,7 +211,7 @@
<classpathentry kind="var" path="M2_REPO/org/jdom/jdom/1.1.3/jdom-1.1.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-transports-local/2.7.15/cxf-rt-transports-local-2.7.15.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-ws-security/2.7.15/cxf-rt-ws-security-2.7.15.jar"/>
<classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache-core/3.0.0/ehcache-core-3.0.0.jar"/>
<classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache-core/3.1.0/ehcache-core-3.1.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/ws/security/wss4j/1.6.18/wss4j-1.6.18.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/santuario/xmlsec/1.5.8/xmlsec-1.5.8.jar"/>
<classpathentry kind="var" path="M2_REPO/org/opensaml/opensaml/2.6.1/opensaml-2.6.1.jar"/>
......
......@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>eu.melodic</groupId>
<artifactId>jackson2-connector</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
<packaging>mule-module</packaging>
<name>jackson2 connector</name>
......@@ -19,7 +19,7 @@
<dependency>
<groupId>eu.melodic</groupId>
<artifactId>interfaces</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
......
......@@ -42,7 +42,7 @@
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/eu/melodic/interfaces/3.0.0-SNAPSHOT/interfaces-3.0.0-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/eu/melodic/interfaces/3.1.0-SNAPSHOT/interfaces-3.1.0-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.6.0/jackson-annotations-2.6.0.jar"/>
<classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.6.3/jackson-core-2.6.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar"/>
......@@ -52,7 +52,7 @@
<classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar"/>
<classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.6.3/jackson-module-jaxb-annotations-2.6.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-xc/1.9.13/jackson-xc-1.9.13.jar"/>
<classpathentry kind="var" path="M2_REPO/eu/melodic/jackson2-connector/3.0.0-SNAPSHOT/jackson2-connector-3.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/eu/melodic/jackson2-connector/3.0.0-SNAPSHOT/jackson2-connector-3.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/eu/melodic/jackson2-connector/3.1.0-SNAPSHOT/jackson2-connector-3.1.0-SNAPSHOT.jar" sourcepath="M2_REPO/eu/melodic/jackson2-connector/3.1.0-SNAPSHOT/jackson2-connector-3.1.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/io/github/cloudiator/client/java-rest/0.3.0-SNAPSHOT/java-rest-0.3.0-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/code/javaparser/javaparser/1.0.11/javaparser-1.0.11.jar"/>
<classpathentry kind="var" path="M2_REPO/com/squareup/javapoet/1.7.0/javapoet-1.7.0.jar"/>
......
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>eu.melodic</groupId>
<artifactId>mule-integration</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
<packaging>mule</packaging>
<name>mule-integration Application</name>
......@@ -242,7 +242,7 @@
<dependency>
<groupId>eu.melodic</groupId>
<artifactId>interfaces</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</dependency>
<dependency>
......@@ -254,7 +254,7 @@
<dependency>
<groupId>eu.melodic</groupId>
<artifactId>jackson2-connector</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
......
......@@ -14,6 +14,7 @@ public class AdapterTransformer {
eu.melodic.models.interfaces.adapter.ApplicationDeploymentRequestImpl interfaceRequest= new eu.melodic.models.interfaces.adapter.ApplicationDeploymentRequestImpl();
interfaceRequest.setApplicationId(req.getApplicationId());
interfaceRequest.setCdoModelsPath(req.getCdoResourcePath());
interfaceRequest.setIsSimulation(req.getIsSimulation());
interfaceRequest.setNotificationURI("/api/adapter/deploymentNotification/" + req.getProcessId() +"/" + req.getNotificationSubject());
interfaceRequest.setWatermark(req.getWatermark());
......
......@@ -4,7 +4,7 @@
<groupId>eu.melodic</groupId>
<artifactId>mule-esb</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>mule-esb</name>
......
......@@ -6,7 +6,7 @@
<groupId>eu.melodic.bpm</groupId>
<artifactId>process</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
<properties>
<lombok.version>1.16.16</lombok.version>
......@@ -38,7 +38,7 @@
<dependency>
<groupId>eu.melodic</groupId>
<artifactId>interfaces</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</dependency>
<dependency>
......@@ -226,4 +226,4 @@
<developerConnection>scm:git:https://bitbucket.7bulls.eu/scm/mel/integration.git</developerConnection>
</scm>
</project>
\ No newline at end of file
</project>
......@@ -244,7 +244,8 @@ public class ApplicationDeploymentExecutor {
}
log.info("Preparing ApplicationDeploymentRequest...");
ApplicationDeploymentRequest request = prepareApplicationDeploymentRequest(execution.getVariable(APPLICATION_ID_VARIABLE).toString(), execution.getVariable("businessKey").toString(), execution.getVariable("cpCdoPath").toString());
ApplicationDeploymentRequest request = prepareApplicationDeploymentRequest(execution.getVariable(APPLICATION_ID_VARIABLE).toString(),
execution.getVariable("businessKey").toString(), execution.getVariable("cpCdoPath").toString(), execution.getVariable("isSimulation").toString());
log.info("ApplicationDeploymentRequest prepared. Sending...");
sendAuthorizedPOSTRequest(execution, request, "applicationDeployment", execution.getVariable(ACCESS_TOKEN_VARIABLE).toString());
log.info("ApplicationDeploymentRequest sent.");
......@@ -441,12 +442,14 @@ public class ApplicationDeploymentExecutor {
return request;
}
private ApplicationDeploymentRequest prepareApplicationDeploymentRequest(String applicationId, String uuid , String cdoResourcePath) {
private ApplicationDeploymentRequest prepareApplicationDeploymentRequest(String applicationId, String uuid,
String cdoResourcePath, String isSimulation) {
ApplicationDeploymentRequest request = new ApplicationDeploymentRequestImpl();
request.setApplicationId(applicationId);
request.setCdoResourcePath(cdoResourcePath);
request.setNotificationSubject("ApplicationDeploymentNotification");
request.setProcessId(uuid);
request.setIsSimulation(isSimulation);
request.setWatermark(prepareWatermark(uuid));
return request;
}
......
......@@ -56,7 +56,8 @@ public class StartProcessVerifierDelegate implements JavaDelegate {
if (pi !=null){
log.info("There is already running process with ID: " +pi.getProcessInstanceId().toString() + " for application: "+execution.getVariable("applicationId") +". This process shall NOT start.");
execution.setVariable("localStartProcessDecision", "STOP");
} else {
} else if (!Boolean.parseBoolean(execution.getVariable("isSimulation").toString())){
//we don't want to wait if application is launched in simulation mode
log.info("No other running processes for application: "+execution.getVariable("applicationId") + ", check if enough time passed since last process finished.");
Calendar calendar = Calendar.getInstance();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment