Search in sources :

Example 6 with CompositeActivityDef

use of org.cristalise.kernel.lifecycle.CompositeActivityDef in project kernel by cristal-ise.

the class LifecycleRendererTest method generateDef_PNG.

@Test
public void generateDef_PNG() throws Exception {
    String caDefXML = FileStringUtility.url2String(Gateway.getResource().getKernelResourceURL("boot/CA/ManageModule.xml"));
    CompositeActivityDef caDef = (CompositeActivityDef) Gateway.getMarshaller().unmarshall(caDefXML);
    BufferedImage img = new LifecycleRenderer(caDef.getChildrenGraphModel(), true).getWorkFlowModelImage(500, 500);
    ImageIO.write(img, "png", new File("target/ManageModule.png"));
}
Also used : LifecycleRenderer(org.cristalise.kernel.lifecycle.renderer.LifecycleRenderer) CompositeActivityDef(org.cristalise.kernel.lifecycle.CompositeActivityDef) File(java.io.File) BufferedImage(java.awt.image.BufferedImage) Test(org.junit.Test)

Aggregations

CompositeActivityDef (org.cristalise.kernel.lifecycle.CompositeActivityDef)6 File (java.io.File)2 CompositeActivity (org.cristalise.kernel.lifecycle.instance.CompositeActivity)2 LifecycleRenderer (org.cristalise.kernel.lifecycle.renderer.LifecycleRenderer)2 Test (org.junit.Test)2 BufferedImage (java.awt.image.BufferedImage)1 Collection (org.cristalise.kernel.collection.Collection)1 CollectionMember (org.cristalise.kernel.collection.CollectionMember)1 CannotManageException (org.cristalise.kernel.common.CannotManageException)1 InvalidDataException (org.cristalise.kernel.common.InvalidDataException)1 ObjectNotFoundException (org.cristalise.kernel.common.ObjectNotFoundException)1 ItemProxy (org.cristalise.kernel.entity.proxy.ItemProxy)1 ActivityDef (org.cristalise.kernel.lifecycle.ActivityDef)1 Workflow (org.cristalise.kernel.lifecycle.instance.Workflow)1 ServerPredefinedStepContainer (org.cristalise.kernel.lifecycle.instance.predefined.server.ServerPredefinedStepContainer)1 DomainPath (org.cristalise.kernel.lookup.DomainPath)1 LookupManager (org.cristalise.kernel.lookup.LookupManager)1 Viewpoint (org.cristalise.kernel.persistency.outcome.Viewpoint)1 Property (org.cristalise.kernel.property.Property)1 PropertyArrayList (org.cristalise.kernel.property.PropertyArrayList)1