From ff9d53c89ae7c9e7617d3297d2f82508a6c0acbb Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Thu, 23 Jul 2009 18:18:58 +0000 Subject: [PATCH] SlcExecution persistence Security git-svn-id: https://svn.argeo.org/slc/trunk@2745 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../slc/it/webapp/applicationContext.xml | 3 + .../META-INF/MANIFEST.MF | 8 ++- .../WEB-INF/security.xml | 2 +- .../WEB-INF/slc-service-servlet.xml | 6 ++ ...faultExecutionFlowDescriptorConverter.java | 11 +++- .../main/java/org/argeo/slc/cli/SlcMain.java | 8 ++- .../impl/AbstractHttpServicesClient.java | 27 +++++++- .../org/argeo/slc/server/client/spring.xml | 10 +-- .../slc/web/mvc/process/GetSlcExecution.java | 42 +++++++++++++ .../process/NewSlcExecutionController.java | 14 +++++ .../org/argeo/slc/process/RealizedFlow.java | 6 +- .../org/argeo/slc/process/SlcExecution.java | 10 +++ .../slc/castor/SlcExecutionCastorTest.java | 19 +----- .../org.argeo.slc.support.hibernate/pom.xml | 3 +- .../hibernate/process/SlcExecution.hbm.xml | 5 +- .../CastorSlcExecutionHibernateTest.java | 61 +++++++++++++++++++ .../unit/process/SlcExecutionTestUtils.java | 20 ++++++ 17 files changed, 219 insertions(+), 36 deletions(-) create mode 100644 runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/process/GetSlcExecution.java create mode 100644 runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml b/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml index 3d7b05767..85c7f031f 100644 --- a/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml +++ b/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml @@ -8,4 +8,7 @@ + + + \ No newline at end of file diff --git a/modules/server/org.argeo.slc.server.catalina/META-INF/MANIFEST.MF b/modules/server/org.argeo.slc.server.catalina/META-INF/MANIFEST.MF index ad5203f46..e35fd4006 100644 --- a/modules/server/org.argeo.slc.server.catalina/META-INF/MANIFEST.MF +++ b/modules/server/org.argeo.slc.server.catalina/META-INF/MANIFEST.MF @@ -3,6 +3,8 @@ Fragment-Host: com.springsource.org.apache.catalina;bundle-version="[6 .0.16,7.0.0)" Bundle-Version: 0.11.4.SNAPSHOT Bundle-SymbolicName: org.argeo.slc.server.catalina -Import-Package: org.springframework.security.providers, - org.springframework.security, - org.springframework.security.ui +Import-Package: org.springframework.security, + org.springframework.security.providers, + org.springframework.security.ui, + org.springframework.security.userdetails, + org.springframework.security.ui.savedrequest diff --git a/modules/server/org.argeo.slc.webapp.war/WEB-INF/security.xml b/modules/server/org.argeo.slc.webapp.war/WEB-INF/security.xml index 32db8e1d0..35397ad70 100644 --- a/modules/server/org.argeo.slc.webapp.war/WEB-INF/security.xml +++ b/modules/server/org.argeo.slc.webapp.war/WEB-INF/security.xml @@ -4,7 +4,7 @@ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd"> - + diff --git a/modules/server/org.argeo.slc.webapp.war/WEB-INF/slc-service-servlet.xml b/modules/server/org.argeo.slc.webapp.war/WEB-INF/slc-service-servlet.xml index 5ea3a7674..b4143a3ca 100644 --- a/modules/server/org.argeo.slc.webapp.war/WEB-INF/slc-service-servlet.xml +++ b/modules/server/org.argeo.slc.webapp.war/WEB-INF/slc-service-servlet.xml @@ -56,10 +56,16 @@ + + + + + + diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java index b2b613494..968debcb7 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java @@ -39,11 +39,16 @@ public class DefaultExecutionFlowDescriptorConverter implements ExecutionFlowDescriptor executionFlowDescriptor) { Map values = executionFlowDescriptor.getValues(); Map convertedValues = new HashMap(); + ExecutionSpec executionSpec = executionFlowDescriptor + .getExecutionSpec(); - if (values != null) { + if (executionSpec == null) + log.warn("Execution spec is null for " + executionFlowDescriptor); + + if (values != null && executionSpec != null) { values: for (String key : values.keySet()) { - ExecutionSpecAttribute attribute = executionFlowDescriptor - .getExecutionSpec().getAttributes().get(key); + ExecutionSpecAttribute attribute = executionSpec + .getAttributes().get(key); if (attribute.getIsFrozen()) continue values; diff --git a/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/cli/SlcMain.java b/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/cli/SlcMain.java index 14fad229b..e8e5352e7 100644 --- a/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/cli/SlcMain.java +++ b/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/cli/SlcMain.java @@ -13,9 +13,9 @@ import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.io.IOUtils; import org.argeo.slc.SlcException; -import org.argeo.slc.server.client.SlcServerHttpClient; import org.argeo.slc.server.client.impl.SlcServerHttpClientImpl; +@SuppressWarnings("static-access") public class SlcMain { public enum Type { standalone, agent, server @@ -23,8 +23,10 @@ public class SlcMain { private static Boolean debug = true; - private final static String BOOTSTRAP_LOG4J_CONFIG = "org/argeo/slc/cli/bootstrapLog4j.properties"; - private final static String DEFAULT_AGENT_CONTEXT = "classpath:org/argeo/slc/cli/spring-agent-default.xml"; + // private final static String BOOTSTRAP_LOG4J_CONFIG = + // "org/argeo/slc/cli/bootstrapLog4j.properties"; + // private final static String DEFAULT_AGENT_CONTEXT = + // "classpath:org/argeo/slc/cli/spring-agent-default.xml"; private final static Option typeOpt = OptionBuilder.withLongOpt("mode") .withArgName("mode").hasArg().withDescription( diff --git a/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/server/client/impl/AbstractHttpServicesClient.java b/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/server/client/impl/AbstractHttpServicesClient.java index 43f8fe16a..569f42c6f 100644 --- a/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/server/client/impl/AbstractHttpServicesClient.java +++ b/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/server/client/impl/AbstractHttpServicesClient.java @@ -5,7 +5,9 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; +import java.net.Authenticator; import java.net.HttpURLConnection; +import java.net.PasswordAuthentication; import java.net.URL; import java.net.URLEncoder; import java.util.Map; @@ -27,6 +29,10 @@ import org.springframework.util.Assert; public abstract class AbstractHttpServicesClient implements HttpServicesClient { private final static Log log = LogFactory .getLog(AbstractHttpServicesClient.class); + + private String user; + private String password; + private Unmarshaller unmarshaller; private Marshaller marshaller; private String baseUrl; @@ -35,9 +41,19 @@ public abstract class AbstractHttpServicesClient implements HttpServicesClient { private Long retryPeriod = 1000l; private Long defaultTimeout = 30 * 1000l; + public void init() { + if (user != null && password != null) + Authenticator.setDefault(new Authenticator() { + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(user, password + .toCharArray()); + } + }); + } + @SuppressWarnings(value = { "unchecked" }) public T callService(String path, Map parameters) { - return (T)callService(path, parameters, null); + return (T) callService(path, parameters, null); } @SuppressWarnings(value = { "unchecked" }) @@ -101,6 +117,7 @@ public abstract class AbstractHttpServicesClient implements HttpServicesClient { protected Object callServiceLowLevel(String path, Map parameters, Object body) throws IOException { + Assert.notNull(baseUrl, "base url"); HttpURLConnection connection = null; Writer writer = null; @@ -217,4 +234,12 @@ public abstract class AbstractHttpServicesClient implements HttpServicesClient { return defaultTimeout; } + public void setUser(String user) { + this.user = user; + } + + public void setPassword(String password) { + this.password = password; + } + } diff --git a/runtime/org.argeo.slc.launcher/src/main/resources/org/argeo/slc/server/client/spring.xml b/runtime/org.argeo.slc.launcher/src/main/resources/org/argeo/slc/server/client/spring.xml index c9af00057..a4546c0ca 100644 --- a/runtime/org.argeo.slc.launcher/src/main/resources/org/argeo/slc/server/client/spring.xml +++ b/runtime/org.argeo.slc.launcher/src/main/resources/org/argeo/slc/server/client/spring.xml @@ -1,7 +1,6 @@ - + + + diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/process/GetSlcExecution.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/process/GetSlcExecution.java new file mode 100644 index 000000000..eea87a6ab --- /dev/null +++ b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/process/GetSlcExecution.java @@ -0,0 +1,42 @@ +package org.argeo.slc.web.mvc.process; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.argeo.slc.dao.process.SlcExecutionDao; +import org.argeo.slc.msg.ObjectList; +import org.argeo.slc.process.SlcExecution; +import org.argeo.slc.web.mvc.AbstractServiceController; +import org.springframework.oxm.Unmarshaller; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.xml.transform.StringSource; + +/** Lists SLC executions possibly filtering them. */ +public class GetSlcExecution extends AbstractServiceController { + private SlcExecutionDao slcExecutionDao; + private Unmarshaller unmarshaller; + + @Override + protected void handleServiceRequest(HttpServletRequest request, + HttpServletResponse response, ModelAndView modelAndView) + throws Exception { + String uuid = request.getParameter("uuid"); + SlcExecution slcExecution = slcExecutionDao.getSlcExecution(uuid); + + StringSource source = new StringSource(slcExecution + .getRealizedFlowsXml()); + ObjectList ol2 = (ObjectList) unmarshaller.unmarshal(source); + ol2.fill(slcExecution.getRealizedFlows()); + + modelAndView.addObject(slcExecution); + } + + public void setSlcExecutionDao(SlcExecutionDao slcExecutionDao) { + this.slcExecutionDao = slcExecutionDao; + } + + public void setUnmarshaller(Unmarshaller unmarshaller) { + this.unmarshaller = unmarshaller; + } + +} diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/process/NewSlcExecutionController.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/process/NewSlcExecutionController.java index 7b03f3b9b..d4a67b19d 100644 --- a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/process/NewSlcExecutionController.java +++ b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/process/NewSlcExecutionController.java @@ -9,15 +9,18 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.slc.msg.MsgConstants; +import org.argeo.slc.msg.ObjectList; import org.argeo.slc.process.SlcExecution; import org.argeo.slc.process.SlcExecutionStep; import org.argeo.slc.runtime.SlcAgent; import org.argeo.slc.runtime.SlcAgentFactory; import org.argeo.slc.services.SlcExecutionService; import org.argeo.slc.web.mvc.AbstractServiceController; +import org.springframework.oxm.Marshaller; import org.springframework.oxm.Unmarshaller; import org.springframework.util.Assert; import org.springframework.web.servlet.ModelAndView; +import org.springframework.xml.transform.StringResult; import org.springframework.xml.transform.StringSource; /** Send a new SlcExecution. */ @@ -27,6 +30,7 @@ public class NewSlcExecutionController extends AbstractServiceController { private SlcAgentFactory agentFactory; private Unmarshaller unmarshaller; + private Marshaller marshaller; private SlcExecutionService slcExecutionService; @Override @@ -71,6 +75,12 @@ public class NewSlcExecutionController extends AbstractServiceController { slcExecution.getSteps().add( new SlcExecutionStep(SlcExecutionStep.TYPE_START, "Process started from the Web UI")); + + ObjectList ol = new ObjectList(slcExecution.getRealizedFlows()); + StringResult result = new StringResult(); + marshaller.marshal(ol, result); + slcExecution.setRealizedFlowsXml(result.toString()); + slcExecutionService.newExecution(slcExecution); SlcAgent agent = agentFactory.getAgent(agentId); @@ -89,4 +99,8 @@ public class NewSlcExecutionController extends AbstractServiceController { this.slcExecutionService = slcExecutionService; } + public void setMarshaller(Marshaller marshaller) { + this.marshaller = marshaller; + } + } diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/RealizedFlow.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/RealizedFlow.java index c47308eef..308b906e7 100644 --- a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/RealizedFlow.java +++ b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/RealizedFlow.java @@ -1,9 +1,13 @@ package org.argeo.slc.process; +import java.io.Serializable; + import org.argeo.slc.execution.ExecutionFlowDescriptor; import org.argeo.slc.execution.ExecutionSpec; -public class RealizedFlow { +public class RealizedFlow implements Serializable { + private static final long serialVersionUID = 1L; + private String moduleName; private String moduleVersion; private ExecutionFlowDescriptor flowDescriptor; diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecution.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecution.java index 7a81facf6..626af3eb6 100644 --- a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecution.java +++ b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecution.java @@ -28,6 +28,7 @@ public class SlcExecution implements Serializable { /** TODO: Synchronize */ private List steps = new ArrayList(); private List realizedFlows = new ArrayList(); + private String realizedFlowsXml = null; public List getRealizedFlows() { return realizedFlows; @@ -143,4 +144,13 @@ public class SlcExecution implements Serializable { return steps.get(steps.size() - 1).getBegin(); } } + + public String getRealizedFlowsXml() { + return realizedFlowsXml; + } + + public void setRealizedFlowsXml(String realizedFlowsXml) { + this.realizedFlowsXml = realizedFlowsXml; + } + } diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java index bfd6a7e11..3a9e847b8 100644 --- a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java +++ b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/SlcExecutionCastorTest.java @@ -1,17 +1,12 @@ package org.argeo.slc.castor; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.List; import java.util.UUID; -import org.argeo.slc.execution.ExecutionFlowDescriptor; import org.argeo.slc.msg.process.SlcExecutionRequest; import org.argeo.slc.msg.process.SlcExecutionStepsRequest; -import org.argeo.slc.process.RealizedFlow; import org.argeo.slc.process.SlcExecution; import org.argeo.slc.process.SlcExecutionStep; -import org.argeo.slc.unit.execution.ExecutionFlowDescriptorTestUtils; import org.argeo.slc.unit.process.SlcExecutionTestUtils; import org.springframework.xml.transform.StringResult; @@ -70,18 +65,8 @@ public class SlcExecutionCastorTest extends AbstractCastorTestCase { } public void testMarshUnmarsh() throws Exception { - SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution(); - List realizedFlows = new ArrayList(); - RealizedFlow realizedFlow = new RealizedFlow(); - ExecutionFlowDescriptor flowDescriptor = ExecutionFlowDescriptorTestUtils - .createSimpleExecutionFlowDescriptor(); - realizedFlow.setModuleName("test.module"); - realizedFlow.setModuleVersion("1.0.0"); - realizedFlow.setFlowDescriptor(flowDescriptor); - realizedFlow.setExecutionSpec(flowDescriptor.getExecutionSpec()); - realizedFlows.add(realizedFlow); - slcExec.setRealizedFlows(realizedFlows); - + SlcExecution slcExec = SlcExecutionTestUtils + .createSlcExecutionWithRealizedFlows(); marshUnmarsh(slcExec, false); } } diff --git a/runtime/org.argeo.slc.support.hibernate/pom.xml b/runtime/org.argeo.slc.support.hibernate/pom.xml index ed93e07d8..0adaab319 100644 --- a/runtime/org.argeo.slc.support.hibernate/pom.xml +++ b/runtime/org.argeo.slc.support.hibernate/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 org.argeo.slc diff --git a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml index 6eb4c08c0..788073d66 100644 --- a/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml +++ b/runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecution.hbm.xml @@ -10,8 +10,9 @@ - - + + diff --git a/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java b/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java new file mode 100644 index 000000000..a43e922e3 --- /dev/null +++ b/runtime/org.argeo.slc.support.hibernate/src/test/java/org/argeo/slc/hibernate/process/CastorSlcExecutionHibernateTest.java @@ -0,0 +1,61 @@ +package org.argeo.slc.hibernate.process; + +import java.sql.SQLException; + +import org.argeo.slc.dao.process.SlcExecutionDao; +import org.argeo.slc.hibernate.unit.HibernateTestCase; +import org.argeo.slc.msg.ObjectList; +import org.argeo.slc.process.SlcExecution; +import org.argeo.slc.unit.process.SlcExecutionTestUtils; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.springframework.orm.hibernate3.HibernateCallback; +import org.springframework.oxm.Marshaller; +import org.springframework.oxm.Unmarshaller; +import org.springframework.xml.transform.StringResult; +import org.springframework.xml.transform.StringSource; + +public class CastorSlcExecutionHibernateTest extends HibernateTestCase { + + public void testSaveWithRealizedFlowsXml() throws Exception { + SlcExecutionDao dao = getBean(SlcExecutionDao.class); + + SlcExecution slcExec = SlcExecutionTestUtils + .createSlcExecutionWithRealizedFlows(); + + ObjectList ol = new ObjectList(slcExec.getRealizedFlows()); + StringResult result = new StringResult(); + getBean(Marshaller.class).marshal(ol, result); + slcExec.setRealizedFlowsXml(result.toString()); + + dao.create(slcExec); + + SlcExecution slcExecPersisted = dao.getSlcExecution(slcExec.getUuid()); + assertSlcExecution(slcExec, slcExecPersisted); + + StringSource source = new StringSource(slcExecPersisted + .getRealizedFlowsXml()); + ObjectList ol2 = (ObjectList) getBean(Unmarshaller.class).unmarshal( + source); + ol2.fill(slcExec.getRealizedFlows()); + + } + + public void assertSlcExecution(final SlcExecution expected, + final SlcExecution persisted) { + getHibernateTemplate().execute(new HibernateCallback() { + + public Object doInHibernate(Session session) + throws HibernateException, SQLException { + session.refresh(persisted); + SlcExecutionTestUtils.assertSlcExecution(expected, persisted); + return null; + } + }); + } + + @Override + protected String getApplicationContextLocation() { + return "org/argeo/slc/hibernate/withCastor.xml"; + } +} diff --git a/runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/process/SlcExecutionTestUtils.java b/runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/process/SlcExecutionTestUtils.java index 8bf941601..e83f1cb8a 100644 --- a/runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/process/SlcExecutionTestUtils.java +++ b/runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/process/SlcExecutionTestUtils.java @@ -4,10 +4,15 @@ import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNotNull; import static org.argeo.slc.unit.UnitUtils.assertDateSec; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; +import org.argeo.slc.execution.ExecutionFlowDescriptor; +import org.argeo.slc.process.RealizedFlow; import org.argeo.slc.process.SlcExecution; import org.argeo.slc.process.SlcExecutionStep; +import org.argeo.slc.unit.execution.ExecutionFlowDescriptorTestUtils; public abstract class SlcExecutionTestUtils { @@ -22,6 +27,21 @@ public abstract class SlcExecutionTestUtils { return slcExec; } + public static SlcExecution createSlcExecutionWithRealizedFlows() { + SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution(); + List realizedFlows = new ArrayList(); + RealizedFlow realizedFlow = new RealizedFlow(); + ExecutionFlowDescriptor flowDescriptor = ExecutionFlowDescriptorTestUtils + .createSimpleExecutionFlowDescriptor(); + realizedFlow.setModuleName("test.module"); + realizedFlow.setModuleVersion("1.0.0"); + realizedFlow.setFlowDescriptor(flowDescriptor); + realizedFlow.setExecutionSpec(flowDescriptor.getExecutionSpec()); + realizedFlows.add(realizedFlow); + slcExec.setRealizedFlows(realizedFlows); + return slcExec; + } + public static void assertSlcExecution(SlcExecution expected, SlcExecution reached) { assertNotNull(reached); -- 2.39.2