Commit 1a9b1cb5 authored by Francesco Chicchiricco's avatar Francesco Chicchiricco
Browse files

[CRV-278] Introducing intermediate state PENDING ENACTMENT

parent 31d1bef7
......@@ -573,7 +573,7 @@ we are happy to inform you that the password request was execute successfully fo
<SyncopeSchema id="status"/>
<PlainSchema id="status" mandatoryCondition="true"
multivalue="0" readonly="0" type="Enum" uniqueConstraint="0" enumerationValues="PENDING CREATE;PENDING UPDATE;STARTED;FROZEN;STOPPED;PENDING DELETE"
multivalue="0" readonly="0" type="Enum" uniqueConstraint="0" enumerationValues="PENDING CREATE;PENDING UPDATE;PENDING ENACTMENT;STARTED;FROZEN;STOPPED;PENDING DELETE"
anyTypeClass_id="Choreography"/>
<SyncopeSchema id="description"/>
......
......@@ -578,7 +578,7 @@ we are happy to inform you that the password request was execute successfully fo
 
<SyncopeSchema id="status"/>
<PlainSchema id="status" mandatoryCondition="true"
multivalue="0" readonly="0" type="Enum" uniqueConstraint="0" enumerationValues="PENDING CREATE;PENDING UPDATE;STARTED;FROZEN;STOPPED;PENDING DELETE"
multivalue="0" readonly="0" type="Enum" uniqueConstraint="0" enumerationValues="PENDING CREATE;PENDING UPDATE;PENDING ENACTMENT;STARTED;FROZEN;STOPPED;PENDING DELETE"
anyTypeClass_id="Choreography"/>
 
<SyncopeSchema id="chorSpec"/>
......@@ -412,6 +412,9 @@ public class ChoreographyLogic extends AbstractLogic<AbstractBaseBean> {
choreographyPatch.getPlainAttrs().add(new AttrPatch.Builder().attrTO(
new AttrTO.Builder().schema(CHOREOGRAPHY_ID_SCHEMA).value(generatedChoreographyId).build()).
build());
choreographyPatch.getPlainAttrs().add(new AttrPatch.Builder().attrTO(
new AttrTO.Builder().schema(CHOREOGRAPHY_STATUS_SCHEMA).value("PENDING ENACTMENT").build()).
build());
groupLogic.update(choreographyPatch, false);
} else {
String id = choreographyAttrs.get(CHOREOGRAPHY_ID_SCHEMA).getValues().get(0);
......@@ -420,6 +423,8 @@ public class ChoreographyLogic extends AbstractLogic<AbstractBaseBean> {
if (response.getStatus() != Response.Status.ACCEPTED.getStatusCode()) {
throw new WebApplicationException(response);
}
updateChoreographyStatus(choreography, "PENDING ENACTMENT");
}
} catch (Exception e) {
throw new RuntimeException("While enacting on " + enactmentEngine.getKey(), e);
......
Markdown is supported
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