riftsaw SVN: r904 - in trunk/console/bpel2svg/src: main/java/org/jboss/soa/bpel/bpel2svg and 12 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-08-09 12:47:54 -0400 (Mon, 09 Aug 2010)
New Revision: 904
Added:
trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToSVGImageTransformer.java
trunk/console/bpel2svg/src/test/
trunk/console/bpel2svg/src/test/java/
trunk/console/bpel2svg/src/test/java/org/
trunk/console/bpel2svg/src/test/java/org/jboss/
trunk/console/bpel2svg/src/test/java/org/jboss/soa/
trunk/console/bpel2svg/src/test/java/org/jboss/soa/bpel/
trunk/console/bpel2svg/src/test/java/org/jboss/soa/bpel/bpel2svg/
trunk/console/bpel2svg/src/test/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtilTest.java
trunk/console/bpel2svg/src/test/resources/
trunk/console/bpel2svg/src/test/resources/bpel/
trunk/console/bpel2svg/src/test/resources/bpel/Math.bpel
trunk/console/bpel2svg/src/test/resources/svg/
trunk/console/bpel2svg/src/test/resources/svg/Math-no-trace.svg
Modified:
trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtil.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ActivityInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ActivityImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SVGImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SequenceImpl.java
Log:
RIFTSAW-264 - added ability to associate line numbers with the svg model, as a way to correlate the BPEL event information to the model activities. Not ideal, but at the moment the most reliable source of information from the BPEL events. Some initial tests for the SVG output, and the activity locator mechanism. Needs more tests, and modification of the svg nodes based on state.
Modified: trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtil.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtil.java 2010-08-05 14:58:07 UTC (rev 903)
+++ trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtil.java 2010-08-09 16:47:54 UTC (rev 904)
@@ -30,20 +30,23 @@
*/
public class BPEL2SVGUtil {
- private static final String JPEG_IMAGE = "jpeg";
- private static final String PNG_IMAGE = "png";
+ //public static final String JPEG_IMAGE = "jpeg";
+ public static final String PNG_IMAGE = "png";
+ public static final String SVG_IMAGE = "svg";
+
private static java.util.Map<String, SVGImageTransformer> m_transformers=
new java.util.HashMap<String, SVGImageTransformer>();
static {
+ m_transformers.put(SVG_IMAGE, new SVGToSVGImageTransformer());
m_transformers.put(PNG_IMAGE, new SVGToPNGImageTransformer());
- m_transformers.put(JPEG_IMAGE, new SVGToJPEGImageTransformer());
+ //m_transformers.put(JPEG_IMAGE, new SVGToJPEGImageTransformer());
}
public static void main(String[] args) {
if (args.length < 2 || args.length > 3) {
System.err.println("Usage: BPEL2SVGUtil <bpelFile> <outputFile> [ <transformType> ]");
- System.err.println("(transformerType values are: "+PNG_IMAGE+","+JPEG_IMAGE+")");
+ System.err.println("(transformerType values are: "+PNG_IMAGE+","+SVG_IMAGE+")");
System.exit(1);
}
@@ -54,7 +57,7 @@
if (transformer == null) {
System.err.println("Unknown transformerType '"+args[2]+
- "', valid values are: "+PNG_IMAGE+","+JPEG_IMAGE);
+ "', valid values are: "+PNG_IMAGE+","+SVG_IMAGE);
System.exit(1);
}
}
@@ -87,7 +90,27 @@
*/
public static void generate(java.io.InputStream is, java.io.OutputStream os,
SVGImageTransformer transformer) throws java.io.IOException {
-
+ SVGImpl svg = generateSVGImpl(is);
+
+ if (transformer == null) {
+ String str=svg.getHeaders()+svg.generateSVGString();
+ os.write(str.getBytes());
+ } else {
+ transformer.transform(svg, os);
+ }
+ }
+
+ /**
+ * This method generates a SVG representation of a supplied BPEL description.
+ *
+ * @param is The textual representation of a BPEL description
+ * @throws java.io.IOException Failed to generate the representation
+ */
+ public static SVGInterface generate(java.io.InputStream is) throws java.io.IOException {
+ return(generateSVGImpl(is));
+ }
+
+ protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
byte[] b=new byte[is.available()];
is.read(b);
@@ -103,12 +126,7 @@
SVGImpl svg = new SVGImpl();
svg.setRootActivity(bpel.getRootActivity());
- if (transformer == null) {
- String str=svg.getHeaders()+svg.generateSVGString();
- os.write(str.getBytes());
- } else {
- transformer.transform(svg, os);
- }
+ return(svg);
}
/**
Added: trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToSVGImageTransformer.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToSVGImageTransformer.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToSVGImageTransformer.java 2010-08-09 16:47:54 UTC (rev 904)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Portions licensed by WSO2, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.jboss.soa.bpel.bpel2svg;
+
+import java.io.IOException;
+
+/**
+ * This class represents the transformer from the SVG document object model
+ * to an output stream representing the image to be displayed.
+ *
+ */
+public class SVGToSVGImageTransformer implements SVGImageTransformer {
+
+ /**
+ * This method transforms a supplied SVG document into an image written
+ * to the supplied output stream.
+ *
+ * @param svg The SVG document
+ * @param os The output stream
+ * @throws IOException Failed to transform the SVG doc into an image
+ */
+ public void transform(org.wso2.carbon.bpel.ui.bpel2svg.SVGInterface svg,
+ java.io.OutputStream os) throws IOException {
+ String str=svg.getHeaders()+svg.generateSVGString();
+ os.write(str.getBytes());
+ }
+
+}
Modified: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ActivityInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ActivityInterface.java 2010-08-05 14:58:07 UTC (rev 903)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ActivityInterface.java 2010-08-09 16:47:54 UTC (rev 904)
@@ -28,6 +28,12 @@
public List<ActivityInterface> getSubActivities();
+ public int getStartLineNumber();
+
+ public int getEndLineNumber();
+
+ public ActivityInterface getActivityAtLineNumber(int lineNumber);
+
public SVGDimension getDimensions() ;
public void switchDimensionsToHorizontal();
Modified: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java 2010-08-05 14:58:07 UTC (rev 903)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java 2010-08-09 16:47:54 UTC (rev 904)
@@ -2,15 +2,14 @@
// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
package org.wso2.carbon.bpel.ui.bpel2svg;
-import java.io.File;
-import java.io.OutputStream;
-
public interface SVGInterface {
public org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface getRootActivity();
public void setRootActivity(org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface rootActivity);
+ public ActivityInterface getActivityAtLineNumber(int lineNumber);
+
public String generateSVGString();
public String toPNGBase64String();
Modified: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ActivityImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ActivityImpl.java 2010-08-05 14:58:07 UTC (rev 903)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ActivityImpl.java 2010-08-09 16:47:54 UTC (rev 904)
@@ -27,7 +27,9 @@
new ArrayList<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface>();
protected List<org.wso2.carbon.bpel.ui.bpel2svg.BPELAttributeValuePair> attributes =
new ArrayList<org.wso2.carbon.bpel.ui.bpel2svg.BPELAttributeValuePair>();
-
+
+ protected int startLineNumber=-1;
+
public List<BPELAttributeValuePair> getAttributes() {
return attributes;
}
@@ -134,13 +136,63 @@
}
}
}
+
+ // Record source line number
+ startLineNumber = omElement.getLineNumber();
}
// Properties
public String getDisplayName() {
return displayName;
}
+
+ public int getStartLineNumber() {
+ return(startLineNumber);
+ }
+
+ public int getEndLineNumber() {
+ int ret=-1;
+
+ ActivityInterface parent=getParent();
+
+ if (parent != null) {
+ int index=parent.getSubActivities().indexOf(this);
+
+ if (index != -1) {
+ if (index < (parent.getSubActivities().size()-1)) {
+ ActivityInterface other=parent.getSubActivities().get(index+1);
+
+ ret = other.getStartLineNumber()-1;
+ } else {
+ ret = parent.getEndLineNumber();
+ }
+ }
+ }
+
+ return(ret);
+ }
+ public ActivityInterface getActivityAtLineNumber(int lineNumber) {
+ ActivityInterface ret=null;
+
+ int endline=getEndLineNumber();
+
+ if (getStartLineNumber() <= lineNumber && (endline == -1 || endline >= lineNumber)) {
+
+ java.util.Iterator<ActivityInterface> iter=subActivities.iterator();
+
+ while (ret == null && iter.hasNext()) {
+ ret = iter.next().getActivityAtLineNumber(lineNumber);
+ }
+
+ if (ret == null) {
+ ret = this;
+ }
+ }
+
+ return(ret);
+ }
+
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
Modified: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SVGImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SVGImpl.java 2010-08-05 14:58:07 UTC (rev 903)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SVGImpl.java 2010-08-09 16:47:54 UTC (rev 904)
@@ -2,6 +2,7 @@
// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
import org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface;
import java.io.*;
@@ -32,6 +33,16 @@
public void setRootActivity(org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface rootActivity) {
this.rootActivity = rootActivity;
}
+
+ public ActivityInterface getActivityAtLineNumber(int lineNumber) {
+ ActivityInterface ret=null;
+
+ if (this.rootActivity != null) {
+ ret = this.rootActivity.getActivityAtLineNumber(lineNumber);
+
+ }
+ return(ret);
+ }
/*
* Return the image as a SVG string
Modified: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SequenceImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SequenceImpl.java 2010-08-05 14:58:07 UTC (rev 903)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SequenceImpl.java 2010-08-09 16:47:54 UTC (rev 904)
@@ -19,7 +19,7 @@
public SequenceImpl(String token) {
super(token);
if (name == null) {
- name = "SEQUENCE" + System.currentTimeMillis();
+ name = "SEQUENCE"; //+ System.currentTimeMillis();
displayName = null;
}
// Set Icon and Size
@@ -30,7 +30,7 @@
public SequenceImpl(OMElement omElement) {
super(omElement);
if (name == null) {
- name = "SEQUENCE" + System.currentTimeMillis();
+ name = "SEQUENCE"; //+ System.currentTimeMillis();
displayName = null;
}
// Set Icon and Size
@@ -42,7 +42,7 @@
super(omElement);
setParent(parent);
if (name == null) {
- name = "SEQUENCE" + System.currentTimeMillis();
+ name = "SEQUENCE"; //+ System.currentTimeMillis();
displayName = name;
}
// Set Icon and Size
Added: trunk/console/bpel2svg/src/test/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtilTest.java
===================================================================
--- trunk/console/bpel2svg/src/test/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtilTest.java (rev 0)
+++ trunk/console/bpel2svg/src/test/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtilTest.java 2010-08-09 16:47:54 UTC (rev 904)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.soa.bpel.bpel2svg;
+
+import static org.junit.Assert.*;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ReceiveInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.SequenceInterface;
+
+public class BPEL2SVGUtilTest {
+
+ @org.junit.Test
+ public void testGenerateMathNoTrace() {
+
+ java.io.InputStream is=ClassLoader.getSystemResourceAsStream("bpel/Math.bpel");
+
+ if (is == null) {
+ fail("BPEL process not found");
+ }
+
+ SVGInterface svg=null;
+
+ try {
+ svg = BPEL2SVGUtil.generate(is);
+
+ if (svg == null) {
+ fail("Failed to get SVGInterface");
+ }
+ } catch(Exception e) {
+ fail("Failed: "+e);
+ }
+
+ // Serialize
+ SVGImageTransformer transformer=BPEL2SVGUtil.getTransformer(BPEL2SVGUtil.SVG_IMAGE);
+ String svgxml=null;
+
+ try {
+ java.io.ByteArrayOutputStream os=new java.io.ByteArrayOutputStream();
+ transformer.transform(svg, os);
+
+ os.close();
+
+ svgxml = new String(os.toByteArray());
+
+ } catch(Exception e) {
+ fail("Failed to generate SVG XML doc: "+e);
+ }
+
+ // Compare to saved svg image
+ try {
+ java.io.InputStream svgfile=ClassLoader.getSystemResourceAsStream("svg/Math-no-trace.svg");
+ byte[] b=new byte[svgfile.available()];
+
+ svgfile.read(b);
+
+ svgfile.close();
+
+ String savedsvg=new String(b);
+
+ if (savedsvg.equals(svgxml) == false) {
+ showDiffs(savedsvg, svgxml);
+
+ fail("SVG images did not match");
+ }
+ } catch(Exception e) {
+ fail("Compare failed: "+e);
+ }
+
+ }
+
+ @org.junit.Test
+ public void testMathGetLineNum53Seq() {
+ checkActivityAtLine("bpel/Math.bpel", 53, SequenceInterface.class);
+ }
+
+ @org.junit.Test
+ public void testMathGetLineNum61PickReceive() {
+ checkActivityAtLine("bpel/Math.bpel", 61, ReceiveInterface.class);
+ }
+
+ public void checkActivityAtLine(String filename, int lineNo, Class<?> type) {
+ java.io.InputStream is=ClassLoader.getSystemResourceAsStream(filename);
+
+ if (is == null) {
+ fail("BPEL process '"+filename+"' not found");
+ }
+
+ SVGInterface svg=null;
+
+ try {
+ svg = BPEL2SVGUtil.generate(is);
+
+ if (svg == null) {
+ fail("Failed to get SVGInterface");
+ }
+ } catch(Exception e) {
+ fail("Failed: "+e);
+ }
+
+ ActivityInterface act=svg.getActivityAtLineNumber(lineNo);
+
+ if (act == null) {
+ fail("Failed to get '"+type.getName()+"' at line "+lineNo);
+ }
+
+ if (type.isAssignableFrom(act.getClass()) == false) {
+ fail("Returned activity is not a '"+type.getName()+"'");
+ }
+ }
+
+ protected void showDiffs(String savedsvg, String svgxml) {
+ System.err.println("svgxml len="+svgxml.length()+", saved len="+savedsvg.length());
+
+ int mismatch=0;
+ for (int i=0; i < svgxml.length(); i++) {
+ if (savedsvg.charAt(i) != svgxml.charAt(i)) {
+ System.out.println("Mismatch at "+i+" ("+savedsvg.charAt(i)+" != "+svgxml.charAt(i)+")");
+ System.out.println(" "+savedsvg.substring(i-20, i+20)+" : "+svgxml.substring(i-20, i+20));
+ if (mismatch++ > 10) {
+ break;
+ }
+ }
+ }
+ }
+}
Added: trunk/console/bpel2svg/src/test/resources/bpel/Math.bpel
===================================================================
--- trunk/console/bpel2svg/src/test/resources/bpel/Math.bpel (rev 0)
+++ trunk/console/bpel2svg/src/test/resources/bpel/Math.bpel 2010-08-09 16:47:54 UTC (rev 904)
@@ -0,0 +1,255 @@
+<!-- Math BPEL Process [Generated by the Eclipse BPEL Designer] -->
+<bpel:process name="Math"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ suppressJoinFailure="yes"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:ns1="http://www.w3.org/2001/XMLSchema">
+
+ <!-- Import the client WSDL -->
+ <bpel:import location="MathArtifacts.wsdl" namespace="http://www.jboss.org/bpel/examples"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <!-- ================================================================= -->
+ <!-- PARTNERLINKS -->
+ <!-- List of services participating in this BPEL process -->
+ <!-- ================================================================= -->
+ <bpel:partnerLinks>
+ <!-- The 'client' role represents the requester of this service. -->
+ <bpel:partnerLink name="client"
+ partnerLinkType="tns:Math"
+ myRole="MathProvider"
+ />
+ </bpel:partnerLinks>
+
+ <!-- ================================================================= -->
+ <!-- VARIABLES -->
+ <!-- List of messages and XML documents used within this BPEL process -->
+ <!-- ================================================================= -->
+ <bpel:variables>
+ <!-- Reference to the message passed as input during initiation -->
+ <bpel:variable name="ReceiveCalculateVar"
+ messageType="tns:MathRequestMessage"/>
+
+ <!--
+ Reference to the message that will be returned to the requester
+ -->
+ <bpel:variable name="ReplyCalculateVar"
+ messageType="tns:MathResponseMessage"/>
+
+ <bpel:variable name="Result" type="ns1:decimal"></bpel:variable>
+ <bpel:variable name="A" type="ns1:decimal"></bpel:variable>
+ <bpel:variable name="B" type="ns1:decimal"></bpel:variable>
+
+
+ <bpel:variable name="FaultVar" element="tns:CalculateFault"></bpel:variable>
+ </bpel:variables>
+
+ <!-- ================================================================= -->
+ <!-- ORCHESTRATION LOGIC -->
+ <!-- Set of activities coordinating the flow of messages across the -->
+ <!-- services integrated within this business process -->
+ <!-- ================================================================= -->
+ <bpel:sequence name="main">
+
+ <!-- Receive input from requester.
+ Note: This maps to operation defined in Math.wsdl
+ -->
+ <bpel:receive name="ReceiveCalculate" partnerLink="client"
+ portType="tns:Math"
+ operation="calculate" variable="ReceiveCalculateVar"
+ createInstance="yes"/>
+
+ <!-- Generate reply to synchronous request -->
+ <bpel:assign validate="no" name="AssignInitialize">
+ <bpel:copy>
+ <bpel:from><bpel:literal><tns:calculateFault xmlns:tns="http://www.jboss.org/bpel/examples" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:calculateFault></tns:calculateFault>
+</tns:calculateFault>
+</bpel:literal></bpel:from>
+ <bpel:to variable="FaultVar"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from part="parameters" variable="ReceiveCalculateVar">
+ <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:a]]>
+ </bpel:query>
+ </bpel:from>
+ <bpel:to variable="A"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from part="parameters" variable="ReceiveCalculateVar">
+ <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:b]]>
+ </bpel:query>
+ </bpel:from>
+ <bpel:to variable="B"></bpel:to>
+ </bpel:copy>
+
+ </bpel:assign>
+ <bpel:if name="OperatorType">
+ <bpel:condition><![CDATA[$ReceiveCalculateVar.parameters/tns:operator = '+']]>
+ </bpel:condition>
+ <bpel:sequence name="Add">
+ <bpel:assign validate="no" name="AssignAdd">
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[$A + $B]]>
+ </bpel:from>
+ <bpel:to variable="Result"></bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:sequence>
+ <bpel:elseif>
+ <bpel:condition><![CDATA[$ReceiveCalculateVar.parameters/tns:operator = '-']]>
+ </bpel:condition>
+ <bpel:sequence name="Subtract">
+ <bpel:assign validate="no" name="AssignSubtract">
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[$A - $B]]>
+ </bpel:from>
+ <bpel:to variable="Result"></bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:sequence>
+ </bpel:elseif>
+ <bpel:elseif>
+ <bpel:condition><![CDATA[$ReceiveCalculateVar.parameters/tns:operator = '*']]>
+ </bpel:condition>
+ <bpel:sequence name="Multiply">
+ <bpel:assign validate="no" name="AssignMultiply">
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[$A * $B]]>
+ </bpel:from>
+ <bpel:to variable="Result"></bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:sequence>
+ </bpel:elseif>
+ <bpel:elseif>
+ <bpel:condition><![CDATA[$ReceiveCalculateVar.parameters/tns:operator = '/']]>
+ </bpel:condition>
+ <bpel:sequence name="Divide">
+ <bpel:if name="BnotZero">
+ <bpel:condition><![CDATA[$B != 0]]>
+ </bpel:condition>
+ <bpel:assign validate="no" name="AssignDivide">
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[$A div $B]]>
+ </bpel:from>
+ <bpel:to variable="Result"></bpel:to>
+ </bpel:copy>
+
+ </bpel:assign>
+ <bpel:else>
+ <bpel:sequence>
+ <bpel:assign validate="no" name="AssignFault">
+
+ <bpel:copy>
+ <bpel:from><bpel:literal><tns:CalculateFault xmlns:tns="http://www.jboss.org/bpel/examples" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:errorText></tns:errorText>
+</tns:CalculateFault>
+</bpel:literal></bpel:from>
+ <bpel:to variable="FaultVar"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA['Division By Zero']]>
+ </bpel:from>
+ <bpel:to variable="FaultVar">
+ <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
+ <![CDATA[tns:errorText]]>
+ </bpel:query>
+ </bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+
+ <bpel:throw name="DivisionByZero" faultName="tns:CalculateFault" faultVariable="FaultVar"></bpel:throw>
+
+ </bpel:sequence>
+ </bpel:else>
+ </bpel:if>
+ </bpel:sequence>
+ </bpel:elseif>
+ <bpel:elseif>
+ <bpel:condition><![CDATA[$ReceiveCalculateVar.parameters/tns:operator = '^']]></bpel:condition>
+ <bpel:sequence name="Power">
+ <bpel:assign validate="no" name="AssignResultOne">
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal xml:space="preserve">1</bpel:literal>
+ </bpel:from>
+ <bpel:to variable="Result"></bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:while name="WhileBnotZero">
+ <bpel:condition><![CDATA[$B > 0]]></bpel:condition>
+ <bpel:assign validate="no" name="CalculatePower">
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[$B - 1]]>
+ </bpel:from>
+ <bpel:to variable="B"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[$Result * $A]]>
+ </bpel:from>
+ <bpel:to variable="Result"></bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:while>
+
+ </bpel:sequence>
+ </bpel:elseif>
+ <bpel:else>
+ <bpel:sequence name="Other">
+ <bpel:assign validate="no" name="AssignFault2">
+ <bpel:copy>
+ <bpel:from><bpel:literal><tns:CalculateFault xmlns:tns="http://www.jboss.org/bpel/examples" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:errorText></tns:errorText>
+</tns:CalculateFault>
+</bpel:literal></bpel:from>
+ <bpel:to variable="FaultVar"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA['Unknown Operator']]>
+ </bpel:from>
+ <bpel:to variable="FaultVar">
+ <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:errorText]]></bpel:query>
+ </bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:throw name="UnknownOperator" faultName="tns:CalculateFault" faultVariable="FaultVar"></bpel:throw>
+ </bpel:sequence>
+ </bpel:else>
+ </bpel:if>
+ <bpel:assign validate="no" name="AssignResult">
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal>
+ <tns:MathResponse xmlns:tns="http://www.jboss.org/bpel/examples" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:result></tns:result>
+ </tns:MathResponse>
+ </bpel:literal>
+ </bpel:from>
+ <bpel:to variable="ReplyCalculateVar" part="parameters"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from variable="Result"></bpel:from>
+ <bpel:to part="parameters" variable="ReplyCalculateVar">
+ <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]>
+ </bpel:query>
+ </bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:reply name="ReplyCalculate"
+ partnerLink="client"
+ portType="tns:Math"
+ operation="calculate"
+ variable="ReplyCalculateVar"
+ />
+ </bpel:sequence>
+</bpel:process>
\ No newline at end of file
Added: trunk/console/bpel2svg/src/test/resources/svg/Math-no-trace.svg
===================================================================
--- trunk/console/bpel2svg/src/test/resources/svg/Math-no-trace.svg (rev 0)
+++ trunk/console/bpel2svg/src/test/resources/svg/Math-no-trace.svg 2010-08-09 16:47:54 UTC (rev 904)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
+
+<svg contentScriptType="text/ecmascript" width="828" xmlns:xlink="http://www.w3.org/1999/xlink" zoomAndPan="magnify" contentStyleType="text/css" height="1416" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" version="1.0"><defs id="defs4"><marker refY="0" preserveAspectRatio="xMidYMid meet" id="Arrow1Lend" style="overflow:visible" orient="auto" refX="0"><path d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z" id="path3166" style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" transform="matrix(-0.8,0,0,-0.8,-10,0)"/></marker><marker refY="0" preserveAspectRatio="xMidYMid meet" id="Arrow1Mend" style="overflow:visible" orient="auto" refX="0"><path d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z" id="path3193" style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" transform="matrix(-0.8,0,0,-0.8,-10,0)"/></marker><marker refY="0" preserveAspectRatio="xMidYMid meet" id="LinkArrow" style="overflow:visible" orient="auto" refX="0"><pa!
th d="M -11.5,0 L -7,-7.5 L -12.5,0 L -7,7.5 L -11.5,0 z" id="linkPath" style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" transform="matrix(-0.8,0,0,-0.8,-10,0)"/></marker><linearGradient x1="0%" xmlns:xlink="http://www.w3.org/1999/xlink" x2="0%" y1="0%" y2="100%" xlink:type="simple" xlink:actuate="onLoad" id="orange_red" xlink:show="other"><stop style="stop-color:rgb(255,255,255);stop-opacity:1" offset="0%"/><stop style="stop-color:rgb(0,0,255);stop-opacity:1" offset="100%"/></linearGradient></defs><g id="Layer-Math-Process"><rect x="10" y="10" width="808" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="1396" id="RectMath-Process"/></g><image x="398" y="25" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actu!
ate="onLoad" id="Math-Process" height="32" title="<name=Mat!
h> &l
t;targetNamespace=http://www.jboss.org/bpel/examples> <suppressJoinFailure=yes> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAfAB8DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+!
Pn6/9oADAMBAAIRAxEAPwD7z+J/xl1uz8UP4F+H3h6XX/GhiSWe5u0aLTtMjcZWWaTjdxyFXrgjORtKeBPAGnfBZdR8Z+PfG39peJtTRYL/AFzV7sW1oi53LBDGSERAc4HXrjAJFd54i1+Xwc7X91BJdaI3+vmhXdLaf7RUctH9OV9CD8vzn+2d8KfEH7QXhrwvqXgC5t/EEWmPOZ9PgukUv5gTbINzBcrsYEE5+bgda+exFb2cpzXv1Y6qG1ltdLrp117aao9GFJuMekHvLz7N9PT56n1NpWr2OvadBf6Ze2+o2M67orq0lWWKQeqspII+lW6+ev2TPAOqfs//AAemsvHeoWul3V1fyXq2k10jC1QoihNwJBYlCxCkj5vXNet+GvFreN7lrnTInTQIiVF7KpU3b9MRg8hF7scZPA6Gu6jjozVOFTSpJX5eq82uiXd+m+hjLDTtKcfgXXp/w/l+h1LKHUqwDKRggjIIr46+Ofhq08G/ES4g0qP7HbTwpcrFESBGWyCB6DKk47Zr7Gr5e/aE8J63qvj64vorHdYiCKOKXzUG7C5PG7PUkcjtXyPG2HdbLoyhDmkpKzSu0rO/y/4B9LwvV9njXGUrRcXu9Htb5nL/AAR8F2nj/wAci11PfNZ28DXUqbiPMwyqFJ64yw/KvsS2torO3jggjSGGNQiRxqFVQOgAHQV8zfsx2k+nfEDUIriPy2fTXx8wPSWP0r6epcE4enSy11eW05Sd3102QcUVpzxvs7+6krdtT//Z"/><g><g id="main"><g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opa!
city:1" id="ReceiveCalculate-AssignInitialize" d="M 414,164 L !
414,214"
/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="AssignInitialize-OperatorType" d="M 414,246 L 414,279 L 92,279 L 92,296"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="OperatorType-AssignResult" d="M 92,1120 L 92,1153 L 414,1153 L 414,1170"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="AssignResult-ReplyCalculate" d="M 414,1202 L 414,1252"/></g><g id="Layer-main"><rect x="20" y="92" width="788" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;str!
oke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="1232" id="Rectmain"/></g><a xlink:actuate="onRequest" xlink:type="simple" id="main" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="20" y="102" id="main.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="20" id="tspan-main" y="102">main</tspan></text></a><g><g title="<name=ReceiveCalculate> <partnerLink=client> <portType=tns:Math> <operation=calculate> <variable=ReceiveCalculateVar> <createInstance=yes> " id="ReceiveCalculate" onmo!
useout="this.style.opacity=0.25;this.filters.alpha.opacity=40"!
style="
opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="398" y="132" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="ReceiveCalculate" height="32" title="<name=ReceiveCalculate> <partnerLink=client> <portType=tns:Math> <operation=calculate> <variable=ReceiveCalculateVar> <createInstance=yes> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAhACEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx!
8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U6+cPA/gO2+IOjarruq3usXmpNql1GVh1SSFdqyEKABwMDjFehfFv4uReDIG03TWSbWpV5PVbZT/ABN/teg/E8Yz578IfHukeGfCktpqd99numvJptrI7EhjkHIB6152H4my/D4qrgnWjGcUm25JLf4btq71u0trfd04nIsZXoU8UqTlFtpJJt7fFZX06K+9ylrPg/QtHZlex8RsV6j+25Af5V1vwat/7C+JviDR7O7vpNKOl2l4lve3LTlJHzkgt04OOKv+P/Hk/hvw1Dq+naLJ4h8yRB5MOQVjYE7z8pOOg6fxVB8NrlL341+IblOBNolo+3IO3524447V9xOs62Gk3s13vfWOtv1Pj6VP2WJjG+t+1raM9nooor5g+nPBfjV8IZElufEejI0iuTLeWo5KnqZF9u5Hbr06eUeGtK07V9NNxe30tnJ50kYVIg4IVsZzkda+0a+AtZ1CWznurSC/t7GeC+ukkhnIVl/etgYOMV4mX8B5RmOOrYmvTvGSXu3aSk3q1Zrfqu+x35hxdmWAwlKjRnZpvWyd1bZ3T27ntXgfwnF8QNbk0+G/1Sy0qxhIuCb+WQ3IJCgKrMQikAkqMrwBiurvPBsnwe1+01zRhNrMd0g01LCebZJvY!
/J8wGGGQeCAB+OR4F8PPibqPgPWTqEeo6dOWXy5IWcBZV7g/NwcgEEelet+GvF!
118ffGRs
LyzQ6JZQ7rhLacqI92dp3dWbci8cdB23Zwx+Ar4adSm6cnVUvdlq1a8ba2tZJxvo1ffW58XhsTRrxT/5eN/ie8f2lef8AQJn/AO/sf/xVFQf8Ijpf/Puf++z/AI0V6lsR/TX/AMifQ+9/X/DGzXz78Rf+Rz1P/fH8hRRX0mW/xX6HBj/4a9Tm69g+Cn/IG1D/AK7j/wBBoor0sf8AwH8jgwX8ZHo1FFFfLn0R/9k="/><a xlink:actuate="onRequest" xlink:type="simple" id="ReceiveCalculate" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="398" y="174" id="ReceiveCalculate.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="398" id="tspan-ReceiveCalculate" y="174">ReceiveCalculate</tspan></text></a></g><g title="<validate=no> <name=AssignInitialize> " id="AssignInitialize" onmouseout="this.sty!
le.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="398" y="214" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="AssignInitialize" height="32" title="<validate=no> <name=AssignInitialize> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAA!
AAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBU!
QdhcRMiM
oEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7s8X+MfGdz8UtT8PaDq+naXZ2dlDc5vLTzSxfIIyDTPP+J/8A0N+g/wDgtP8AjXmnx98Z+GbL4x3+lzeDvEeva1DYwSzXGkaisCeWwO0FT6Vw3/CX6F/0THx3/wCDtP8AGvtKOCc6MJKCV0vswfTfV31Pja2OjCrOLm9G+s++2kbaH0J5/wAT/wDob9B/8Fp/xrI8W+KPiZ4U8N6hq7+KNEuUtIzIYY9PIZuegJNeJf8ACX6F/wBEx8d/+DtP8apaz498Kabpdzdal8NfG8dhEm6Z5daQqF9xmuiGAfMrwT8uWH/yRzzzGHK7Ta+c/wD5E7n9oj4bNqHxov8AXrX4jaJ4Xubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+Fv/AADl/wAK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="AssignInitialize" xlink:show="replace" xmlns:xlink="http://www.w3.org/!
1999/xlink"><text x="398" y="256" id="AssignInitialize.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="398" id="tspan-AssignInitialize" y="256">AssignInitialize</tspan></text></a></g><g id="OperatorType"><g id="Layer-OperatorType"><rect x="56" y="281" width="716" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="854" id="RectOperatorType"/></g><image x="76" y="296" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="si!
mple" xlink:actuate="onLoad" id="OperatorType" height="32" tit!
le="<
name=OperatorType> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAhACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U68q8PfE681P9onxV4Jku7VtO07Sba8ggUDzRIxHmZOc!
nAZOO24etY/xF+L+r+I/FE/w8+GIivPEyjGp65IN1noiE4JY9Hm64QdD16EDB1/9lPSdC8LWd74V1i5074jabM19D4puJC897cN/rBcdd0b9Mc7c98sG9zD4alTi/rb5XNWjpdrZqT7Lp3ad7W38DE4qtVmvqceZU3eTvZO104ru+vZNJXvt9F0V5P8AA744p8So7zQtctBoXjvSPk1PSHOA2OPOh/vRtkHjOMjkghj6xXlV6FTDVHTqKzX9XXdPoz18PiKeJpqrSd0/6s+zXVHyZZWep/sf6lNpt5CdR+G2p3Rlt9fjiHn2Mzn/AFd4VHzA8ASH2+i+g+JvinY6ToM+r3l7HDpsUfmtclsoVPQgjrnIxjrkYr2jVNLs9b0650/ULWK9sbmMxTW86B0kQjBVgeCK+WfDP7Mujj44XmgXupXmpeBdDiTVdO8O3T74o5pD9xyeXjTBKqfXBz8273I4/B12qmNfLPul8f8AlL8Ouj3+dq4bE4G1HCLmhLRJv4H+sfxW2vTN8B/CDxR8ffE9t8TL3UrvwFY2ybNB+yRKL6eI5zNIx6IwJwpyCCexy3stl8FfFdreQTSfFnxHcRxyK7QvFFtkAOSp46HpXriqEUKoAUDAA7UteHmFRZhVVSasoqySbsl231831Prcqq1sooSo0Wm5O8m4Qbbel7tNpaaJOyCuasP+R91T/r0i/maKK4Ku8PX9GYT3XqdLRRRXQaH/2Q=="/><a xlink:actuate="onRequest" xlink:type="simple" id="OperatorType" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="56" y="291" id="OperatorType.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:no!
rmal;font-stretch:normal;text-align:start;line-height:125%;wri!
ting-mod
e:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="56" id="tspan-OperatorType" y="291">OperatorType</tspan></text></a><g><g id="Add"><g/><g id="Layer-Add"><rect x="66" y="363" width="52" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="112" id="RectAdd"/></g><a xlink:actuate="onRequest" xlink:type="simple" id="Add" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="66" y="373" id="Add.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fil!
l:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="66" id="tspan-Add" y="373">Add</tspan></text></a><g><g title="<validate=no> <name=AssignAdd> " id="AssignAdd" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="76" y="403" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="AssignAdd" height="32" title="<validate=no> <name=AssignAdd> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgAB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/wBEx8d/+DtP8apaz498Kabpdzdal8NfG8dhEm6Z5daQqF9xmuiGAfMrwT8uWH/yRzzzGHK7Ta+c/wD5E7n9oj4bNqHxov8AXrX4jaJ4Xubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+Fv/AADl/wAK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT!
4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="AssignAdd" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="76" y="445" id="AssignAdd.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="76" id="tspan-AssignAdd" y="445">AssignAdd</tspan></text></a></g></g></g><g id=""><g id="Layer-null"><rect x="128" y="388" width="72" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;st!
roke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10!
;stroke-
dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="194" id="Rectnull"/></g><image x="148" y="403" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="" height="32" title="No Attributes defined" preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png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hlXX9QR2I7g1er5f8Ahd8Yl8Q6RqPjHQ9POkG0uTb67ojSBrSWUdZLaYfKT9PUdcjd6loP7QfhzxF4itNFtrHW0u7mQRpJLpziEEjPMgyuPfNOnjZUcRPL8elCvDddH2lHyfbdeas30U8DLHYdY7Lk6lFq97aq26kvLv8Alql6dRRRXrnlHOeNvBsHi/TkUSGz1K2bzbO9T78Mn9VPcV8u/Eb4Vt4y8U3V/da3J4L1Qwiz8UQ23yjUrRcFZIz3Y4Vc88Nj2b7Fryz4u6XZ33jHwALi2jm8/UWgl3rnfGF3bT6jI6H1PrXhYxYvL6v9o5XNQq6Rd/hkm0lda6x0aduluzXVKeDxOH+qZnBzpJpq3xRd+jutHs1fr6p4Xwx+GNtq1hprPpw0rwfp4A0zRwMef/01l9c8nnrnJyCS3t4AUAAAAcACgAKAAAAOABS11YHAxwUZNyc6k3eUnvJ935dl0+9l4nEvEOMYxUYRVoxW0V/W76hRRRXpnEFc14p/5DPhz/r7P/o!
JoorCv8HzX5ozqfD935nS0UUVuaBRRRQB/9k="/><g><g id="Subtract"><g!
/><g id=
"Layer-Subtract"><rect x="138" y="470" width="52" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="112" id="RectSubtract"/></g><a xlink:actuate="onRequest" xlink:type="simple" id="Subtract" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="138" y="480" id="Subtract.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="138" id="tspan-Subtract" y="480">Subtract</tspan></text></a><g><g title="<validate=no> <na!
me=AssignSubtract> " id="AssignSubtract" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="148" y="510" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="AssignSubtract" height="32" title="<validate=no> <name=AssignSubtract> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NX!
W19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAA!
AECAwQFB
gcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7s8X+MfGdz8UtT8PaDq+naXZ2dlDc5vLTzSxfIIyDTPP+J/8A0N+g/wDgtP8AjXmnx98Z+GbL4x3+lzeDvEeva1DYwSzXGkaisCeWwO0FT6Vw3/CX6F/0THx3/wCDtP8AGvtKOCc6MJKCV0vswfTfV31Pja2OjCrOLm9G+s++2kbaH0J5/wAT/wDob9B/8Fp/xrI8W+KPiZ4U8N6hq7+KNEuUtIzIYY9PIZuegJNeJf8ACX6F/wBEx8d/+DtP8apaz498Kabpdzdal8NfG8dhEm6Z5daQqF9xmuiGAfMrwT8uWH/yRzzzGHK7Ta+c/wD5E7n9oj4bNqHxov8AXrX4jaJ4Xubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+Fv/AADl/wAK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="AssignSubt!
ract" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="148" y="552" id="AssignSubtract.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="148" id="tspan-AssignSubtract" y="552">AssignSubtract</tspan></text></a></g></g></g></g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 164,435 L 164,542"/></g><g id=""><g id="Layer-null"><rect x="220" y="388" width="72" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:sq!
uare;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharr!
ay:none;
bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="194" id="Rectnull"/></g><image x="240" y="403" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="" height="32" title="No Attributes defined" preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAhACEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhc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fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="112" id="RectMultiply"/></g><a xlink:actuate="onRequest" xlink:type="simple" id="Multiply" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="230" y="480" id="Multiply.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="230" id="tspan-Multiply" y="480">Multiply</tspan></text></a><g><g title="<validate=no> <name=AssignMultip!
ly> " id="AssignMultiply" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="240" y="510" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="AssignMultiply" height="32" title="<validate=no> <name=AssignMultiply> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0Kx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4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="AssignMultiply" xlink:sho!
w="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="240" y="552" id="AssignMultiply.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="240" id="tspan-AssignMultiply" y="552">AssignMultiply</tspan></text></a></g></g></g></g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 256,435 L 256,542"/></g><g id=""><g id="Layer-null"><rect x="312" y="388" width="184" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-li!
nejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbb!
bstroke-
opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="508" id="Rectnull"/></g><image x="388" y="403" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="" height="32" title="No Attributes defined" preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB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TkUSGz1K2bzbO9T78Mn9VPcV8u/Eb4Vt4y8U3V/da3J4L1Qwiz8UQ23yjUrRcFZIz3Y4Vc88Nj2b7Fryz4u6XZ33jHwALi2jm8/UWgl3rnfGF3bT6jI6H1PrXhYxYvL6v9o5XNQq6Rd/hkm0lda6x0aduluzXVKeDxOH+qZnBzpJpq3xRd+jutHs1fr6p4Xwx+GNtq1hprPpw0rwfp4A0zRwMef/01l9c8nnrnJyCS3t4AUAAAAcACgAKAAAAOABS11YHAxwUZNyc6k3eUnvJ935dl0+9l4nEvEOMYxUYRVoxW0V/W76hRRRXpnEFc14p/5DPhz/r7P/oJoorCv8HzX5ozqfD935nS0UUVuaBR!
RRQB/9k="/><g><g id="Divide"><g/><g id="Layer-Divide"><rect x=!
"322" y=
"470" width="164" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="426" id="RectDivide"/></g><a xlink:actuate="onRequest" xlink:type="simple" id="Divide" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="322" y="480" id="Divide.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="322" id="tspan-Divide" y="480">Divide</tspan></text></a><g><g id="BnotZero"><g id="Layer-BnotZero"><rect x="332" y="495" width="144" styl!
e="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="376" id="RectBnotZero"/></g><image x="342" y="510" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="BnotZero" height="32" title="<name=BnotZero> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAhACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipK!
TlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4!
+Tl5ufo6
erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U68q8PfE681P9onxV4Jku7VtO07Sba8ggUDzRIxHmZOcnAZOO24etY/xF+L+r+I/FE/w8+GIivPEyjGp65IN1noiE4JY9Hm64QdD16EDB1/9lPSdC8LWd74V1i5074jabM19D4puJC897cN/rBcdd0b9Mc7c98sG9zD4alTi/rb5XNWjpdrZqT7Lp3ad7W38DE4qtVmvqceZU3eTvZO104ru+vZNJXvt9F0V5P8AA744p8So7zQtctBoXjvSPk1PSHOA2OPOh/vRtkHjOMjkghj6xXlV6FTDVHTqKzX9XXdPoz18PiKeJpqrSd0/6s+zXVHyZZWep/sf6lNpt5CdR+G2p3Rlt9fjiHn2Mzn/AFd4VHzA8ASH2+i+g+JvinY6ToM+r3l7HDpsUfmtclsoVPQgjrnIxjrkYr2jVNLs9b0650/ULWK9sbmMxTW86B0kQjBVgeCK+WfDP7Mujj44XmgXupXmpeBdDiTVdO8O3T74o5pD9xyeXjTBKqfXBz8273I4/B12qmNfLPul8f8AlL8Ouj3+dq4bE4G1HCLmhLRJv4H+sfxW2vTN8B/CDxR8ffE9t8TL3UrvwFY2ybNB+yRKL6eI5zNIx6IwJwpyCCexy3stl8FfFdreQTSfFnxHcRxyK7QvFFtkAOSp46HpXriqEU!
KoAUDAA7UteHmFRZhVVSasoqySbsl231831Prcqq1sooSo0Wm5O8m4Qbbel7tNpaaJOyCuasP+R91T/r0i/maKK4Ku8PX9GYT3XqdLRRRXQaH/2Q=="/><a xlink:actuate="onRequest" xlink:type="simple" id="BnotZero" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="332" y="505" id="BnotZero.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="332" id="tspan-BnotZero" y="505">BnotZero</tspan></text></a><g><g title="<validate=no> <name=AssignDivide> " id="AssignDivide" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="342" y="592" w!
idth="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:typ!
e="simpl
e" xlink:actuate="onLoad" id="AssignDivide" height="32" title="<validate=no> <name=AssignDivide> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4!
uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7s8X+MfGdz8UtT8PaDq+naXZ2dlDc5vLTzSxfIIyDTPP+J/8A0N+g/wDgtP8AjXmnx98Z+GbL4x3+lzeDvEeva1DYwSzXGkaisCeWwO0FT6Vw3/CX6F/0THx3/wCDtP8AGvtKOCc6MJKCV0vswfTfV31Pja2OjCrOLm9G+s++2kbaH0J5/wAT/wDob9B/8Fp/xrI8W+KPiZ4U8N6hq7+KNEuUtIzIYY9PIZuegJNeJf8ACX6F/wBEx8d/+DtP8apaz498Kabpdzdal8NfG8dhEm6Z5daQqF9xmuiGAfMrwT8uWH/yRzzzGHK7Ta+c/wD5E7n9oj4bNqHxov8AXrX4jaJ4Xubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+Fv/AADl/wAK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="AssignDivide" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="342" y="634" id="AssignDivide.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:star!
t;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#!
000000;f
ill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="342" id="tspan-AssignDivide" y="634">AssignDivide</tspan></text></a></g><g id="SEQUENCE"><g/><g id="Layer-SEQUENCE"><rect x="384" y="602" width="72" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="244" id="RectSEQUENCE"/></g><a xlink:actuate="onRequest" xlink:type="simple" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"/><g><g id="SEQUENCE"><g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="AssignFa!
ult-DivisionByZero" d="M 420,699 L 420,749"/></g><g id="Layer-SEQUENCE"><rect x="394" y="627" width="52" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="194" id="RectSEQUENCE"/></g><a xlink:actuate="onRequest" xlink:type="simple" id="SEQUENCE" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="394" y="637" id="SEQUENCE.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="394" id="tspan-SEQUENCE" y="637">SEQUENCE</!
tspan></text></a><g><g title="<validate=no> <name=Ass!
ignFault
> " id="AssignFault" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="404" y="667" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="AssignFault" height="32" title="<validate=no> <name=AssignFault> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09f!
b3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7s8X+MfGdz8UtT8PaDq+naXZ2dlDc5vLTzSxfIIyDTPP+J/8A0N+g/wDgtP8AjXmnx98Z+GbL4x3+lzeDvEeva1DYwSzXGkaisCeWwO0FT6Vw3/CX6F/0THx3/wCDtP8AGvtKOCc6MJKCV0vswfTfV31Pja2OjCrOLm9G+s++2kbaH0J5/wAT/wDob9B/8Fp/xrI8W+KPiZ4U8N6hq7+KNEuUtIzIYY9PIZuegJNeJf8ACX6F/wBEx8d/+DtP8apaz498Kabpdzdal8NfG8dhEm6Z5daQqF9xmuiGAfMrwT8uWH/yRzzzGHK7Ta+c/wD5E7n9oj4bNqHxov8AXrX4jaJ4Xubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+Fv/AADl/wAK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="o!
nRequest" xlink:type="simple" id="AssignFault" xlink:show="rep!
lace" xm
lns:xlink="http://www.w3.org/1999/xlink"><text x="404" y="709" id="AssignFault.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="404" id="tspan-AssignFault" y="709">AssignFault</tspan></text></a></g><g title="<name=DivisionByZero> <faultName=tns:CalculateFault> <faultVariable=FaultVar> " id="DivisionByZero" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="404" y="749" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="DivisionByZero" height="32" title="<nam!
e=DivisionByZero> <faultName=tns:CalculateFault> <faultVariable=FaultVar> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3!
+Pn6/9oADAMBAAIRAxEAPwD9SdTv10ywnumUusS7io6muL8X/FiPwfpkNzdaTc!
me6YRWds
HG+5lP3UUDJPUdAcVq/EvxJpvhfwffXWp3BhidfLjRF3SSyH7qIuRljj+ZPANeQ+DLhdV1eDxh4l1u0g1wReVZ2Tp5qafF6LyBvI6nr71w1qipVOetU5YW01gm3r/M07d2vzOmnF1IctKHNO/aTSX/AG6t/L9DuvA/xin8STT6Rf6JLZ+J7ID7Zp6uAR/toG5KnI9cZHJyCeruPFVzaQPNNot1HEgyzFlwBXknjy10/wASXlprVl4ntLPxLp2Ws76KExsf+mbkE5Q+hBxk8ckHT8G/FVfHGh3Fnr2qwaHqseYrm0kttysP78bhsMp/T6YJ48RioOm6tCt8nKlo/wDwK9vy2OihQmpqlWpfO1TVfdv+ZsfHD4YXPja307WNLd31jSCzRWjtmKdGGHG08B8chuvGPQjmvCPjaHxFpQey0ETPbn7POjNGjxSLwysrYYHPqK7345XEtp8JPFE0ErwypaErJGxVlOR0Ir4wtpdFBNw2sXCXUqgyyC6cMxx3PevssJkyzOLryquLj7qsovS7l9qL6tnymNzb+zZKkqakpe89ZLXRdGux9Pa14pj0TTp76/0KO1tIF3SSvLDgD8+T7dTXG6b4J134mavF4tGjSWmlrbsmlwQtHA8u7jzJSxViuOQMY5HbO7xW5Og3iBLjV550ByFkuXYA+vNJqes20OnTtZ+IL9rhV/dqL2Q8/TNd8uF3KlKksRK8k03yw2as7e5v5nnQ4liqsajoL3Wmvenutr+9t5H/2Q=="/><a xlink:actuate="onRequest" xlink:type="simple" id="DivisionByZero" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="404" y="791" id="DivisionByZero.Text" style="font-size:12px;font-style:normal;font!
-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="404" id="tspan-DivisionByZero" y="791">DivisionByZero</tspan></text></a></g></g></g></g></g></g><image x="347" y="834" width="22" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="DivisionByZero" height="22" title="<name=BnotZero> " preserveAspectRatio="xMidYMid meet" xlink:show="embed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V5P8AA744p8So7zQtctBoXjvSPk1PSHOA2OPOh/vRtkHjOMjkghj6xXlV6FTDVHTqKzX9XXdPoz18PiKeJpqrSd0/6s+zXVHyZZWep/sf6lNpt5CdR+G2p3Rlt9fjiHn2Mzn/AFd4VHzA8ASH2+i+g+JvinY6ToM+r3l7HDpsUfmtclsoVPQgjrnIxjrkYr2jVNLs9b0650/ULWK9sbmMxTW86B0kQjBVgeCK+WfDP7Mujj44XmgXupXmpeBdDiTVdO8O3T74o5pD9xyeXjTBKq!
fXBz8273I4/B12qmNfLPul8f8AlL8Ouj3+dq4bE4G1HCLmhLRJv4H+sfxW2vTN8B/CDxR8ffE9t8TL3UrvwFY2ybNB+yRKL6eI5zNIx6IwJwpyCCexy3stl8FfFdreQTSfFnxHcRxyK7QvFFtkAOSp46HpXriqEUKoAUDAA7UteHmFRZhVVSasoqySbsl231831Prcqq1sooSo0Wm5O8m4Qbbel7tNpaaJOyCuasP+R91T/r0i/maKK4Ku8PX9GYT3XqdLRRRXQaH/2Q=="/><g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 358,542 L 358,592"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 358,624 L 358,834"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 374,526 L 374,620 L 420,62!
0 L 420,667"/><path style="fill:none;fill-rule:evenodd;stroke:!
#000000;
stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 420,781 L 420,816 L 358,816 L 358,834"/></g></g></g></g></g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 404,435 L 404,715 L 358,715 L 358,856"/></g><g id=""><g id="Layer-null"><rect x="516" y="388" width="144" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="430" id="Rectnull"/></g><image x="572" y="403" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="" height="32" title="No Attributes defined" !
preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAhACEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAA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fD935nS0UUVuaBRRRQB/9k="/><g><g id="Power"><g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="AssignResultOne-WhileBnotZero-ForEach" d="M 588,542 L 588,592"/></g><g id="Layer-Power"><rect x="526!
" y="470" width="124" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="348" id="RectPower"/></g><a xlink:actuate="onRequest" xlink:type="simple" id="Power" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="526" y="480" id="Power.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="526" id="tspan-Power" y="480">Power</tspan></text></a><g><g title="<validate=no> <name=AssignResultOne> " id="AssignResultO!
ne" onmouseout="this.style.opacity=0.25;this.filters.alpha.opa!
city=40"
style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="572" y="510" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="AssignResultOne" height="32" title="<validate=no> <name=AssignResultOne> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFR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ubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+Fv/AADl/wAK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="AssignResultOne" xlink:show="replace" xmlns:xlin!
k="http://www.w3.org/1999/xlink"><text x="572" y="552" id="Ass!
ignResul
tOne.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="572" id="tspan-AssignResultOne" y="552">AssignResultOne</tspan></text></a></g><g id="WhileBnotZero-ForEach"><g id="Layer-WhileBnotZero-ForEach"><rect x="562" y="577" width="52" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="216" id="RectWhileBnotZero-ForEach"/></g><image x="572" y="592" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLo!
ad" id="WhileBnotZero-ForEach" height="32" title="<name=WhileBnotZero> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgM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IXTvDWm6adTuru4WCzvbwsscaHqSv3nVRz1GB9BU/wBoywVWGGxbu2viXV9rLbyBV/YWhWd35d/Q+lKKh8qX/nsf++RRX0V/I7jxj4t2drJ8SdFOqxJPpU0cKypKMoUEjbgfzz+NeneCvBeneAtHfTNK8xbIzPMiStuKbudoPUgds8+5ql8RvA6eNtHWJGWK/tyXt5G6c9VPsePyFee6T8Tte8BIuleINLkuFhGyOR22PtHT5sEOPf8AWvlHOnlmNqVcRH3Z6qVr27p2OP3aVRymt+v6Hf8Ajb4UeGfH/wC81XT1N4Bhb23by519PmH3sdg2R7V5B8LPBf8AZPxrlEWoSaraabHOkMsygMoxtJJHBOTjPeuk1T4vaz4sQ6d4d0qWCaUbTKreZIAfTAAX6np7V2nwx8AHwZp0kt0VfU7rHmlTkRqOiA/qT6/Ssn7DM8bTqYWGkHeU7WvbZeZm4U61VSgttW/63O2ooor7E9EKy/En/IJl+ooorGt/Cl6Ey2ZD4U/5Bn/AzW1RRU4f+FH0CPwoKKKK6Cj/2Q=="/><a xlink:actuate="onRequest" xlink:type="simple" id="WhileBnotZero-ForEach" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="562" y="587" id="WhileBnotZero-ForEach.Text" style="font-size:1!
2px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="562" id="tspan-WhileBnotZero-ForEach" y="587">WhileBnotZero</tspan></text></a><g><g title="<validate=no> <name=CalculatePower> " id="CalculatePower" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="572" y="674" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="CalculatePower" height="32" title="<validate=no> <name=CalculatePower> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AA!
QSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYID!
AoMDAsKC
wsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7s8X+MfGdz8UtT8PaDq+naXZ2dlDc5vLTzSxfIIyDTPP+J/8A0N+g/wDgtP8AjXmnx98Z+GbL4x3+lzeDvEeva1DYwSzXGkaisCeWwO0FT6Vw3/CX6F/0THx3/wCDtP8AGvtKOCc6MJKCV0vswfTfV31Pja2OjCrOLm9G+s++2kbaH0J5/wAT/wDob9B/8Fp/xrI8W+KPiZ4U8N6hq7+KNEuUtIzIYY9PIZuegJNeJf!
8ACX6F/wBEx8d/+DtP8apaz498Kabpdzdal8NfG8dhEm6Z5daQqF9xmuiGAfMrwT8uWH/yRzzzGHK7Ta+c/wD5E7n9oj4bNqHxov8AXrX4jaJ4Xubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+Fv/AADl/wAK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="CalculatePower" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="572" y="716" id="CalculatePower.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="57!
2" id="tspan-CalculatePower" y="716">CalculatePower</tspan></t!
ext></a>
</g></g><image x="577" y="756" width="22" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="CalculatePower-ForEach" height="22" title="<name=WhileBnotZero> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAo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z1GB9BU/wBoywVWGGxbu2viXV9rLbyBV/YWhWd35d/Q+lKKh8qX/nsf++RRX0V/I7jxj4t2drJ8SdFOqxJPpU0cKypKMoUEjbgfzz+NeneCvBeneAtHfTNK8xbIzPMiStuKbudoPUgds8+5ql8RvA6eNtHWJGWK/tyXt5G6c9VPsePyFee6T8Tte8BIuleINLkuFhGyOR22PtHT5sEOPf8AWvlHOnlmNqVcRH3Z6qVr27p2OP3aVRymt+v6Hf8Ajb4UeGfH/wC81XT1N4Bhb23by519PmH3sdg2R7V5B8LPBf8AZPxrlEWoSaraabHOkMsygMoxtJJHBOTjPeuk1T4vaz4sQ6d4d0qWCaUbTKreZIAfTAAX6np7V2nwx8AHwZp0kt0VfU7rHmlTkRqOiA/qT6/Ssn7DM8bTqYWGkHeU7WvbZeZm4U61VSgttW/63O2ooor7E9EKy/En/IJl+ooorGt/Cl6Ey2ZD4U/5Bn/AzW1RRU4f+FH0CPwoKKKK6Cj/2Q=="/><g><path style="f!
ill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;str!
oke-line
cap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 588,624 L 588,674"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 588,706 L 588,756"/></g></g></g></g></g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 588,435 L 588,778"/></g><g id="SEQUENCE"><g/><g id="Layer-SEQUENCE"><rect x="680" y="388" width="72" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="244" id="Re!
ctSEQUENCE"/></g><a xlink:actuate="onRequest" xlink:type="simple" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"/><g><g id="Other"><g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="AssignFault2-UnknownOperator" d="M 716,485 L 716,535"/></g><g id="Layer-Other"><rect x="690" y="413" width="52" style="fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2" rx="10" ry="10" height="194" id="RectOther"/></g><a xlink:actuate="onRequest" xlink:type="simple" id="Other" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="690" y="423" id="Other.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:!
normal;font-stretch:normal;text-align:start;line-height:125%;w!
riting-m
ode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="690" id="tspan-Other" y="423">Other</tspan></text></a><g><g title="<validate=no> <name=AssignFault2> " id="AssignFault2" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="700" y="453" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="AssignFault2" height="32" title="<validate=no> <name=AssignFault2> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9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NeJf8ACX6F/wBEx8d/+DtP8apaz498Kabpdzdal8NfG8dhEm6Z5daQqF9xmuiGAfMrwT8uWH/yRzzzGHK7Ta+c/wD5!
E7n9oj4bNqHxov8AXrX4jaJ4Xubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+F!
v/AADl/w
AK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="AssignFault2" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="700" y="495" id="AssignFault2.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="700" id="tspan-AssignFault2" y="495">AssignFault2</tspan></text></a></g><g title="<name=UnknownOperator> <faultName=tns:CalculateFault> <faultVariab!
le=FaultVar> " id="UnknownOperator" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="700" y="535" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="UnknownOperator" height="32" title="<name=UnknownOperator> <faultName=tns:CalculateFault> <faultVariable=FaultVar> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQ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I9cZHJyCeruPFVzaQPNNot1HEgyzFlwBXknjy10/wASXlprVl4ntLPxLp2Ws76KExsf+mbkE5Q+hBxk8ckHT8G/FVfHGh3Fnr2qwaHqseYrm0kttysP78bhsMp/T6YJ48RioOm6tCt8nKlo/wDwK9vy2OihQmpqlWpfO1TVfdv+ZsfHD4YXPja307WNLd31jSCzRWjtmKdGGHG08B8chuvGPQjmvCPjaHxFpQey0ETPbn7POjNGjxSLwysrYYHPqK7345XEtp8JPFE0ErwypaErJGxVlOR0Ir4wtpdFBNw2sXCXUqgyyC6cMxx3PevssJkyzOLryquLj7qsovS7l9qL6tnymNzb+zZKkqakpe89ZLXRdGux9Pa14pj0TTp76/0KO1tIF3SSvLDgD8+T7dTXG6b4J134mavF4tGjSWmlrbsml!
wQtHA8u7jzJSxViuOQMY5HbO7xW5Og3iBLjV550ByFkuXYA+vNJqes20OnTtZ+IL9rhV/dqL2Q8/TNd8uF3KlKksRK8k03yw2as7e5v5nnQ4liqsajoL3Wmvenutr+9t5H/2Q=="/><a xlink:actuate="onRequest" xlink:type="simple" id="UnknownOperator" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="700" y="577" id="UnknownOperator.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="700" id="tspan-UnknownOperator" y="577">UnknownOperator</tspan></text></a></g></g></g></g></g></g><image x="81" y="1098" width="22" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="UnknownOperator" height="22" title="<name=OperatorType>!
" preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlin!
k:href="
data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgM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DVHTqKzX9XXdPoz18PiKeJpqrSd0/6s+zXVHyZZWep/sf6lNpt5CdR+G2p3Rlt9fjiHn2Mzn/AFd4VHzA8ASH2+i+g+JvinY6ToM+r3l7HDpsUfmtclsoVPQgjrnIxjrkYr2jVNLs9b0650/ULWK9sbmMxTW86B0kQjBVgeCK+WfDP7Mujj44XmgXupXmpeBdDiTVdO8O3T74o5pD9xyeXjTBKqfXBz8273I4/B12qmNfLPul8f8AlL8Ouj3+dq4bE4G1HCLmhLRJv4H+sfxW2vTN8B/CDxR8ffE9t8TL3UrvwFY2ybNB+yRKL6eI5zNIx6IwJwpyCCexy3stl8FfFdreQTSfFnxHcRxyK7QvFFtkAOSp46HpXriqEUKoAUDAA7UteHmFRZhVVSasoqySbsl231831Prcqq1sooSo0Wm5O8m4Qbbel7tNpaaJOyCuasP+R91T/r0i/maKK4Ku8PX9GYT3XqdLRRRXQaH/2Q=="/><g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 92,328 L 92,403"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linej!
oin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stro!
ke-dasha
rray:none;stroke-opacity:1" id="" d="M 92,435 L 92,1098"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 108,312 L 108,383 L 148,383 L 148,419"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="" d="M 164,542 L 164,912 L 92,912 L 92,1098"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="AssignSubtract-AssignMultiply" d="M 180,419 L 240,419"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:!
4;stroke-dasharray:none;stroke-opacity:1" id="AssignSubtract-AssignMultiply" d="M 256,542 L 256,912 L 92,912 L 92,1098"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="AssignMultiply-DivisionByZero" d="M 272,419 L 388,419"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="AssignMultiply-DivisionByZero" d="M 358,856 L 358,1017 L 92,1017 L 92,1098"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="DivisionByZero-CalculatePower-ForEach" d="M 420,419 L 572,419"/><path style="fill:none;fill-rule:evenodd;stroke:#!
000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:ro!
und;mark
er-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="DivisionByZero-CalculatePower-ForEach" d="M 588,778 L 588,991 L 92,991 L 92,1098"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="CalculatePower-ForEach-UnknownOperator" d="M 604,419 L 604,441 L 716,441 L 716,453"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="CalculatePower-ForEach-UnknownOperator" d="M 716,567 L 716,921 L 92,921 L 92,1098"/></g></g><g title="<validate=no> <name=AssignResult> " id="AssignResult" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=1!
00"><image x="398" y="1170" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="AssignResult" height="32" title="<validate=no> <name=AssignResult> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVV!
ldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKm!
qsrO0tba
3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7s8X+MfGdz8UtT8PaDq+naXZ2dlDc5vLTzSxfIIyDTPP+J/8A0N+g/wDgtP8AjXmnx98Z+GbL4x3+lzeDvEeva1DYwSzXGkaisCeWwO0FT6Vw3/CX6F/0THx3/wCDtP8AGvtKOCc6MJKCV0vswfTfV31Pja2OjCrOLm9G+s++2kbaH0J5/wAT/wDob9B/8Fp/xrI8W+KPiZ4U8N6hq7+KNEuUtIzIYY9PIZuegJNeJf8ACX6F/wBEx8d/+DtP8apaz498Kabpdzdal8NfG8dhEm6Z5daQqF9xmuiGAfMrwT8uWH/yRzzzGHK7Ta+c/wD5E7n9oj4bNqHxov8AXrX4jaJ4Xubmwt7eSy1CCR5Nqg4PHGDXn/8Awr/VP+i1+Fv/AADl/wAK+lPGHhXxNb/FnVddsvCK+ItNurGC3R2ubZNrrnPEjA/pSeT4q/6JXH/4F2H/AMXWdDHyp0acFNOyXWn221V9PM1rZfCpWnNxau3/AD999HbU+bP+Ff6p/wBFr8Lf+Acv+FU9Y+FN3rumXGn3nxp8LvbXC7JFFpKMj8q+n/J8Vf8ARK4//Auw/wDi6xvGXhzxj4l8L6lpdv8ADNLOe6iMaTi8sRsORzw+a6YZjPmV5xXnenp+BzTyynyv3ZPytU/zP//Z"/><a xlink:actuate="onRequest" xlink:type="simple" id="AssignResult" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="398" y="1212" id="AssignResult.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-!
stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="398" id="tspan-AssignResult" y="1212">AssignResult</tspan></text></a></g><g title="<name=ReplyCalculate> <partnerLink=client> <portType=tns:Math> <operation=calculate> <variable=ReplyCalculateVar> " id="ReplyCalculate" onmouseout="this.style.opacity=0.25;this.filters.alpha.opacity=40" style="opacity:0.251" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"><image x="398" y="1252" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="ReplyCalculate" height="32" title="<name=ReplyCalculate> <partnerLink=client> <portType=tns:Math> <operation=calculate> <variable=R!
eplyCalculateVar> " preserveAspectRatio="xMidYMid meet" xli!
nk:show=
"embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U6QkKCScAckmvKvjD8XX8MLLoPh7bdeJJIi7uMFLGPGfMftux0U+xPYHl9O+KuiX/wAEV06fX45vEE1k0ckUjN5zyFjuBz1J5+teDic5w2HlVpppypx!
cnrbbp6sihUhWxMMNe3M0r+baXzep7f8A29pn/QRtP+/6/wCNOXW9Odgq6hasxOABMpJP515npnws0e4020lbTIWZ4UYkg8kgVm+NvhvpWk+FNTvIdPiilhhLK6g5ByK+bnn+aU6TrSwsbJX+J7Wv/KfTwy/BTqKkqsrt2+Fen8xyvxD8Jy/CfX9Q1VY2vPD2ryNI1zJl5Lac5OyRupRjnBP4+p5u48JeJfEXgu38QnRNMs9JwLrzo5R5uwEjge/8q+rNZ0ez8QaVdabqEC3NldRmKWJujKfccg+hHIPIqh4c8JWfh3wpbeHwPtdhBE0AE6g70JPDDoeDg+tVi+EcNicRVqx0U4u2u0v8j5bDxlQxEJX9yLvbTunb0PArX4lReAfHdh4glvHk0DU7eGx1WIuZBbOi4imVeSAOQQPU9SRWbJ44k8aTeKfE91cSQxahb/YNMsDIQI7VWyGZc4LMefbnHBr32b4S+D7iNo5fD1lJG3VXQkH8M0+L4VeEYNgTQLNQmNq7OBjtjpXmTyDPqmE+qSxELXb+11Vu3q/V3Pvo5vlkantVSlzWS6bJ37+iv2Vj/9k="/><a xlink:actuate="onRequest" xlink:type="simple" id="ReplyCalculate" xlink:show="replace" xmlns:xlink="http://www.w3.org/1999/xlink"><text x="398" y="1294" id="ReplyCalculate.Text" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-wi!
dth:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opaci!
ty:1;fon
t-family:Arial Narrow;-inkscape-font-specification:Arial Narrow" xml:space="preserve"><tspan x="398" id="tspan-ReplyCalculate" y="1294">ReplyCalculate</tspan></text></a></g></g></g></g><image x="398" y="1359" width="32" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" id="ReplyCalculate-Process" height="32" title="<name=Math> <targetNamespace=http://www.jboss.org/bpel/examples> <suppressJoinFailure=yes> " preserveAspectRatio="xMidYMid meet" xlink:show="embed" xlink:href="data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAfAB8DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJ!
ipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7z+J/xl1uz8UP4F+H3h6XX/GhiSWe5u0aLTtMjcZWWaTjdxyFXrgjORtKeBPAGnfBZdR8Z+PfG39peJtTRYL/AFzV7sW1oi53LBDGSERAc4HXrjAJFd54i1+Xwc7X91BJdaI3+vmhXdLaf7RUctH9OV9CD8vzn+2d8KfEH7QXhrwvqXgC5t/EEWmPOZ9PgukUv5gTbINzBcrsYEE5+bgda+exFb2cpzXv1Y6qG1ltdLrp117aao9GFJuMekHvLz7N9PT56n1NpWr2OvadBf6Ze2+o2M67orq0lWWKQeqspII+lW6+ev2TPAOqfs//AAemsvHeoWul3V1fyXq2k10jC1QoihNwJBYlCxCkj5vXNet+GvFreN7lrnTInTQIiVF7KpU3b9MRg8hF7scZPA6Gu6jjozVOFTSpJX5eq82uiXd+m+hjLDTtKcfgXXp/w/l+h1LKHUqwDKRggjIIr46+Ofhq08G/ES4g0qP7HbTwpcrFESBGWyCB6DKk47Zr7Gr5e/aE8J63qvj64vorHdYiCKOKXzUG7C5PG7PUkcjtXyPG2HdbLoyhDmkpKzSu0rO/y/4B9LwvV9njXGUr!
RcXu9Htb5nL/AAR8F2nj/wAci11PfNZ28DXUqbiPMwyqFJ64yw/KvsS2torO3j!
ggjSGGNQ
iRxqFVQOgAHQV8zfsx2k+nfEDUIriPy2fTXx8wPSWP0r6epcE4enSy11eW05Sd3102QcUVpzxvs7+6krdtT//Z"/><g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="ReplyCalculate" d="M 414,57 L 414,132"/><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="ReplyCalculate" d="M 414,1284 L 414,1359"/></g><g/></svg>
\ No newline at end of file
14 years, 4 months
riftsaw SVN: r903 - in trunk: console and 7 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-08-05 10:58:07 -0400 (Thu, 05 Aug 2010)
New Revision: 903
Added:
trunk/console/bpel2svg/src/main/java/org/jboss/
trunk/console/bpel2svg/src/main/java/org/jboss/soa/
trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/
trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/
trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtil.java
trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGImageTransformer.java
trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToJPEGImageTransformer.java
trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToPNGImageTransformer.java
Modified:
trunk/console/bpel2svg/
trunk/console/bpel2svg/pom.xml
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java
trunk/console/pom.xml
trunk/pom.xml
Log:
RIFTSAW-92 - further work to integrate the BPEL to SVG generation.
Property changes on: trunk/console/bpel2svg
___________________________________________________________________
Name: svn:ignore
- target
+ target
.classpath
.project
.settings
Modified: trunk/console/bpel2svg/pom.xml
===================================================================
--- trunk/console/bpel2svg/pom.xml 2010-08-04 15:48:21 UTC (rev 902)
+++ trunk/console/bpel2svg/pom.xml 2010-08-05 14:58:07 UTC (rev 903)
@@ -36,6 +36,11 @@
</dependency>
<dependency>
<groupId>batik</groupId>
+ <artifactId>batik-svggen</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
<artifactId>batik-util</artifactId>
<version>${batik.version}</version>
</dependency>
@@ -85,10 +90,25 @@
<version>${batik.version}</version>
</dependency>
<dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-anim</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-codec</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom</artifactId>
+ <artifactId>axiom-impl</artifactId>
<version>${axiom.version}</version>
</dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis-ext</artifactId>
+ <version>1.3.04</version>
+ </dependency>
<!--
<dependency>
<groupId>xerces</groupId>
Added: trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtil.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtil.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/BPEL2SVGUtil.java 2010-08-05 14:58:07 UTC (rev 903)
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Portions licensed by WSO2, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.jboss.soa.bpel.bpel2svg;
+
+import org.apache.axiom.om.OMElement;
+import org.wso2.carbon.bpel.ui.bpel2svg.*;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.BPELImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.SVGImpl;
+
+/**
+ * This class provides the utility for converting a BPEL process description
+ * into a SVG format, which can then optionally be transformed into a range of
+ * alternative supported image types.
+ *
+ */
+public class BPEL2SVGUtil {
+
+ private static final String JPEG_IMAGE = "jpeg";
+ private static final String PNG_IMAGE = "png";
+ private static java.util.Map<String, SVGImageTransformer> m_transformers=
+ new java.util.HashMap<String, SVGImageTransformer>();
+
+ static {
+ m_transformers.put(PNG_IMAGE, new SVGToPNGImageTransformer());
+ m_transformers.put(JPEG_IMAGE, new SVGToJPEGImageTransformer());
+ }
+
+ public static void main(String[] args) {
+ if (args.length < 2 || args.length > 3) {
+ System.err.println("Usage: BPEL2SVGUtil <bpelFile> <outputFile> [ <transformType> ]");
+ System.err.println("(transformerType values are: "+PNG_IMAGE+","+JPEG_IMAGE+")");
+ System.exit(1);
+ }
+
+ SVGImageTransformer transformer=null;
+
+ if (args.length == 3) {
+ transformer = BPEL2SVGUtil.getTransformer(args[2]);
+
+ if (transformer == null) {
+ System.err.println("Unknown transformerType '"+args[2]+
+ "', valid values are: "+PNG_IMAGE+","+JPEG_IMAGE);
+ System.exit(1);
+ }
+ }
+
+ try {
+ java.io.FileInputStream fis=new java.io.FileInputStream(args[0]);
+
+ java.io.FileOutputStream os=new java.io.FileOutputStream(args[1]);
+
+ BPEL2SVGUtil.generate(fis, os, transformer);
+
+ fis.close();
+ os.close();
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * This method generates a SVG representation of a supplied BPEL description,
+ * and optionally transforms it into an image format. If an image
+ * transformer is not specified, then the SVG representation will be
+ * returned in the output stream.
+ *
+ * @param is The textual representation of a BPEL description
+ * @param os The output stream for the SVG or image representation
+ * @param transformer The optional image transformer
+ * @throws java.io.IOException Failed to generate the representation
+ */
+ public static void generate(java.io.InputStream is, java.io.OutputStream os,
+ SVGImageTransformer transformer) throws java.io.IOException {
+
+ byte[] b=new byte[is.available()];
+ is.read(b);
+
+ BPELInterface bpel = new BPELImpl();
+ OMElement bpelStr = bpel.load(new String(b));
+
+ bpel.processBpelString(bpelStr);
+
+ LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
+ layoutManager.setVerticalLayout(true);
+ layoutManager.layoutSVG(bpel.getRootActivity());
+
+ SVGImpl svg = new SVGImpl();
+ svg.setRootActivity(bpel.getRootActivity());
+
+ if (transformer == null) {
+ String str=svg.getHeaders()+svg.generateSVGString();
+ os.write(str.getBytes());
+ } else {
+ transformer.transform(svg, os);
+ }
+ }
+
+ /**
+ * This method returns the SVG image transformer associated with the
+ * supplied code.
+ *
+ * @param code The image transformer code
+ * @return The transformer, or null if not found
+ */
+ public static SVGImageTransformer getTransformer(String code) {
+ return(m_transformers.get(code));
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGImageTransformer.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGImageTransformer.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGImageTransformer.java 2010-08-05 14:58:07 UTC (rev 903)
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Portions licensed by WSO2, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.jboss.soa.bpel.bpel2svg;
+
+import java.io.IOException;
+
+/**
+ * This interface represents a transformer from the SVG document object model
+ * to an output stream representing the image to be displayed.
+ *
+ */
+public interface SVGImageTransformer {
+
+ /**
+ * This method transforms a supplied SVG document into an image written
+ * to the supplied output stream.
+ *
+ * @param svg The SVG document
+ * @param os The output stream
+ * @throws IOException Failed to transform the SVG doc into an image
+ */
+ public void transform(org.wso2.carbon.bpel.ui.bpel2svg.SVGInterface svg,
+ java.io.OutputStream os) throws IOException;
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToJPEGImageTransformer.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToJPEGImageTransformer.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToJPEGImageTransformer.java 2010-08-05 14:58:07 UTC (rev 903)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Portions licensed by WSO2, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.jboss.soa.bpel.bpel2svg;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.apache.batik.transcoder.TranscoderException;
+import org.apache.batik.transcoder.TranscoderInput;
+import org.apache.batik.transcoder.TranscoderOutput;
+import org.apache.batik.transcoder.image.JPEGTranscoder;
+
+/**
+ * This class represents the transformer from the SVG document object model
+ * to an output stream representing the image to be displayed.
+ *
+ */
+public class SVGToJPEGImageTransformer implements SVGImageTransformer {
+
+ /**
+ * This method transforms a supplied SVG document into an image written
+ * to the supplied output stream.
+ *
+ * @param svg The SVG document
+ * @param os The output stream
+ * @throws IOException Failed to transform the SVG doc into an image
+ */
+ public void transform(org.wso2.carbon.bpel.ui.bpel2svg.SVGInterface svg,
+ java.io.OutputStream os) throws IOException {
+ // Create a JPEG transcoder
+ JPEGTranscoder jpegTranscoder = new JPEGTranscoder();
+ // Set the transcoding hints.
+ jpegTranscoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, new Float(0.8));
+ // Create the transcoder input.
+ String inputString = svg.getHeaders() + svg.generateSVGString();
+
+ Reader stringReader = new StringReader(inputString);
+ TranscoderInput transcoderInput2 = new TranscoderInput(stringReader);
+
+ TranscoderOutput transcoderOutput = new TranscoderOutput(os);
+ try {
+ jpegTranscoder.transcode(transcoderInput2, transcoderOutput);
+ } catch (TranscoderException e) {
+ throw new IOException("Transcoder error", e);
+ }
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToPNGImageTransformer.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToPNGImageTransformer.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/jboss/soa/bpel/bpel2svg/SVGToPNGImageTransformer.java 2010-08-05 14:58:07 UTC (rev 903)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Portions licensed by WSO2, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.jboss.soa.bpel.bpel2svg;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.apache.batik.transcoder.TranscoderException;
+import org.apache.batik.transcoder.TranscoderInput;
+import org.apache.batik.transcoder.TranscoderOutput;
+import org.apache.batik.transcoder.image.PNGTranscoder;
+
+/**
+ * This class represents the transformer from the SVG document object model
+ * to an output stream representing the image to be displayed.
+ *
+ */
+public class SVGToPNGImageTransformer implements SVGImageTransformer {
+
+ /**
+ * This method transforms a supplied SVG document into an image written
+ * to the supplied output stream.
+ *
+ * @param svg The SVG document
+ * @param os The output stream
+ * @throws IOException Failed to transform the SVG doc into an image
+ */
+ public void transform(org.wso2.carbon.bpel.ui.bpel2svg.SVGInterface svg,
+ java.io.OutputStream os) throws IOException {
+ // Create a PNG transcoder
+ PNGTranscoder pngTranscoder = new PNGTranscoder();
+
+ // Create the transcoder input.
+ String inputString = svg.getHeaders() + svg.generateSVGString();
+
+ //SVGDocument svgDoc = svg.getRootActivity().getSVGDocument();
+
+ //TranscoderInput transcoderInput = new TranscoderInput(svgDoc);
+ Reader stringReader = new StringReader(inputString);
+ TranscoderInput transcoderInput = new TranscoderInput(stringReader);
+
+ // Create the transcoder output.
+ TranscoderOutput transcoderOutput = new TranscoderOutput(os);
+ try {
+ pngTranscoder.transcode(transcoderInput, transcoderOutput);
+ } catch (TranscoderException e) {
+ throw new IOException("Transcoder error", e);
+ }
+ }
+
+}
Modified: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java 2010-08-04 15:48:21 UTC (rev 902)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java 2010-08-05 14:58:07 UTC (rev 903)
@@ -17,4 +17,6 @@
public byte[] toPNGBytes();
+ public String getHeaders();
+
}
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2010-08-04 15:48:21 UTC (rev 902)
+++ trunk/console/pom.xml 2010-08-05 14:58:07 UTC (rev 903)
@@ -18,7 +18,7 @@
<modules>
<module>integration</module>
<module>identity</module>
- <!--module>bpel2svg</module-->
+ <module>bpel2svg</module>
</modules>
</project>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-08-04 15:48:21 UTC (rev 902)
+++ trunk/pom.xml 2010-08-05 14:58:07 UTC (rev 903)
@@ -92,8 +92,8 @@
<cxf.version>2.2.6</cxf.version>
<saxon.version>9.1.0.8</saxon.version>
<spring.version>2.5.6.SEC01</spring.version> <!-- This version must match the version used by the ESB -->
- <batik.version>1.6</batik.version>
- <axiom.version>1.2.5</axiom.version>
+ <batik.version>1.7</batik.version>
+ <axiom.version>1.2.8</axiom.version>
<commons.codec.version>1.4</commons.codec.version>
</properties>
14 years, 4 months
riftsaw SVN: r902 - trunk/console/bpel2svg.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-08-04 11:48:21 -0400 (Wed, 04 Aug 2010)
New Revision: 902
Modified:
trunk/console/bpel2svg/
Log:
Ignore
Property changes on: trunk/console/bpel2svg
___________________________________________________________________
Name: svn:ignore
+ target
14 years, 4 months
riftsaw SVN: r901 - in trunk: console and 11 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-08-04 11:46:46 -0400 (Wed, 04 Aug 2010)
New Revision: 901
Added:
trunk/console/bpel2svg/
trunk/console/bpel2svg/pom.xml
trunk/console/bpel2svg/src/
trunk/console/bpel2svg/src/main/
trunk/console/bpel2svg/src/main/java/
trunk/console/bpel2svg/src/main/java/org/
trunk/console/bpel2svg/src/main/java/org/wso2/
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ActivityInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/AssignInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPEL2SVGFactory.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPEL2SVGIcons.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELAttributeValuePair.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CatchAllInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CatchInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensateInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensateScopeInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensationHandlerInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ElseIfInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ElseInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/EventHandlerInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ExitInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/FaultHandlerInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/FlowInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ForEachInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/IfInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/InvokeInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/LayoutManager.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/Link.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnAlarmInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnEventInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnMessageInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/PickInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ProcessInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReThrowInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReceiveInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/RepeatUntilInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReplyInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGCoordinates.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGDimension.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ScopeInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SequenceInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SourceInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SourcesInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TargetInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TargetsInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TerminationHandlerInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ThrowInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/WaitInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/WhileInterface.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ActivityImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/AssignImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/BPELImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CatchAllImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CatchImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensateImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensateScopeImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensationHandlerImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ElseIfImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ElseImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/EventHandlerImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ExitImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/FaultHandlerImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/FlowImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ForEachImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/IfImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/InvokeImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnAlarmImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnEventImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnMessageImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/PickImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ProcessImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReThrowImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReceiveImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/RepeatUntilImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReplyImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SVGImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ScopeImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SequenceImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SimpleActivityImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SourceImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SourcesImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TargetImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TargetsImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TerminationHandlerImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ThrowImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/WaitImpl.java
trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/WhileImpl.java
Modified:
trunk/console/pom.xml
trunk/pom.xml
Log:
RIFTSAW-92 - initial submission of the WSO2 Carbon BPEL2SVG code, licensed under Apache License version 2.
Added: trunk/console/bpel2svg/pom.xml
===================================================================
--- trunk/console/bpel2svg/pom.xml (rev 0)
+++ trunk/console/bpel2svg/pom.xml 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,111 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.soa.bpel.console</groupId>
+ <artifactId>bpel2svg</artifactId>
+ <packaging>jar</packaging>
+ <version>2.2.0-SNAPSHOT</version>
+ <name>RiftSaw::Console::BPEL2SVG</name>
+
+ <parent>
+ <groupId>org.jboss.soa.bpel.console</groupId>
+ <artifactId>parent</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${commons.logging.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>${commons.codec.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-dom</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-svg-dom</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-util</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-css</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-ext</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-xml</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-transcoder</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-bridge</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-gvt</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-script</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-awt-util</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-parser</artifactId>
+ <version>${batik.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom</artifactId>
+ <version>${axiom.version}</version>
+ </dependency>
+ <!--
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ -->
+ </dependencies>
+
+ <build>
+ <finalName>riftsaw-console-bpel2svg</finalName>
+ </build>
+
+</project>
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ActivityInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ActivityInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ActivityInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,109 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+import java.util.List;
+import java.util.Set;
+import java.util.Map;
+
+public interface ActivityInterface {
+ //public ActivityInterface processSubActivities(StringTokenizer bpelST);
+ public ActivityInterface processSubActivities(OMElement om);
+
+ public void layout(int startXLeft, int startYTop);
+
+ // public String getSVGString();
+ public Element getSVGString(SVGDocument doc);
+
+ //public String getSubActivitiesSVGString();
+ public Element getSubActivitiesSVGString(SVGDocument doc);
+
+ public SVGCoordinates getEntryArrowCoords();
+
+ public SVGCoordinates getExitArrowCoords();
+
+ public List<ActivityInterface> getSubActivities();
+
+ public SVGDimension getDimensions() ;
+
+ public void switchDimensionsToHorizontal();
+
+ public String getId();
+
+ public String getName();
+
+ public void setName(String name);
+
+ public String getDisplayName();
+
+ public void setDisplayName(String displayName);
+
+ // Start Icon Methods
+ public int getStartIconXLeft();
+
+ public void setStartIconXLeft(int xLeft);
+
+ public int getStartIconYTop();
+
+ public void setStartIconYTop(int yTop);
+
+ public int getStartIconWidth();
+
+ public int getStartIconHeight();
+
+ public void setStartIconHeight(int iconHeight);
+
+ public void setStartIconWidth(int iconWidth);
+
+ public String getStartIconPath();
+
+ public void setStartIconPath(String iconPath);
+
+ // End Icon methods
+ public int getEndIconXLeft();
+
+ public void setEndIconXLeft(int xLeft);
+
+ public int getEndIconYTop();
+
+ public void setEndIconYTop(int yTop);
+
+ public int getEndIconWidth();
+
+ public int getEndIconHeight();
+
+ public String getEndIconPath();
+
+ public boolean isIncludeAssigns();
+
+ public boolean isVerticalChildLayout();
+
+ public void setVerticalChildLayout(boolean verticalChildLayout);
+
+ public boolean isHorizontalChildLayout();
+
+ public String getEndTag();
+
+ public Element getRoot();
+
+ public String getActivityInfoString();
+
+ public List<BPELAttributeValuePair> getAttributes();
+
+ public Set<ActivityInterface> getLinkRoots();
+
+ public ActivityInterface getParent();
+
+ public int getCorrectionY();
+
+ public void setCorrectionY(int correctionY);
+
+ public void setLinkProperties(Map<String, Link> links, Set<ActivityInterface> sources,
+ Set<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> targets);
+
+ public Map<String, Link> getLinks();
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/AssignInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/AssignInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/AssignInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface AssignInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPEL2SVGFactory.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPEL2SVGFactory.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPEL2SVGFactory.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,223 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.AssignImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.CompensateImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.CompensateScopeImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ElseIfImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ExitImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.FlowImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ForEachImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.IfImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.InvokeImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.OnAlarmImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.OnEventImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.OnMessageImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.PickImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ProcessImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ReThrowImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ReceiveImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.RepeatUntilImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ReplyImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ScopeImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.ThrowImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.WaitImpl;
+import org.wso2.carbon.bpel.ui.bpel2svg.impl.WhileImpl;
+
+public class BPEL2SVGFactory {
+ // Constants
+ // START_TAGS
+ public final static String ASSIGN_START_TAG = "assign";
+ public final static String CATCH_START_TAG = "catch";
+ public final static String CATCHALL_START_TAG = "catchAll";
+ public final static String COMPENSATESCOPE_START_TAG = "compensateScope";
+ public final static String COMPENSATE_START_TAG = "compensate";
+ public final static String COMPENSATIONHANDLER_START_TAG = "compensationHandler";
+ public final static String ELSE_START_TAG = "else";
+ public final static String ELSEIF_START_TAG = "elseif";
+ public final static String EVENTHANDLER_START_TAG = "eventHandlers";
+ public final static String EXIT_START_TAG = "exit";
+ public final static String FAULTHANDLER_START_TAG = "faultHandlers";
+ public final static String FLOW_START_TAG = "flow";
+ public final static String FOREACH_START_TAG = "forEach";
+ public final static String IF_START_TAG = "if";
+ public final static String INVOKE_START_TAG = "invoke";
+ public final static String ONALARM_START_TAG = "onAlarm";
+ public final static String ONEVENT_START_TAG = "onEvent";
+ public final static String ONMESSAGE_START_TAG = "onMessage";
+ public final static String PICK_START_TAG = "pick";
+ public final static String PROCESS_START_TAG = "process";
+ public final static String RECEIVE_START_TAG = "receive";
+ public final static String REPEATUNTIL_START_TAG = "repeatUntil";
+ public final static String REPLY_START_TAG = "reply";
+ public final static String RETHROW_START_TAG = "rethrow";
+ public final static String SCOPE_START_TAG = "scope";
+ public final static String SEQUENCE_START_TAG = "sequence";
+ public final static String SOURCE_START_TAG = "source";
+ public final static String SOURCES_START_TAG = "sources";
+ public final static String TARGET_START_TAG = "target";
+ public final static String TARGETS_START_TAG = "targets";
+ public final static String TERMINATIONHANDLER_START_TAG = "terminationHandler";
+ public final static String THROW_START_TAG = "throw";
+ public final static String WAIT_START_TAG = "wait";
+ public final static String WHILE_START_TAG = "while";
+ // END_TAGS
+ public final static String ASSIGN_END_TAG = "/assign";
+ public final static String CATCH_END_TAG = "/catch";
+ public final static String CATCHALL_END_TAG = "/catchAll";
+ public final static String COMPENSATESCOPE_END_TAG = "/compensateScope";
+ public final static String COMPENSATE_END_TAG = "/compensate";
+ public final static String COMPENSATIONHANDLER_END_TAG = "/compensationHandler";
+ public final static String ELSE_END_TAG = "/else";
+ public final static String ELSEIF_END_TAG = "/elseif";
+ public final static String EVENTHANDLER_END_TAG = "/eventHandlers";
+ public final static String EXIT_END_TAG = "/exit";
+ public final static String FAULTHANDLER_END_TAG = "/faultHandlers";
+ public final static String FLOW_END_TAG = "/flow";
+ public final static String FOREACH_END_TAG = "/forEach";
+ public final static String IF_END_TAG = "/if";
+ public final static String INVOKE_END_TAG = "/invoke";
+ public final static String ONMESSAGE_END_TAG = "/onMessage";
+ public final static String ONALARM_END_TAG = "/onAlarm";
+ public final static String ONEVENT_END_TAG = "/onEvent";
+ public final static String PICK_END_TAG = "/pick";
+ public final static String PROCESS_END_TAG = "/process";
+ public final static String RECEIVE_END_TAG = "/receive";
+ public final static String REPEATUNTIL_END_TAG = "/repeatUntil";
+ public final static String REPLY_END_TAG = "/reply";
+ public final static String RETHROW_END_TAG = "/rethrow";
+ public final static String SCOPE_END_TAG = "/scope";
+ public final static String SEQUENCE_END_TAG = "/sequence";
+ public final static String SOURCE_END_TAG = "/source";
+ public final static String SOURCES_END_TAG = "/sources";
+ public final static String TARGET_END_TAG = "/target";
+ public final static String TARGETS_END_TAG = "/targets";
+ public final static String TERMINATIONHANDLER_END_TAG = "/terminationHandler";
+ public final static String THROW_END_TAG = "/throw";
+ public final static String WAIT_END_TAG = "/wait";
+ public final static String WHILE_END_TAG = "/while";
+
+ public final static String SINGLE_LINE_END_TAG = "/>";
+ public final static int TEXT_ADJUST = 10;
+
+ // Properties
+ public String iconSource = "images/bpel2svg";
+
+ private static BPEL2SVGFactory instance = null;
+
+ public static BPEL2SVGFactory getInstance() {
+ if (instance == null) {
+ instance = new BPEL2SVGFactory();
+ }
+ return instance;
+ }
+
+ public LayoutManager layoutManager = null;
+
+ public LayoutManager getLayoutManager() {
+ if (layoutManager == null) {
+ layoutManager = new LayoutManager();
+ }
+ return layoutManager;
+ }
+
+ public void setLayoutManager(LayoutManager layoutManager) {
+ this.layoutManager = layoutManager;
+ }
+
+ private String iconExtension = ".png";
+
+ public String getIconExtension() {
+ return iconExtension;
+ }
+
+ public void setIconExtension(String iconExtension) {
+ this.iconExtension = iconExtension;
+ }
+
+ // Methods
+ public String getIconPath(String activity) {
+ String iconPath = null;
+ if (activity != null) {
+ if (activity.equalsIgnoreCase(AssignImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.ASSIGN_ICON;
+ } else if (activity.equalsIgnoreCase(ElseIfImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.ELSEIF_ICON;
+ } else if (activity.equalsIgnoreCase(CompensateImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.COMPENSATE_ICON;
+ } else if (activity.equalsIgnoreCase(CompensateScopeImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.COMPENSATESCOPE_ICON;
+ } else if (activity.equalsIgnoreCase(ExitImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.EXIT_ICON;
+ } else if (activity.equalsIgnoreCase(FlowImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.FLOW_ICON;
+ } else if (activity.equalsIgnoreCase(ForEachImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.FOREACH_ICON;
+ } else if (activity.equalsIgnoreCase(IfImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.IF_ICON;
+ } else if (activity.equalsIgnoreCase(InvokeImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.INVOKE_ICON;
+ } else if (activity.equalsIgnoreCase(OnAlarmImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.ONALARM_ICON;
+ } else if (activity.equalsIgnoreCase(OnEventImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.ONEVENT_ICON;
+ } else if (activity.equalsIgnoreCase(OnMessageImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.ONMESSAGE_ICON;
+ } else if (activity.equalsIgnoreCase(PickImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.PICK_ICON;
+ } else if (activity.equalsIgnoreCase(ProcessImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.PROCESS_ICON;
+ } else if (activity.equalsIgnoreCase(ReceiveImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.RECEIVE_ICON;
+ } else if (activity.equalsIgnoreCase(RepeatUntilImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.REPEATUNTIL_ICON;
+ } else if (activity.equalsIgnoreCase(ReplyImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.REPLY_ICON;
+ } else if (activity.equalsIgnoreCase(ReThrowImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.RETHROW_ICON;
+ } else if (activity.equalsIgnoreCase(ScopeImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.SCOPE_ICON;
+ } else if (activity.equalsIgnoreCase(ThrowImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.THROW_ICON;
+ } else if (activity.equalsIgnoreCase(WaitImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.WAIT_ICON;
+ } else if (activity.equalsIgnoreCase(WhileImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.WHILE_ICON;
+ }
+ }
+ return iconPath;
+ }
+
+ public String getEndIconPath(String activity) {
+ String iconPath = null;
+ if (activity != null) {
+ if (activity.equalsIgnoreCase(FlowImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.FLOW_ICON;
+ } else if (activity.equalsIgnoreCase(ForEachImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.FOREACH_ICON;
+ } else if (activity.equalsIgnoreCase(IfImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.IF_ICON;
+ } else if (activity.equalsIgnoreCase(PickImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.PICK_ICON;
+ } else if (activity.equalsIgnoreCase(ProcessImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.PROCESS_ICON;
+ } else if (activity.equalsIgnoreCase(RepeatUntilImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.REPEATUNTIL_ICON;
+ } else if (activity.equalsIgnoreCase(ScopeImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.SCOPE_ICON;
+ } else if (activity.equalsIgnoreCase(WhileImpl.class.getName())) {
+ iconPath = BPEL2SVGIcons.WHILE_ICON;
+ }
+ }
+ return iconPath;
+ }
+
+ public String getIconSource() {
+ return iconSource;
+ }
+
+ public void setIconSource(String iconSource) {
+ this.iconSource = iconSource;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPEL2SVGIcons.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPEL2SVGIcons.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPEL2SVGIcons.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,44 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 14, 2009
+ * Time: 1:56:55 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class BPEL2SVGIcons {
+ public final static String TRANSFORMATION_MATRIX = "matrix(1.0124 0 0 1.0124 0 0)";
+ public final static String ASSIGN_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhI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// public final static String CATCH_ICON = "catch";
+ // public final static String CATCHALL_ICON = "catchAll";
+ public final static String COMPENSATESCOPE_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9SdTv10ywnumUusS7io6muL8X/FiPwfpkNzdaTcme6YRWdsHG+5lP3UUDJPUdAcVq/EvxJpvhfwffXWp!
3BhidfLjRF3SSyH7qIuRljj+ZPANeQ+DLhdV1eDxh4l1u0g1wReVZ2Tp5qafF6LyBvI6nr71w1qipVOetU5YW01gm3r/M07d2vzOmnF1IctKHNO/aTSX/AG6t/L9DuvA/xin8STT6Rf6JLZ+J7ID7Zp6uAR/toG5KnI9cZHJyCeruPFVzaQPNNot1HEgyzFlwBXknjy10/wASXlprVl4ntLPxLp2Ws76KExsf+mbkE5Q+hBxk8ckHT8G/FVfHGh3Fnr2qwaHqseYrm0kttysP78bhsMp/T6YJ48RioOm6tCt8nKlo/wDwK9vy2OihQmpqlWpfO1TVfdv+ZsfHD4YXPja307WNLd31jSCzRWjtmKdGGHG08B8chuvGPQjmvCPjaHxFpQey0ETPbn7POjNGjxSLwysrYYHPqK7345XEtp8JPFE0ErwypaErJGxVlOR0Ir4wtpdFBNw2sXCXUqgyyC6cMxx3PevssJkyzOLryquLj7qsovS7l9qL6tnymNzb+zZKkqakpe89ZLXRdGux9Pa14pj0TTp76/0KO1tIF3SSvLDgD8+T7dTXG6b4J134mavF4tGjSWmlrbsmlwQtHA8u7jzJSxViuOQMY5HbO7xW5Og3iBLjV550ByFkuXYA+vNJqes20OnTtZ+IL9rhV/dqL2Q8/TNd8uF3KlKksRK8k03yw2as7e5v5nnQ4liqsajoL3Wmvenutr+9t5H/2Q=="; //need new //scope
+ public final static String COMPENSATE_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUp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6b4J134mavF4tGjSWmlrbsmlwQtHA8u7jzJSxViuOQMY5HbO7xW5Og3iBLjV550ByFkuXYA+vNJqes20OnTtZ+IL9rhV/dqL2Q8/TNd8uF3KlKksRK8k03yw2as7e5v5nnQ4liqsajoL3Wmvenutr+9t5H/2Q=="; //need new
+ public final static String COMPENSATIONHANDLER_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9SdTv10ywnumUusS7io6muL8X/FiPwfpkNzdaTcme6YRWdsHG+5lP3UUDJPUdAcVq/EvxJpvhfwf!
fXWp3BhidfLjRF3SSyH7qIuRljj+ZPANeQ+DLhdV1eDxh4l1u0g1wReVZ2Tp5qafF6LyBvI6nr71w1qipVOetU5YW01gm3r/M07d2vzOmnF1IctKHNO/aTSX/AG6t/L9DuvA/xin8STT6Rf6JLZ+J7ID7Zp6uAR/toG5KnI9cZHJyCeruPFVzaQPNNot1HEgyzFlwBXknjy10/wASXlprVl4ntLPxLp2Ws76KExsf+mbkE5Q+hBxk8ckHT8G/FVfHGh3Fnr2qwaHqseYrm0kttysP78bhsMp/T6YJ48RioOm6tCt8nKlo/wDwK9vy2OihQmpqlWpfO1TVfdv+ZsfHD4YXPja307WNLd31jSCzRWjtmKdGGHG08B8chuvGPQjmvCPjaHxFpQey0ETPbn7POjNGjxSLwysrYYHPqK7345XEtp8JPFE0ErwypaErJGxVlOR0Ir4wtpdFBNw2sXCXUqgyyC6cMxx3PevssJkyzOLryquLj7qsovS7l9qL6tnymNzb+zZKkqakpe89ZLXRdGux9Pa14pj0TTp76/0KO1tIF3SSvLDgD8+T7dTXG6b4J134mavF4tGjSWmlrbsmlwQtHA8u7jzJSxViuOQMY5HbO7xW5Og3iBLjV550ByFkuXYA+vNJqes20OnTtZ+IL9rhV/dqL2Q8/TNd8uF3KlKksRK8k03yw2as7e5v5nnQ4liqsajoL3Wmvenutr+9t5H/2Q=="; //need new
+ public final static String ELSE_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAhACEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8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fHD4YXPja307WNLd31jSCzRWjtmKdGGHG08B8chuvGPQjmvCPjaHxFpQey0ETPbn7POjNGjxSLwysrYYHPqK7345XEtp8JPFE0ErwypaErJGxVlOR0Ir4wtpdFBNw2sXCXUqgyyC6cMxx3PevssJkyzOLryquLj7qsovS7l9qL6tnymNzb+zZKkqakpe89ZLXRdGux9Pa14pj0TTp76/0KO1tIF3SSvLDgD8+T7dTXG6b4J134mavF4tGjSWmlrbsmlwQtHA8u7jzJSxViuOQMY5HbO7xW5Og3iBLjV550ByFkuXYA+vNJqes20OnTtZ+IL9rhV/dqL2Q8/TNd8uF3KlKksRK8k03yw2as7e5v5nnQ4liqsajoL3Wmvenutr+9t5H/2Q=="; //need new
+ public final static String EXIT_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8Rc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8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9EfE3irWvEHiWbwt4SeK2uLZFfUdXmTeloG+6iL0aQjnngfnjl/E/gnTNA1fw5ZavrPiTWL/Wro2qXX9olBEwXdu!
CjoPbmuk+CQWTSfEVw/N9Nrl39pY9d4YYB+gx+dZPx4vl8P6p4E8QXUM50nS9W8y9uYoy4t0ZdodsdBk/5OK9f20MLUcG+WMU7vu7bt9r7LY4IYerjFH2cXOcmklvu9ku9izqVj4n+FMTanZ6pd+KfDkPzXdhqDB7qGPu8cn8WBzg9h+I9I0rU7bWtNtb+zlE1rcxrLFIO6kZFSQXFtqllHNDJFdWlxGGSRCHSRGHBB6EEGuC+Arf8W8ijjYtaxXdzHbknOYxK2P61yykq9F1X8Sa17p3/HT5mqi6NX2fRp6Po1b/ADPRKKKK4jqPLtaF38KvF1/4ghtZb3wtqzLJqMVupaSznHHnBe6sPve/4Ax/Fnx5outfB/xHcaRrltMzWnAgmXzCCw3KVPIJGRgjv0r1WvJPjj8N9Am+HXiS+tPD9r/aoti0cltbgSF8jkBRya7JVKdWP71PmStdde11+v4HNGFSlK9N6b+nozz3wB8KtUls49ET4g65oIaLzbexhwIZInG7KAMB3OR9ffHnPxI1nV/hvqEnhfwR441zXbnS0MmorbyeTZ6cmclWZSRvJJ+UdCfXIr0rUPiVoms+F7TTrix8Q2t1DbLEl1a6fKksLBACUYDIP/1q4e7ufDugfDPUfDPhrQ9aSS4iIaafT5PMuJCRl5HxyT+Q6DArONNJcqdkXOpKUuaSbk+p2P8Ab/ir/oatS/77FFS/2Tff8+dx/wB+m/worE0P/9k="; //need a new one // onmessage
+ public final static String ONMESSAGE_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAA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RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9SdTv10ywnumUusS7io6muL8X/FiPwfpkNzdaTcme6YRWdsHG+5lP3UUDJPUdAcVq/EvxJpvhfwffXWp3BhidfLj!
RF3SSyH7qIuRljj+ZPANeQ+DLhdV1eDxh4l1u0g1wReVZ2Tp5qafF6LyBvI6nr71w1qipVOetU5YW01gm3r/M07d2vzOmnF1IctKHNO/aTSX/AG6t/L9DuvA/xin8STT6Rf6JLZ+J7ID7Zp6uAR/toG5KnI9cZHJyCeruPFVzaQPNNot1HEgyzFlwBXknjy10/wASXlprVl4ntLPxLp2Ws76KExsf+mbkE5Q+hBxk8ckHT8G/FVfHGh3Fnr2qwaHqseYrm0kttysP78bhsMp/T6YJ48RioOm6tCt8nKlo/wDwK9vy2OihQmpqlWpfO1TVfdv+ZsfHD4YXPja307WNLd31jSCzRWjtmKdGGHG08B8chuvGPQjmvCPjaHxFpQey0ETPbn7POjNGjxSLwysrYYHPqK7345XEtp8JPFE0ErwypaErJGxVlOR0Ir4wtpdFBNw2sXCXUqgyyC6cMxx3PevssJkyzOLryquLj7qsovS7l9qL6tnymNzb+zZKkqakpe89ZLXRdGux9Pa14pj0TTp76/0KO1tIF3SSvLDgD8+T7dTXG6b4J134mavF4tGjSWmlrbsmlwQtHA8u7jzJSxViuOQMY5HbO7xW5Og3iBLjV550ByFkuXYA+vNJqes20OnTtZ+IL9rhV/dqL2Q8/TNd8uF3KlKksRK8k03yw2as7e5v5nnQ4liqsajoL3Wmvenutr+9t5H/2Q=="; //need new
+ public final static String SCOPE_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDA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2vzOmnF1IctKHNO/aTSX/AG6t/L9DuvA/xin8STT6Rf6JLZ+J7ID7Zp6uAR/toG5KnI9cZHJyCeruPFVzaQPNNot1HEgyzFlwBXknjy10/wASXlprVl4ntLPxLp2Ws76KExsf+mbkE5Q+hBxk8ckHT8G/FVfHGh3Fnr2qwaHqseYrm0kttysP78bhsMp/T6YJ48RioOm6tCt8nKlo/wDwK9vy2OihQmpqlWpfO1TVfdv+ZsfHD4YXPja307WNLd31jSCzRWjtmKdGGHG08B8chuvGPQjmvCPjaHxFpQey0ETPbn7POjNGjxSLwysrYYHPqK7345XEtp8JPFE0ErwypaErJGxVlOR0Ir4wtpdFBNw2sXCXUqgyyC6cMxx3PevssJkyzOLryquLj7qsovS7l9qL6tnymNzb+zZKkqakpe89ZLXRdGux9Pa14pj0TTp76/0KO1tIF3SSvLDgD8+T7dTXG6b4J134mavF4tGjSWmlrbsmlwQtHA8u7jzJSxViuOQMY5HbO7xW5Og3iBLjV550ByFkuXYA+vNJqes20OnTtZ+IL9rhV/dqL2Q8/TNd8uF3KlKksRK8k03yw2as7e5v5nnQ4liqsajoL3Wmvenutr+9t5H/2Q=="; //need new
+ public final static String THROW_ICON = "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc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cKypKMoUEjbgfzz+NeneCvBeneAtHfTNK8xbIzPMiStuKbudoPUgds8+5ql8RvA6eNtHWJGWK/tyXt5G6c9VPsePyFee6T8Tte8BIuleINLkuFhGyOR22PtHT5sEOPf8AWvlHOnlmNqVcRH3Z6qVr27p2OP3aVRymt+v6Hf8Ajb4UeGfH/wC81XT1N4Bhb23by519PmH3sdg2R7V5B8LPBf8AZPxrlEWoSaraabHOkMsygMoxtJJHBOTjPeuk1T4vaz4sQ6d4d0qWCaUbTKreZIAfTAAX6np7V2nwx8AHwZp0kt0VfU7rHmlTkRqOiA/qT6/Ssn7DM8bTqYWGkHeU7WvbZeZm4U61VSgttW/63O2ooor7E9EKy/En/IJl+ooorGt/Cl6Ey2ZD4U/5Bn/AzW1RRU4f+FH0CPwoKKKK6Cj/2Q==";
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELAttributeValuePair.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELAttributeValuePair.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELAttributeValuePair.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,21 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public class BPELAttributeValuePair {
+ private String attribute = null;
+ private String value = null;
+
+ public BPELAttributeValuePair(String attribute, String value) {
+ this.attribute = attribute;
+ this.value = value;
+ }
+
+ public String getAttribute() {
+ return attribute;
+ }
+
+ public String getValue() {
+ return value;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,27 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+import org.apache.axiom.om.OMElement;
+
+public interface BPELInterface {
+ public void processBpelString(OMElement om);
+
+ // public OMElement load(String filename);
+ public OMElement load(String bpelStr);
+
+ public void setBpelElement(OMElement bpelElement);
+
+ public OMElement getBpelElement();
+
+ public void setIncludeAssign(boolean includeAssign);
+
+ public boolean isIncludeAssign();
+
+ public void setVertical(boolean vertical);
+
+ public boolean isVertical();
+
+ public ProcessInterface getRootActivity();
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CatchAllInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CatchAllInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CatchAllInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface CatchAllInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CatchInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CatchInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CatchInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface CatchInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensateInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensateInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensateInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface CompensateInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensateScopeInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensateScopeInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensateScopeInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface CompensateScopeInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensationHandlerInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensationHandlerInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/CompensationHandlerInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface CompensationHandlerInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ElseIfInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ElseIfInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ElseIfInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,8 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface ElseIfInterface extends ActivityInterface {
+ public SVGCoordinates getNextElseExitArrowCoords();
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ElseInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ElseInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ElseInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface ElseInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/EventHandlerInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/EventHandlerInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/EventHandlerInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface EventHandlerInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ExitInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ExitInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ExitInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface ExitInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/FaultHandlerInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/FaultHandlerInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/FaultHandlerInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface FaultHandlerInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/FlowInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/FlowInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/FlowInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface FlowInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ForEachInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ForEachInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ForEachInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface ForEachInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/IfInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/IfInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/IfInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface IfInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/InvokeInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/InvokeInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/InvokeInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface InvokeInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/LayoutManager.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/LayoutManager.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/LayoutManager.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,251 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+import java.util.*;
+
+public class LayoutManager {
+ // Variables
+ // Properties
+ private int svgWidth = 1400;
+
+ public int getSvgWidth() {
+ return svgWidth;
+ }
+
+ public void setSvgWidth(int svgWidth) {
+ this.svgWidth = svgWidth;
+ }
+
+ private int svgHeight = 1000;
+
+ public int getSvgHeight() {
+ return svgHeight;
+ }
+
+ public void setSvgHeight(int svgHeight) {
+ this.svgHeight = svgHeight;
+ }
+
+ private int xSpacing = 20;
+
+ public int getXSpacing() {
+ return xSpacing;
+ }
+
+ public void setXSpacing(int xSpacing) {
+ this.xSpacing = xSpacing;
+ }
+
+ private int ySpacing = 50;
+
+ public int getYSpacing() {
+ return ySpacing;
+ }
+
+ public void setYSpacing(int ySpacing) {
+ this.ySpacing = ySpacing;
+ }
+
+ private boolean includeAssigns = true;
+
+ public boolean isIncludeAssigns() {
+ return includeAssigns;
+ }
+
+ public void setIncludeAssigns(boolean includeAssigns) {
+ this.includeAssigns = includeAssigns;
+ }
+
+ private boolean showSequenceBoxes = true;
+
+ public boolean isShowSequenceBoxes() {
+ return showSequenceBoxes;
+ }
+
+ public void setShowSequenceBoxes(boolean showSequenceBoxes) {
+ this.showSequenceBoxes = showSequenceBoxes;
+ }
+
+ private boolean verticalLayout = false; //this should be implement in some where
+
+ public boolean isVerticalLayout() {
+ return verticalLayout;
+ }
+
+ public void setVerticalLayout(boolean verticalLayout) {
+ this.verticalLayout = verticalLayout;
+ }
+
+ private boolean addCompositeActivityOpacity = false;
+
+ public boolean isAddCompositeActivityOpacity() {
+ return addCompositeActivityOpacity;
+ }
+
+ public void setAddCompositeActivityOpacity(boolean addCompositeActivityOpacity) {
+ this.addCompositeActivityOpacity = addCompositeActivityOpacity;
+ }
+
+ private boolean addIconOpacity = false;
+
+ public boolean isAddIconOpacity() {
+ return addIconOpacity;
+ }
+
+ public void setAddIconOpacity(boolean addIconOpacity) {
+ this.addIconOpacity = addIconOpacity;
+ }
+
+ private boolean addSimpleActivityOpacity = true;
+
+ public boolean isAddSimpleActivityOpacity() {
+ return addSimpleActivityOpacity;
+ }
+
+ public void setAddSimpleActivityOpacity(boolean addSimpleActivityOpacity) {
+ this.addSimpleActivityOpacity = addSimpleActivityOpacity;
+ }
+
+ private String iconOpacity = "0.25";
+
+ public String getCompositeActivityOpacity() {
+ return compositeActivityOpacity;
+ }
+
+ public void setCompositeActivityOpacity(String compositeActivityOpacity) {
+ this.compositeActivityOpacity = compositeActivityOpacity;
+ }
+
+ private String opacity = "0.50";
+
+ public String getIconOpacity() {
+ return iconOpacity;
+ }
+
+ public void setIconOpacity(String iconOpacity) {
+ this.iconOpacity = iconOpacity;
+ }
+
+ private String simpleActivityOpacity = "0.251";
+
+ public String getOpacity() {
+ return opacity;
+ }
+
+ public void setOpacity(String opacity) {
+ this.opacity = opacity;
+ }
+
+ private String compositeActivityOpacity = "0.10";
+
+ public String getSimpleActivityOpacity() {
+ return simpleActivityOpacity;
+ }
+
+ public void setSimpleActivityOpacity(String simpleActivityOpacity) {
+ this.simpleActivityOpacity = simpleActivityOpacity;
+ }
+
+ private int startIconDim = 32;
+
+ public int getStartIconDim() {
+ return startIconDim;
+ }
+
+ public void setStartIconDim(int startIconDim) {
+ this.startIconDim = startIconDim;
+ }
+
+ private int endIconDim = 22;
+
+ public int getEndIconDim() {
+ return endIconDim;
+ }
+
+ public void setEndIconDim(int endIconDim) {
+ this.endIconDim = endIconDim;
+ }
+
+ // Methods
+ public void layoutSVG(ActivityInterface rootActivity) {
+ rootActivity.getDimensions();
+ //rootActivity.layout(0, 0);
+ layoutLinks(rootActivity);
+ // rootActivity.getDimensions();
+ rootActivity.layout(0, 0);
+
+ }
+
+ private Map<ActivityInterface, ArrayList<ActivityInterface>> getLinkAdjacencyList(Map<String, Link> links) {
+ Map<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface, ArrayList<ActivityInterface>> linkAdjacencyList =
+ new HashMap<ActivityInterface, ArrayList<ActivityInterface>>();
+ if (links != null && !links.isEmpty()) {
+ Set linksSet = links.entrySet();
+ Iterator linksIterator = linksSet.iterator();
+ while(linksIterator.hasNext()){
+ Map.Entry<String, Link> link = (Map.Entry<String, Link>)linksIterator.next();
+ ActivityInterface startActivity = link.getValue().getSource();
+ ActivityInterface endActivity = link.getValue().getTarget();
+ if (linkAdjacencyList.containsKey(startActivity)) {
+ linkAdjacencyList.get(startActivity).add(endActivity);
+ }
+ else {
+ ArrayList<ActivityInterface> tmpArrayList = new ArrayList<ActivityInterface>();
+ tmpArrayList.add(endActivity);
+ linkAdjacencyList.put(startActivity, tmpArrayList);
+ }
+ }
+ }
+ return linkAdjacencyList;
+ }
+
+ private Map<ActivityInterface, ArrayList<ActivityInterface>> linkAdjacencyList;
+ private Set<ActivityInterface> rootLinks;
+ private int correctionCumulation = 0;
+ private int hieghestCorrectionCumulation = 0;
+
+ private void setCorrectionY(ActivityInterface source, ArrayList<ActivityInterface> children) {
+ if (children != null && !children.isEmpty()) {
+ for (ActivityInterface target : children) {
+ int whereTargetShouldBe = (source.getStartIconYTop() + source.getStartIconHeight() + 40);
+ int whereTargetIs = target.getStartIconYTop();
+ int correction = whereTargetShouldBe - whereTargetIs;
+ if (whereTargetIs < whereTargetShouldBe) { //the correction is included in YTop
+ target.setCorrectionY(correction);
+ int relativeCorrection = whereTargetShouldBe - source.getStartIconYTop();
+ correctionCumulation += relativeCorrection;
+ setCorrectionY(target, linkAdjacencyList.get(target));
+ correctionCumulation -= relativeCorrection;
+ }
+ }
+ }
+ else {
+ if (hieghestCorrectionCumulation < correctionCumulation) {
+ hieghestCorrectionCumulation = correctionCumulation;
+ }
+ }
+ }
+
+ private void layoutLinks(ActivityInterface rootActivity) {
+ Map<String, Link> links = rootActivity.getLinks();
+ if (links != null && !links.isEmpty()) {
+ linkAdjacencyList = getLinkAdjacencyList(links);
+ rootLinks = rootActivity.getLinkRoots(); // this shud b static
+
+ for (ActivityInterface root : rootLinks) {
+ correctionCumulation = 0;
+ setCorrectionY(root, linkAdjacencyList.get(root));
+ }
+
+ ActivityInterface tempParent = rootLinks.iterator().next().getParent(); //chk for empty set
+ while (tempParent != null) {
+ int tempHeight = tempParent.getDimensions().getHeight();
+ tempParent.getDimensions().setHeight(tempHeight + hieghestCorrectionCumulation); //this should b corrected
+ tempParent = tempParent.getParent();
+ }
+
+ rootLinks.clear();
+ }
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/Link.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/Link.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/Link.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,32 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:10:46 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class Link {
+
+ public ActivityInterface getSource() {
+ return source;
+ }
+
+ public void setSource(ActivityInterface source) {
+ this.source = source;
+ }
+
+ public ActivityInterface getTarget() {
+ return target;
+ }
+
+ public void setTarget(ActivityInterface target) {
+ this.target = target;
+ }
+
+ private ActivityInterface source;
+ private ActivityInterface target;
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnAlarmInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnAlarmInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnAlarmInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface OnAlarmInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnEventInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnEventInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnEventInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface OnEventInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnMessageInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnMessageInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/OnMessageInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface OnMessageInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/PickInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/PickInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/PickInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface PickInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ProcessInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ProcessInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ProcessInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,10 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+import org.w3c.dom.svg.SVGDocument;
+
+public interface ProcessInterface extends ActivityInterface {
+ public SVGDocument getSVGDocument();
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReThrowInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReThrowInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReThrowInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface ReThrowInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReceiveInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReceiveInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReceiveInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface ReceiveInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/RepeatUntilInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/RepeatUntilInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/RepeatUntilInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface RepeatUntilInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReplyInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReplyInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ReplyInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface ReplyInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGCoordinates.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGCoordinates.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGCoordinates.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,33 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public class SVGCoordinates {
+ int xLeft = 0;
+ int yTop = 0;
+
+ public SVGCoordinates(int xLeft, int yTop) {
+ this.xLeft = xLeft;
+ this.yTop = yTop;
+ }
+
+ public SVGCoordinates() {
+ }
+
+ public int getXLeft() {
+ return xLeft;
+ }
+
+ public void setXLeft(int xLeft) {
+ this.xLeft = xLeft;
+ }
+
+ public int getYTop() {
+ return yTop;
+ }
+
+ public void setYTop(int yTop) {
+ this.yTop = yTop;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGDimension.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGDimension.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGDimension.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,52 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public class SVGDimension {
+
+ protected LayoutManager layoutManager = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getLayoutManager();
+ private int xLeft = 0;
+ private int yTop = 0;
+ private int width = 0;
+ private int height = 0;
+
+ public SVGDimension() {
+ }
+
+ public SVGDimension(int width, int height) {
+ this.width = width;
+ this.height = height;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public void setHeight(int height) {
+ this.height = height;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ public int getXLeft() {
+ return xLeft;
+ }
+
+ public void setXLeft(int xLeft) {
+ this.xLeft = xLeft;
+ }
+
+ public int getYTop() {
+ return yTop;
+ }
+
+ public void setYTop(int yTop) {
+ this.yTop = yTop;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SVGInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,20 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+import java.io.File;
+import java.io.OutputStream;
+
+public interface SVGInterface {
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface getRootActivity();
+
+ public void setRootActivity(org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface rootActivity);
+
+ public String generateSVGString();
+
+ public String toPNGBase64String();
+
+ public byte[] toPNGBytes();
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ScopeInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ScopeInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ScopeInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,16 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+
+public interface ScopeInterface extends ActivityInterface {
+ public Element getTerminationHandlerIcon(SVGDocument doc);
+
+ public Element getFaultHandlerIcon(SVGDocument doc);
+
+ public Element getCompensationHandlerIcon(SVGDocument doc);
+
+ public Element getEventHandlerIcon(SVGDocument doc);
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SequenceInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SequenceInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SequenceInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface SequenceInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SourceInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SourceInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SourceInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,13 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:11:36 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface SourceInterface extends SourcesInterface {
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SourcesInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SourcesInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/SourcesInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,13 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:25:02 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface SourcesInterface extends ActivityInterface{
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TargetInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TargetInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TargetInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,13 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:11:52 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface TargetInterface extends TargetsInterface{
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TargetsInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TargetsInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TargetsInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,13 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:24:38 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface TargetsInterface extends ActivityInterface{
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TerminationHandlerInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TerminationHandlerInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/TerminationHandlerInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface TerminationHandlerInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ThrowInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ThrowInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/ThrowInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface ThrowInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/WaitInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/WaitInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/WaitInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface WaitInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/WhileInterface.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/WhileInterface.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/WhileInterface.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,7 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg;
+
+public interface WhileInterface extends ActivityInterface {
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ActivityImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ActivityImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ActivityImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,811 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import java.util.*;
+
+import org.w3c.dom.svg.SVGDocument;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+import org.w3c.dom.DOMImplementation;
+import org.apache.batik.svggen.SVGGraphics2D;
+import org.apache.batik.dom.svg.SVGDOMImplementation;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMAttribute;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGIcons;
+import org.wso2.carbon.bpel.ui.bpel2svg.Link;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPELAttributeValuePair;
+
+public abstract class ActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface {
+ // Local Variables
+ protected org.wso2.carbon.bpel.ui.bpel2svg.LayoutManager layoutManager =
+ org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getLayoutManager();
+ protected String name = null;
+ protected String displayName = null;
+ protected List<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> subActivities =
+ new ArrayList<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface>();
+ protected List<org.wso2.carbon.bpel.ui.bpel2svg.BPELAttributeValuePair> attributes =
+ new ArrayList<org.wso2.carbon.bpel.ui.bpel2svg.BPELAttributeValuePair>();
+
+ public List<BPELAttributeValuePair> getAttributes() {
+ return attributes;
+ }
+
+ public Map<String, Link> links;
+ protected Set<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> sources;
+ protected Set<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> targets;
+
+ public int getCorrectionY() {
+ return correctionY;
+ }
+
+ public void setCorrectionY(int correctionY) {
+ this.correctionY += correctionY;
+ }
+
+ protected int correctionY = 0;
+
+ public ActivityInterface getParent() {
+ return parent;
+ }
+
+ public void setParent(ActivityInterface parent) {
+ this.parent = parent;
+ }
+
+ protected ActivityInterface parent = null;
+
+ // Start Icon
+ protected String startIconPath = null;
+ protected int startIconHeight = layoutManager.getStartIconDim();
+ protected int startIconWidth = layoutManager.getStartIconDim();
+ protected int startIconXLeft = 0;
+ protected int startIconYTop = 0;
+ protected int startIconTextXLeft = 0;
+ protected int startIconTextYTop = 0;
+ // End Icon
+ protected String endIconPath = null;
+ protected int endIconHeight = layoutManager.getEndIconDim();
+ protected int endIconWidth = layoutManager.getEndIconDim();
+ protected int endIconXLeft = 0;
+ protected int endIconYTop = 0;
+ protected int endIconTextXLeft = 0;
+ protected int endIconTextYTop = 0;
+ // Layout
+ protected boolean verticalChildLayout = true;
+ // SVG Specific
+ protected org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension dimensions = null;
+ protected boolean exitIcon = false;
+
+
+ //SVG Batik Specific - I modify
+ protected /*static*/ SVGGraphics2D generator = null;
+
+ protected /*static*/ DOMImplementation dom = SVGDOMImplementation.getDOMImplementation();
+ protected /*static*/ String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
+ protected /*static*/ SVGDocument doc = (SVGDocument) dom.createDocument(svgNS, "svg", null);
+ protected /*static*/ Element root = doc.getDocumentElement();
+
+
+ // Box
+ public final static int BOX_MARGIN = 10;
+ protected int boxXLeft = 0;
+ protected int boxYTop = 0;
+ protected int boxHeight = 0;
+ protected int boxWidth = 0;
+ protected String boxStyle = "fill-opacity:0.04;fill-rule:evenodd;stroke:#0000FF;stroke-width:1.99999988;" +
+ "stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;" +
+ "bbbbbbbstroke-opacity:1;fill:url(#orange_red);stroke-opacity:0.2";
+
+ // Constructor
+ public ActivityImpl() {
+ super();
+ }
+
+ public ActivityImpl(String token) {
+ int nameIndex = token.indexOf("name");
+ if (nameIndex >= 0) {
+ int firstQuoteIndex = token.indexOf("\"", nameIndex + 1);
+ if (firstQuoteIndex >= 0) {
+ int lastQuoteIndex = token.indexOf("\"", firstQuoteIndex + 1);
+ if (lastQuoteIndex > firstQuoteIndex) {
+ setName(token.substring(firstQuoteIndex + 1, lastQuoteIndex));
+ setDisplayName(getName());
+ }
+ }
+ }
+ }
+
+ public ActivityImpl(OMElement omElement) {
+ Iterator tmpIterator = omElement.getAllAttributes();
+
+ while (tmpIterator.hasNext()) {
+ OMAttribute omAttribute = (OMAttribute) tmpIterator.next();
+ String tmpAttribute = new String(omAttribute.getLocalName());
+ String tmpValue = new String(omAttribute.getAttributeValue());
+
+ if (tmpAttribute != null && tmpValue != null) {
+ attributes.add(new org.wso2.carbon.bpel.ui.bpel2svg.BPELAttributeValuePair(tmpAttribute, tmpValue));
+
+ if (tmpAttribute.equals(new String("name"))) {
+ setName(tmpValue);
+ setDisplayName(getName());
+ }
+ }
+ }
+ }
+
+ // Properties
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getId() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public String getLayerId() {
+ return getLayerId(getId());
+ }
+
+ public String getLayerId(String id) {
+ return id; //+"-Layer";
+ }
+
+ public boolean isAddOpacity() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isAddCompositeActivityOpacity() {
+ return layoutManager.isAddCompositeActivityOpacity();
+ }
+
+ public boolean isAddIconOpacity() {
+ return layoutManager.isAddIconOpacity();
+ }
+
+ public boolean isAddSimpleActivityOpacity() {
+ return layoutManager.isAddSimpleActivityOpacity();
+ }
+
+ public String getOpacity() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public String getSimpleActivityOpacity() {
+ return layoutManager.getSimpleActivityOpacity();
+ }
+
+ public String getCompositeOpacity() {
+ return layoutManager.getCompositeActivityOpacity();
+ }
+
+ public String getIconOpacity() {
+ return layoutManager.getIconOpacity();
+ }
+
+ public String getBoxId() {
+ return getId(); // + "-Box";
+ }
+
+ public String getStartImageId() {
+ return getId(); // + "-StartImage";
+ }
+
+ public String getEndImageId() {
+ return getId(); // + "-EndImage";
+ }
+
+ public String getArrowId(String startId, String endId) {
+ return startId + "-" + endId + "-Arrow";
+ }
+
+ public String getStartImageTextId() {
+ return getStartImageId(); // + "-Text";
+ }
+
+ public String getEndImageTextId() {
+ return getEndImageId(); // + "-Text";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getStartIconHeight() {
+ return startIconHeight;
+ }
+
+ public String getStartIconPath() {
+ return startIconPath;
+ }
+
+ public void setStartIconPath(String iconPath) {
+ this.startIconPath = iconPath;
+ }
+
+ public String getEndIconPath() {
+ return endIconPath;
+ }
+
+ public int getStartIconWidth() {
+ return startIconWidth;
+ }
+
+ public int getEndIconHeight() {
+ return endIconHeight;
+ }
+
+ public int getEndIconWidth() {
+ return endIconWidth;
+ }
+
+ public void setStartIconHeight(int iconHeight) {
+ this.startIconHeight = iconHeight;
+ }
+
+ public void setStartIconWidth(int iconWidth) {
+ this.startIconWidth = iconWidth;
+ }
+
+ public int getStartIconXLeft() {
+ return startIconXLeft;
+ }
+
+ public void setStartIconXLeft(int xLeft) {
+ this.startIconXLeft = xLeft;
+ }
+
+ public int getStartIconYTop() {
+ return startIconYTop + correctionY;
+ }
+
+ public void setStartIconYTop(int yTop) {
+ this.startIconYTop = yTop;
+ }
+
+ public int getStartIconTextXLeft() {
+ return startIconTextXLeft;
+ }
+
+ public void setStartIconTextXLeft(int startIconTextXLeft) {
+ this.startIconTextXLeft = startIconTextXLeft;
+ }
+
+ public int getStartIconTextYTop() {
+ return startIconTextYTop + correctionY;
+ }
+
+ public void setStartIconTextYTop(int startIconTextYTop) {
+ this.startIconTextYTop = startIconTextYTop;
+ }
+
+ public int getEndIconXLeft() {
+ return endIconXLeft;
+ }
+
+ public void setEndIconXLeft(int xLeftEnd) {
+ this.endIconXLeft = xLeftEnd;
+ }
+
+ public int getEndIconYTop() {
+ return endIconYTop + correctionY;
+ }
+
+ public void setEndIconYTop(int yTopEnd) {
+ this.endIconYTop = yTopEnd;
+ }
+
+ public int getEndIconTextXLeft() {
+ return endIconTextXLeft;
+ }
+
+ public void setEndIconTextXLeft(int endIconTextXLeft) {
+ this.endIconTextXLeft = endIconTextXLeft;
+ }
+
+ public int getEndIconTextYTop() {
+ return endIconTextYTop;
+ }
+
+ public void setEndIconTextYTop(int endIconTextYTop) {
+ this.endIconTextYTop = endIconTextYTop;
+ }
+
+ public int getXSpacing() {
+ return layoutManager.getXSpacing();
+ }
+
+ public int getYSpacing() {
+ return layoutManager.getYSpacing();
+ }
+
+ public int getBoxHeight() {
+ return boxHeight;
+ }
+
+ public void setBoxHeight(int boxHeight) {
+ this.boxHeight = boxHeight;
+ }
+
+ public String getBoxStyle() {
+ return boxStyle;
+ }
+
+ public void setBoxStyle(String boxStyle) {
+ this.boxStyle = boxStyle;
+ }
+
+ public int getBoxWidth() {
+ return boxWidth;
+ }
+
+ public void setBoxWidth(int boxWidth) {
+ this.boxWidth = boxWidth;
+ }
+
+ public int getBoxXLeft() {
+ return boxXLeft;
+ }
+
+ public void setBoxXLeft(int boxXLeft) {
+ this.boxXLeft = boxXLeft;
+ }
+
+ public int getBoxYTop() {
+ return boxYTop;
+ }
+
+ public void setBoxYTop(int boxYTop) {
+ this.boxYTop = boxYTop;
+ }
+
+ public boolean isExitIcon() {
+ return exitIcon;
+ }
+
+ public void setExitIcon(boolean exitIcon) {
+ this.exitIcon = exitIcon;
+ }
+
+ public void setEndIconHeight(int iconHeightEnd) {
+ this.endIconHeight = iconHeightEnd;
+ }
+
+ public void setEndIconWidth(int iconWidthEnd) {
+ this.endIconWidth = iconWidthEnd;
+ }
+
+ public boolean isIncludeAssigns() {
+ return layoutManager.isIncludeAssigns();
+ }
+
+ public List<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> getSubActivities() {
+ return subActivities;
+ }
+
+ public boolean isVerticalChildLayout() {
+ return verticalChildLayout;
+ }
+
+ public void setVerticalChildLayout(boolean verticalChildLayout) {
+ this.verticalChildLayout = verticalChildLayout;
+ }
+
+ public boolean isHorizontalChildLayout() {
+ return !isVerticalChildLayout();
+ }
+
+ public Element getSVGString(SVGDocument doc) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public Element getSubActivitiesSVGString(SVGDocument doc) {
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = subActivities.iterator();
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Element subElement = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subElement.appendChild(activity.getSVGString(doc)); //attention check this probably should be changed
+ name = activity.getId();
+ }
+ return subElement;
+ }
+
+ protected Element getImageDefinition(SVGDocument doc, String imgPath, int imgXLeft, int imgYTop,
+ int imgWidth, int imgHeight, String id) {
+ Element group = null;
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", getLayerId());
+
+ if (getStartIconPath() != null) { // TODO looks like redundent, imgPath in method arguments
+ if (isAddIconOpacity() && !isAddSimpleActivityOpacity()) {
+ group.setAttributeNS(null, "style", "opacity:" + getIconOpacity());
+ }
+ Element image = doc.createElementNS("http://www.w3.org/2000/svg", "image");
+ image.setAttributeNS(null, "xlink:href", imgPath);
+ //image.setAttributeNS(null, "transform", BPEL2SVGIcons.TRANSFORMATION_MATRIX);
+ image.setAttributeNS(null, "x", String.valueOf(imgXLeft));
+ image.setAttributeNS(null, "y", String.valueOf(imgYTop));
+ image.setAttributeNS(null, "width", String.valueOf(imgWidth));
+ image.setAttributeNS(null, "height", String.valueOf(imgHeight));
+ image.setAttributeNS(null, "id", id);
+ image.setAttributeNS("xlink", "title", getActivityInfoString());
+
+ if (isAddIconOpacity() && !isAddSimpleActivityOpacity()) {
+ group.appendChild(image);
+ return group;
+ } else {
+ return image;
+ }
+ }
+ return group;
+ }
+
+ protected Element getImageDefinition(SVGDocument doc) {
+ return getImageDefinition(doc, getStartIconPath(), getStartIconXLeft(), getStartIconYTop(),
+ getStartIconWidth(), getStartIconHeight(), getStartImageId());
+ }
+
+ protected Element getEndImageDefinition(SVGDocument doc) {
+ return getImageDefinition(doc, getEndIconPath(), getEndIconXLeft(), getEndIconYTop(), getEndIconWidth(),
+ getEndIconHeight(), getEndImageId());
+ }
+
+ protected Element getImageText(SVGDocument doc, int imgXLeft, int imgYTop, int imgWidth, int imgHeight,
+ String imgName, String imgDisplayName) {
+ int txtXLeft = imgXLeft;
+ int txtYTop = imgYTop; // + imgHeight + BPEL2SVGFactory.TEXT_ADJUST;
+
+ Element a = doc.createElementNS("http://www.w3.org/2000/svg", "a");
+ if (imgDisplayName != null) {
+ a.setAttributeNS(null, "id", imgName);
+
+ Element text1 = doc.createElementNS("http://www.w3.org/2000/svg", "text");
+ text1.setAttributeNS(null, "x", String.valueOf(txtXLeft));
+ text1.setAttributeNS(null, "y", String.valueOf(txtYTop));
+ text1.setAttributeNS(null, "id", imgName + ".Text");
+ text1.setAttributeNS(null, "xml:space", "preserve");
+ text1.setAttributeNS(null, "style", "font-size:12px;font-style:normal;font-variant:normal;font-weight:" +
+ "normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:" +
+ "start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;" +
+ "stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Narrow;" +
+ "-inkscape-font-specification:Arial Narrow");
+
+ Element tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ tspan.setAttributeNS(null, "x", String.valueOf(txtXLeft));
+ tspan.setAttributeNS(null, "y", String.valueOf(txtYTop));
+ tspan.setAttributeNS(null, "id", "tspan-" + imgName);
+
+ Text text2 = doc.createTextNode(imgDisplayName);
+ tspan.appendChild(text2);
+
+ text1.appendChild(tspan);
+ a.appendChild(text1);
+ }
+ return a;
+ }
+
+ protected Element getStartImageText(SVGDocument doc) {
+ return getImageText(doc, getStartIconTextXLeft(), getStartIconTextYTop(), getStartIconWidth(),
+ getStartIconHeight(), getStartImageTextId(), getDisplayName());
+ }
+
+ protected void getEndImageText(SVGDocument doc) {
+ getImageText(doc, getEndIconTextXLeft(), getEndIconTextYTop(), getStartIconWidth(), getStartIconHeight(),
+ getEndImageTextId(), getDisplayName());
+ }
+
+ protected boolean isLargeArrow() {
+ return largeArrow;
+ }
+
+ protected void setLargeArrow(boolean largeArrow) {
+ this.largeArrow = largeArrow;
+ }
+
+ private boolean largeArrow = false;
+
+ private String getArrowStyle() {
+ String largeArrowStr = "fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:" +
+ "butt;stroke-linejoin:round;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:" +
+ "none;stroke-opacity:1";
+ String mediumArrowStr = "fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:" +
+ "butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:" +
+ "none;stroke-opacity:1";
+
+ if (largeArrow) {
+ return largeArrowStr;
+ } else {
+ return mediumArrowStr;
+ }
+ }
+
+ protected String getLinkArrowStyle() {
+ String largeArrowStr = "fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:" +
+ "butt;stroke-linejoin:round;marker-end:url(#LinkArrow);stroke-miterlimit:4;stroke-dasharray:" +
+ "none;stroke-opacity:1;opacity: 0.25;"; // + getIconOpacity();
+ String mediumArrowStr = "fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:" +
+ "butt;stroke-linejoin:round;marker-end:url(#LinkArrow);stroke-miterlimit:4;stroke-dasharray:" +
+ "none;stroke-opacity:1;opacity: 0.25;"; // + getIconOpacity();
+
+ if (largeArrow) {
+ return largeArrowStr;
+ } else {
+ return mediumArrowStr;
+ }
+ }
+
+ protected Element getArrowDefinition(SVGDocument doc, int startX, int startY, int endX, int endY, String id) { //here we have to find whether
+ Element path = doc.createElementNS("http://www.w3.org/2000/svg", "path");
+
+ if (startX == endX || startY == endY) {
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + endX + "," + endY);
+ }
+ else {
+ if(layoutManager.isVerticalLayout()){
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + startX + "," +
+ ((startY + 2 * endY) / 3) + " L " + endX + "," + ((startY + 2 * endY) / 3) + " L " + endX +
+ "," + endY); //use constants for these propotions
+ }else{
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + ((startX + 1* endX) / 2) +
+ "," + startY + " L " + ((startX + 1* endX) / 2) + "," + endY + " L " + endX + "," + endY); //use constants for these propotions
+ }
+ }
+ path.setAttributeNS(null, "id", id);
+ path.setAttributeNS(null, "style", getArrowStyle());
+
+ return path;
+ }
+
+ protected Element getArrowDefinition(SVGDocument doc, int startX, int startY, int midX, int midY, int endX,
+ int endY, String id) {
+ Element path = doc.createElementNS("http://www.w3.org/2000/svg", "path");
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + midX + "," + midY + "L " + endX +
+ "," + endY);
+ path.setAttributeNS(null, "id", id);
+ path.setAttributeNS(null, "style", getArrowStyle());
+
+ return path;
+ }
+
+ protected Element getBoxDefinition(SVGDocument doc) {
+ return getBoxDefinition(doc, getDimensions().getXLeft() + BOX_MARGIN, getDimensions().getYTop() + BOX_MARGIN,
+ getDimensions().getWidth() - (BOX_MARGIN * 2), getDimensions().getHeight() - (BOX_MARGIN * 2), getBoxId());
+ }
+
+ protected Element getBoxDefinition(SVGDocument doc, int boxXLeft, int boxYTop, int boxWidth, int boxHeight, String id) {
+ Element group = null;
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", "Layer-" + id);
+
+ if (layoutManager.isShowSequenceBoxes()) {
+
+ Element rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
+ rect.setAttributeNS(null, "width", String.valueOf(boxWidth));
+ rect.setAttributeNS(null, "height", String.valueOf(boxHeight));
+ rect.setAttributeNS(null, "x", String.valueOf(boxXLeft));
+ rect.setAttributeNS(null, "y", String.valueOf(boxYTop));
+ rect.setAttributeNS(null, "id", "Rect" + id);
+ rect.setAttributeNS(null, "rx", "10");
+ rect.setAttributeNS(null, "ry", "10");
+ rect.setAttributeNS(null, "style", boxStyle);
+
+ group.appendChild(rect);
+ }
+ return group;
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getDimensions() {
+// return dimensions;
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void switchDimensionsToHorizontal() {
+ int width = 0;
+ int height = 0;
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ activity.switchDimensionsToHorizontal();
+ }
+
+ width = getDimensions().getWidth();
+ height = getDimensions().getHeight();
+ // Switch
+ getDimensions().setHeight(width);
+ getDimensions().setWidth(height);
+ }
+
+ public void layout(int startXLeft, int startYTop) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public String getEndTag() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String toString() {
+ return getId();
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getEntryArrowCoords() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void passContent() {
+ root = doc.getDocumentElement();
+ generator.getRoot(root);
+ }
+
+ // Methods
+
+ public Set<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> getLinkRoots () {
+ sources.removeAll(targets);
+ return sources;
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface processSubActivities(OMElement omElement) {
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface endActivity = null;
+ if (omElement != null) {
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator iterator = omElement.getChildElements();
+ while (iterator.hasNext()) {
+ OMElement tmpElement = (OMElement) iterator.next();
+
+ if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ASSIGN_START_TAG) && isIncludeAssigns()) {
+ activity = new AssignImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.CATCHALL_START_TAG)) {
+ activity = new CatchAllImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.CATCH_START_TAG)) {
+ activity = new CatchImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATESCOPE_START_TAG)) {
+ activity = new CompensateScopeImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATE_START_TAG)) {
+ activity = new CompensateImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATIONHANDLER_START_TAG)) {
+ activity = new CompensationHandlerImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ELSEIF_START_TAG)) {
+ activity = new ElseIfImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ELSE_START_TAG)) {
+ activity = new ElseImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.EVENTHANDLER_START_TAG)) {
+ activity = new EventHandlerImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.EXIT_START_TAG)) {
+ activity = new ExitImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.FAULTHANDLER_START_TAG)) {
+ activity = new FaultHandlerImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.FLOW_START_TAG)) {
+ activity = new FlowImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.FOREACH_START_TAG)) {
+ activity = new ForEachImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.IF_START_TAG)) {
+ activity = new IfImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.INVOKE_START_TAG)) {
+ activity = new InvokeImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ONALARM_START_TAG)) {
+ activity = new OnAlarmImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ONEVENT_START_TAG)) {
+ activity = new OnEventImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ONMESSAGE_START_TAG)) {
+ activity = new OnMessageImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.PICK_START_TAG)) {
+ activity = new PickImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.PROCESS_START_TAG)) {
+ activity = new ProcessImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.RECEIVE_START_TAG)) {
+ activity = new ReceiveImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.REPEATUNTIL_START_TAG)) {
+ activity = new RepeatUntilImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.REPLY_START_TAG)) {
+ activity = new ReplyImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.RETHROW_START_TAG)) {
+ activity = new ReThrowImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SCOPE_START_TAG)) {
+ activity = new ScopeImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SEQUENCE_START_TAG)) {
+ activity = new SequenceImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SOURCE_START_TAG)) {
+ activity = new SourceImpl(tmpElement, this);//source;
+ if (activity.getAttributes().get(0).getAttribute().equals("linkName")) {
+ if (links.containsKey(activity.getAttributes().get(0).getValue())) { //if a entry for the particular link name already exists
+ links.get(activity.getAttributes().get(0).getValue()).setSource(this.parent);
+ }
+ else {
+ Link link = new Link();
+ link.setSource(this.parent);
+ links.put(activity.getAttributes().get(0).getValue(), link);
+ }
+ sources.add(this.parent);
+ }
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SOURCES_START_TAG)) {
+ activity = new SourcesImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TARGET_START_TAG)) {
+ activity = new TargetImpl(tmpElement, this);//target;
+ if (activity.getAttributes().get(0).getAttribute().equals("linkName")) {
+ if (links.containsKey(activity.getAttributes().get(0).getValue())) {
+ links.get(activity.getAttributes().get(0).getValue()).setTarget(this.parent);
+ }
+ else {
+ Link link = new Link();
+ link.setTarget(this.parent);
+ links.put(activity.getAttributes().get(0).getValue(), link);
+ }
+ targets.add(this.parent);
+ }
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TARGETS_START_TAG)) {
+ activity = new TargetsImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TERMINATIONHANDLER_START_TAG)) {
+ activity = new TerminationHandlerImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.THROW_START_TAG)) {
+ activity = new ThrowImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.WAIT_START_TAG)) {
+ activity = new WaitImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.WHILE_START_TAG)) {
+ activity = new WhileImpl(tmpElement, this);
+ } else if (tmpElement.getLocalName().equals(getEndTag())) {
+ break;
+ } else {
+ continue;
+ }
+
+ activity.setLinkProperties(links, sources, targets);
+ subActivities.add(activity);
+
+ if (tmpElement.getChildElements().hasNext()) {
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface replyActivity = activity.processSubActivities(tmpElement);
+ if (replyActivity != null) {
+ subActivities.add(replyActivity);
+ }
+ }
+ if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.PROCESS_START_TAG)) {
+ break;
+ }
+ }
+ }
+ return endActivity;
+ }
+
+ public Element getRoot() {
+ return root;
+ }
+
+ public String getActivityInfoString() {
+ String infoString = null;
+ for(org.wso2.carbon.bpel.ui.bpel2svg.BPELAttributeValuePair x : attributes){
+ String attrib = x.getAttribute();
+ String val = x.getValue();
+ if(infoString == null) infoString = "<" + attrib + "=" + val + "> ";
+ else infoString += "<" + attrib + "=" + val + "> ";
+ }
+
+ if(infoString != null) return infoString;
+ else return "No Attributes defined";
+ }
+
+ public Map<String, Link> getLinks() {
+ return links;
+ }
+
+ public void setLinkProperties(Map<String, Link> links, Set<ActivityInterface> sources, Set<ActivityInterface> targets) {
+ this.links = links;
+ this.sources = sources;
+ this.targets = targets;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/AssignImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/AssignImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/AssignImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,37 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class AssignImpl extends SimpleActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.AssignInterface {
+
+ public AssignImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public AssignImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public AssignImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ASSIGN_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/BPELImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/BPELImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/BPELImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,115 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.namespace.QName;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.StringReader;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.OMElement;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.Link;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+
+public class BPELImpl implements org.wso2.carbon.bpel.ui.bpel2svg.BPELInterface {
+ private Log log = LogFactory.getLog(BPELImpl.class);
+ private ProcessInterface processActivity = null;
+ private boolean vertical = true;
+ private boolean includeAssign = true;
+
+ //To handle links
+ public Map<String, Link> links = new HashMap<String, Link>();
+ public Set<ActivityInterface> sources = new HashSet<ActivityInterface>();
+ public Set<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> targets =
+ new HashSet<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface>();
+
+ private XMLStreamReader parser = null;
+ private StAXOMBuilder builder = null;
+ private OMElement bpelElement = null;
+
+ public void processBpelString(OMElement om) {
+
+ if (om != null) {
+
+ OMElement startElement = bpelElement.getFirstChildWithName(new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", BPEL2SVGFactory.SEQUENCE_START_TAG)); // namesapce should be changed, exceptions should be handled.
+ if (startElement != null) {
+ processActivity = new ProcessImpl(bpelElement);
+ processActivity.setLinkProperties(links, sources,targets);
+ processActivity.processSubActivities(bpelElement);
+ }else{
+ startElement = bpelElement.getFirstChildWithName(new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", BPEL2SVGFactory.FLOW_START_TAG)); // namesapce should be changed, exceptions should be handled.
+ if(startElement != null){
+ processActivity = new ProcessImpl(bpelElement);
+ processActivity.setLinkProperties(links, sources,targets);
+ processActivity.processSubActivities(bpelElement);
+ }
+ else {
+ startElement = bpelElement.getFirstChildWithName(new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", BPEL2SVGFactory.SCOPE_START_TAG)); // namesapce should be changed, exceptions should be handled.
+ if(startElement != null){
+ processActivity = new ProcessImpl(bpelElement);
+ processActivity.setLinkProperties(links, sources,targets);
+ processActivity.processSubActivities(bpelElement);
+ } else {
+ processActivity = new ProcessImpl(bpelElement);
+ processActivity.setLinkProperties(links, sources,targets);
+ processActivity.processSubActivities(bpelElement);
+ }
+ }
+ }
+ }
+ }
+
+ public OMElement load(String bpelStr) {
+ try {
+ parser = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(bpelStr));
+
+ builder = new StAXOMBuilder(parser);
+ bpelElement = builder.getDocumentElement();
+ //check whether the paser needed to be closed
+ return bpelElement;
+ } catch (XMLStreamException e) {
+ log.error("XMLStreamReader creation failed", e);
+ throw new NullPointerException("Document Element is NULL");
+ }
+ }
+
+ public ProcessInterface getRootActivity() {
+ return processActivity;
+ }
+
+ public boolean isVertical() {
+ return vertical;
+ }
+
+ public void setVertical(boolean vertical) {
+ this.vertical = vertical;
+ }
+
+ public boolean isIncludeAssign() {
+ return includeAssign;
+ }
+
+ public void setIncludeAssign(boolean includeAssign) {
+ this.includeAssign = includeAssign;
+ }
+
+ public OMElement getBpelElement() {
+ return bpelElement;
+ }
+
+ public void setBpelElement(OMElement bpelElement) {
+ this.bpelElement = bpelElement;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CatchAllImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CatchAllImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CatchAllImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,47 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+
+public class CatchAllImpl extends SequenceImpl implements org.wso2.carbon.bpel.ui.bpel2svg.CatchAllInterface {
+
+ public CatchAllImpl(String token) {
+ super(token);
+ name = "CATCHALL" + System.currentTimeMillis();
+ displayName = "Catch All";
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CatchAllImpl(OMElement omElement) {
+ super(omElement);
+
+ name = "CATCHALL" + System.currentTimeMillis();
+ displayName = "Catch All";
+
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CatchAllImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+
+ name = "CATCHALL" + System.currentTimeMillis();
+ displayName = "Catch All";
+
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.CATCHALL_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CatchImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CatchImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CatchImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,49 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.CatchInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class CatchImpl extends SequenceImpl implements CatchInterface {
+ public CatchImpl(String token) {
+ super(token);
+
+ name = "CATCH" + System.currentTimeMillis();
+ displayName = "Catch";
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CatchImpl(OMElement omElement) {
+ super(omElement);
+
+ name = "CATCH" + System.currentTimeMillis();
+ displayName = "Catch";
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CatchImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ name = "CATCH" + System.currentTimeMillis();
+ displayName = "Catch";
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.CATCH_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensateImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensateImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensateImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,39 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.CompensateInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class CompensateImpl extends SimpleActivityImpl implements CompensateInterface {
+
+ public CompensateImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CompensateImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CompensateImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATE_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensateScopeImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensateScopeImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensateScopeImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,40 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.CompensateScopeInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class CompensateScopeImpl extends SimpleActivityImpl implements CompensateScopeInterface {
+
+ public CompensateScopeImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CompensateScopeImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CompensateScopeImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATESCOPE_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensationHandlerImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensationHandlerImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/CompensationHandlerImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,48 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class CompensationHandlerImpl extends SequenceImpl implements org.wso2.carbon.bpel.ui.bpel2svg.CompensationHandlerInterface {
+ public CompensationHandlerImpl(String token) {
+ super(token);
+
+ name = "COMPENSATIONHANDLER" + System.currentTimeMillis();
+ displayName = "Compensation Handler";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CompensationHandlerImpl(OMElement omElement) {
+ super(omElement);
+
+ name = "COMPENSATIONHANDLER" + System.currentTimeMillis();
+ displayName = "Compensation Handler";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public CompensationHandlerImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ name = "COMPENSATIONHANDLER" + System.currentTimeMillis();
+ displayName = "Compensation Handler";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATIONHANDLER_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ElseIfImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ElseIfImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ElseIfImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,262 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+public class ElseIfImpl extends ActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.ElseIfInterface {
+ public ElseIfImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ /* setStartIconHeight(32);
+ setStartIconWidth(32);*/
+ }
+
+ public ElseIfImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ /*setStartIconHeight(32);
+ setStartIconWidth(32);*/
+ }
+
+ public ElseIfImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ /*setStartIconHeight(32);
+ setStartIconWidth(32);*/
+ }
+
+ @Override
+ public String getId() {
+ return getName(); // + "-ElseIf";
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.ELSEIF_END_TAG;
+ }
+
+ @Override
+ public SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ dimensions = new SVGDimension(width, height);
+
+ SVGDimension subActivityDim = null;
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (subActivityDim.getWidth() > width) {
+ width += subActivityDim.getWidth();
+ }
+ height += subActivityDim.getHeight();
+ }
+
+ height += getYSpacing() + getStartIconHeight();
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+ }
+
+ return dimensions;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (dimensions.getWidth() / 2);
+ int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
+ int childXLeft = startXLeft;
+ while (itr.hasNext()) {
+ activity = itr.next();
+ childXLeft = centreOfMyLayout - activity.getDimensions().getWidth() / 2;
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+
+ }
+
+ public void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = startXLeft + (getYSpacing() / 2);
+ int yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop;
+ int childXLeft = xLeft + getStartIconWidth() + (getYSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+ childYTop = centreOfMyLayout - (activity.getDimensions().getHeight() / 2);
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+
+ }
+
+ @Override
+ public SVGCoordinates getEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+ } else {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop();
+
+ }
+
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ SVGCoordinates coords = getStartIconExitArrowCoords();
+
+ if (subActivities != null && subActivities.size() > 0) {
+ ActivityInterface activity = subActivities.get(subActivities.size() - 1);
+ coords = activity.getExitArrowCoords();
+ }
+ return coords;
+ }
+
+ protected SVGCoordinates getStartIconExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop() + getStartIconHeight();
+ } else {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ public SVGCoordinates getNextElseExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+ } else {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop() + getStartIconHeight();
+
+ }
+
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ public Element getSVGString(SVGDocument doc) {
+
+ Element group1 = null;
+ group1 = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group1.setAttributeNS(null, "id", getLayerId());
+ if (isAddOpacity()) {
+ group1.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ }
+ group1.appendChild(getBoxDefinition(doc));
+ group1.appendChild(getImageDefinition(doc));
+ //Get sub activities
+ group1.appendChild(getSubActivitiesSVGString(doc));
+ group1.appendChild(getArrows(doc));
+
+ return group1;
+ }
+
+ protected Element getArrows(SVGDocument doc) {
+ if (subActivities != null) {
+ ActivityInterface prevActivity = null;
+ ActivityInterface activity = null;
+ String id = null;
+ SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
+ SVGCoordinates exitCoords = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates entryCoords = null;
+ Iterator<ActivityInterface> itr = subActivities.iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (prevActivity != null) {
+ exitCoords = prevActivity.getExitArrowCoords();
+ entryCoords = activity.getEntryArrowCoords();
+ id = prevActivity.getId() + "-" + activity.getId();
+ return getArrowDefinition(doc, exitCoords.getXLeft(), exitCoords.getYTop(), entryCoords.getXLeft(), entryCoords.getYTop(), id);
+ } else {
+ entryCoords = activity.getExitArrowCoords();
+ return getArrowDefinition(doc, myStartCoords.getXLeft(), myStartCoords.getYTop(), entryCoords.getXLeft(), entryCoords.getYTop(), id);
+ }
+ }
+
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ElseImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ElseImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ElseImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,40 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class ElseImpl extends SequenceImpl implements org.wso2.carbon.bpel.ui.bpel2svg.ElseInterface {
+ public ElseImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ElseImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ElseImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.ELSE_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/EventHandlerImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/EventHandlerImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/EventHandlerImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,237 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+public class EventHandlerImpl extends ActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.EventHandlerInterface {
+
+ public EventHandlerImpl(String token) {
+ super(token);
+ if (name == null) {
+ name = "EVENTHANDLER" + System.currentTimeMillis();
+ }
+ displayName = "Event Handlers";
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public EventHandlerImpl(OMElement omElement) {
+ super(omElement);
+ if (name == null) {
+ name = "EVENTHANDLER" + System.currentTimeMillis();
+ }
+ displayName = "Event Handlers";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public EventHandlerImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ if (name == null) {
+ name = "EVENTHANDLER" + System.currentTimeMillis();
+ }
+ displayName = "Event Handlers";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ @Override
+ public String getId() {
+ return getName(); // + "-EventHandler";
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.EVENTHANDLER_END_TAG;
+ }
+
+ @Override
+ public SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ dimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(width, height);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension subActivityDim = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (subActivityDim.getHeight() > height) {
+ height += subActivityDim.getHeight();
+ }
+ width += subActivityDim.getWidth();
+ }
+
+ height += getYSpacing();
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+ }
+
+ return dimensions;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (dimensions.getWidth() / 2);
+ int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+ int endXLeft = centreOfMyLayout - (getEndIconWidth() / 2);
+ int endYTop = startYTop + dimensions.getHeight() - getEndIconHeight() - (getYSpacing() / 2);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = startYTop + (getYSpacing() / 2);
+ int childXLeft = startXLeft + (getXSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+// childYTop += centreOfMyLayout - (activity.getDimensions().getHeight() / 2);
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ private void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = startXLeft + (getYSpacing() / 2);
+ int yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+ int endXLeft = startXLeft + dimensions.getWidth() - getEndIconWidth() - (getYSpacing() / 2);
+ int endYTop = centreOfMyLayout - (getEndIconHeight() / 2);
+
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childXLeft = startXLeft + (getYSpacing() / 2);
+ int childYTop = startYTop + (getXSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+// childXLeft = centreOfMyLayout - activity.getDimensions().getWidth() / 2;
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ @Override
+ public SVGCoordinates getEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getDimensions().getXLeft() + (getDimensions().getWidth() / 2);
+ yTop = getDimensions().getYTop() + BOX_MARGIN;
+ } else {
+ xLeft = getDimensions().getXLeft() + BOX_MARGIN;
+ yTop = getDimensions().getYTop() + (getDimensions().getHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop() + getEndIconHeight();
+ } else {
+ xLeft = getEndIconXLeft() + getEndIconWidth();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public Element getSVGString(SVGDocument doc) {
+ Element group = null;
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", getLayerId());
+ // Check if Layer & Opacity required
+ if (isAddOpacity()) {
+ group.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ }
+ group.appendChild(getBoxDefinition(doc));
+ group.appendChild(getImageDefinition(doc));
+ group.appendChild(getStartImageText(doc));
+ // Process Sub Activities
+ group.appendChild(getSubActivitiesSVGString(doc));
+ group.appendChild(getEndImageDefinition(doc));
+ //Add Arrow
+ //group.appendChild(getArrows()); attention - this has no implementaion
+ return group;
+ }
+
+ protected String getArrows() {
+ StringBuffer svgSB = new StringBuffer();
+ return svgSB.toString();
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ExitImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ExitImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ExitImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,40 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ExitInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+
+public class ExitImpl extends SimpleActivityImpl implements ExitInterface {
+ public ExitImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ExitImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ExitImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.EXIT_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/FaultHandlerImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/FaultHandlerImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/FaultHandlerImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,57 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class FaultHandlerImpl extends EventHandlerImpl implements org.wso2.carbon.bpel.ui.bpel2svg.FaultHandlerInterface {
+
+ public FaultHandlerImpl(String token) {
+ super(token);
+
+ if (name == null) {
+ name = "FAULTHANDLER" + System.currentTimeMillis();
+ }
+ displayName = "Fault Handlers";
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public FaultHandlerImpl(OMElement omElement) {
+ super(omElement);
+
+ if (name == null) {
+ name = "FAULTHANDLER" + System.currentTimeMillis();
+ }
+ displayName = "Fault Handlers";
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public FaultHandlerImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ if (name == null) {
+ name = "FAULTHANDLER" + System.currentTimeMillis();
+ }
+ displayName = "Fault Handlers";
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.FAULTHANDLER_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/FlowImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/FlowImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/FlowImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,348 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+public class FlowImpl extends ActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.FlowInterface {
+ public FlowImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public FlowImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public FlowImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+
+ // setVerticalChildLayout(false);
+ }
+
+ @Override
+ public String getId() {
+ return getName(); // + "-Flow";
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.FLOW_END_TAG;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ dimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(width, height);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension subActivityDim = null;
+ ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (subActivityDim.getHeight() > height) {
+ height += subActivityDim.getHeight();
+ }
+ width += subActivityDim.getWidth();
+ }
+
+ height += (getYSpacing() * 2) + getStartIconHeight() + getEndIconHeight();
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+ }
+
+ return dimensions;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (dimensions.getWidth() / 2);
+ int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+ int endXLeft = centreOfMyLayout - (getEndIconWidth() / 2);
+ int endYTop = startYTop + dimensions.getHeight() - getEndIconHeight() - (getYSpacing() / 2);
+
+ ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
+ int childXLeft = startXLeft + (getXSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+// childYTop += centreOfMyLayout - (activity.getDimensions().getHeight() / 2);
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ private void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = startXLeft + (getYSpacing() / 2);
+ int yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+ int endXLeft = startXLeft + dimensions.getWidth() - getEndIconWidth() - (getYSpacing() / 2);
+ int endYTop = centreOfMyLayout - (getEndIconHeight() / 2);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childXLeft = xLeft + getStartIconWidth() + (getYSpacing() / 2);
+ int childYTop = startYTop + (getXSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+// childXLeft = centreOfMyLayout - activity.getDimensions().getWidth() / 2;
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ @Override
+ public SVGCoordinates getEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop();
+ } else {
+ xLeft = getStartIconXLeft();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public SVGCoordinates getExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop() + getEndIconHeight();
+ } else {
+ xLeft = getEndIconXLeft() + getEndIconWidth();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected SVGCoordinates getStartIconExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop() + getStartIconHeight();
+ } else {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected SVGCoordinates getEndIconEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop();
+ } else {
+ xLeft = getEndIconXLeft();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public Element getSVGString(SVGDocument doc) {
+ Element group = null;
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", getLayerId());
+ // Check if Layer & Opacity required
+ if (isAddOpacity()) {
+ group.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ }
+ group.appendChild(getBoxDefinition(doc));
+ group.appendChild(getImageDefinition(doc));
+ group.appendChild(getStartImageText(doc));
+ // Process Sub Activities
+ group.appendChild(getSubActivitiesSVGString(doc));
+ group.appendChild(getEndImageDefinition(doc));
+ //Add Arrow
+ group.appendChild(getArrows(doc));
+
+ return group;
+
+ }
+
+ protected Element getArrows(SVGDocument doc) {
+ Element subGroup = null;
+ subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+
+ //the below code segment is commented inorder to have the Arrow style of Flow
+ /*if (subActivities != null) {
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ String id = null;
+ SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
+ SVGCoordinates myExitCoords = getEndIconEntryArrowCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates activityExitCoords = null;
+ SVGCoordinates activityEntryCoords = null;
+ Iterator<ActivityInterface> itr = subActivities.iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ activityExitCoords = activity.getExitArrowCoords();
+ activityEntryCoords = activity.getEntryArrowCoords();
+ subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(), myStartCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(), activityExitCoords.getYTop(), myExitCoords.getXLeft(), myExitCoords.getYTop(), id));
+ }
+ } */
+
+ //pls use a function to find the closest activity to the flow start
+ //as well as the closest activity to the flow end;
+ SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
+ SVGCoordinates myExitCoords = getEndIconEntryArrowCoords();
+
+ subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(), myStartCoords.getYTop(),
+ myStartCoords.getXLeft(), (myStartCoords.getYTop() + 30), "Flow_Top", true));
+ subGroup.appendChild(getArrowDefinition(doc, (myStartCoords.getXLeft() - dimensions.getWidth()/2 + getXSpacing()),
+ (myStartCoords.getYTop() + 30), (myStartCoords.getXLeft() + dimensions.getWidth()/2 - getXSpacing()),
+ (myStartCoords.getYTop() + 30), "Flow_TopH", true));
+ subGroup.appendChild(getArrowDefinition(doc, (myStartCoords.getXLeft() - dimensions.getWidth()/2 + getXSpacing()),
+ (myExitCoords.getYTop() - 20), (myStartCoords.getXLeft() + dimensions.getWidth()/2 - getXSpacing()),
+ (myExitCoords.getYTop() - 20), "Flow_DownH", true));
+ subGroup.appendChild(getArrowDefinition(doc, myExitCoords.getXLeft(), myExitCoords.getYTop() - 20,
+ myExitCoords.getXLeft(), myExitCoords.getYTop(), "Flow_Top", false));
+
+ return subGroup;
+ }
+
+ public Element getArrowDefinition(SVGDocument doc, int startX, int startY, int endX, int endY, String id, boolean to) { //here we have to find whether
+ Element path = doc.createElementNS("http://www.w3.org/2000/svg", "path");
+
+ if ((startX == endX) || (startY == endY)) {
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + endX + "," + endY);
+ }
+ else {
+ if (to) {
+ if(layoutManager.isVerticalLayout()){
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + startX + "," +
+ ((startY + 2 * endY) / 3) + " L " + endX + "," + ((startY + 2 * endY) / 3)); //use constants for these propotions
+ }else{
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + ((startX + 1* endX) / 2) +
+ "," + startY + " L " + ((startX + 1* endX) / 2) + "," + endY); //use constants for these propotions
+ }
+ }
+ else {
+ if(layoutManager.isVerticalLayout()){
+ path.setAttributeNS(null, "d", "M " + startX + "," + ((startY + 2 * endY) / 3) + " L " + endX + "," + ((startY + 2 * endY) / 3) + " L " + endX + "," + endY); //use constants for these propotions
+ }else{
+ path.setAttributeNS(null, "d", "M " + ((startX + 1* endX) / 2) + "," + startY + " L " + ((startX + 1* endX) / 2) + "," + endY + " L " + endX + "," + endY); //use constants for these propotions
+ }
+
+ }
+ }
+ path.setAttributeNS(null, "id", id);
+ path.setAttributeNS(null, "style", getArrowStyle(to));
+ return path;
+ }
+
+ private String getArrowStyle(boolean to) {
+ if (to) {
+ String largeArrowStr = "fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1";
+ String mediumArrowStr = "fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1";
+
+ if (isLargeArrow()) {
+ return largeArrowStr;
+ } else {
+ return mediumArrowStr;
+ }
+ }
+ else {
+ String largeArrowStr = "fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1";
+ String mediumArrowStr = "fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0;stroke-linecap:butt;stroke-linejoin:round;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1";
+
+ if (isLargeArrow()) {
+ return largeArrowStr;
+ } else {
+ return mediumArrowStr;
+ }
+ }
+
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ForEachImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ForEachImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ForEachImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,273 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+
+public class ForEachImpl extends ActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.ForEachInterface {
+ public ForEachImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ // setVerticalChildLayout(false);
+ }
+
+ public ForEachImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ // setVerticalChildLayout(false);
+ }
+
+ public ForEachImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getId() {
+ return getName() + "-ForEach";
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.FOREACH_END_TAG;
+ }
+
+ @Override
+ public SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ dimensions = new SVGDimension(width, height);
+
+ SVGDimension subActivityDim = null;
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (subActivityDim.getWidth() > width) {
+ width += subActivityDim.getWidth();
+ }
+ height += subActivityDim.getHeight();
+ }
+
+ height += ((getYSpacing() * 2) + getStartIconHeight() + getEndIconHeight());
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+ }
+ return dimensions;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (dimensions.getWidth() / 2);
+ int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+ int endXLeft = centreOfMyLayout - (getEndIconWidth() / 2);
+ int endYTop = startYTop + dimensions.getHeight() - getEndIconHeight() - (getYSpacing() / 2);
+
+ ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
+ int childXLeft = startXLeft + (getXSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+ //childXLeft = centreOfMyLayout - activity.getDimensions().getWidth() / 2;
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ private void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = startXLeft + (getYSpacing() / 2);
+ int yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+ int endXLeft = startXLeft + dimensions.getWidth() - getEndIconWidth() - (getYSpacing() / 2);
+ int endYTop = centreOfMyLayout - (getEndIconHeight() / 2);
+
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childXLeft = xLeft + getStartIconWidth() + (getYSpacing() / 2);
+ int childYTop = startYTop + (getXSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+ //childYTop += centreOfMyLayout - (activity.getDimensions().getHeight() / 2);
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ @Override
+ public SVGCoordinates getEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop();
+ } else {
+ xLeft = getStartIconXLeft();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop() + getEndIconHeight();
+ } else {
+ xLeft = getEndIconXLeft() + getEndIconWidth();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected SVGCoordinates getStartIconExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop() + getStartIconHeight();
+ } else {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getEndIconEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop();
+ } else {
+ xLeft = getEndIconXLeft();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public Element getSVGString(SVGDocument doc) {
+ Element group = null;
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", getLayerId());
+ if (isAddOpacity()) {
+ group.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ }
+ group.appendChild(getBoxDefinition(doc));
+ group.appendChild(getImageDefinition(doc));
+ group.appendChild(getStartImageText(doc));
+ // Process Sub Activities
+ group.appendChild(getSubActivitiesSVGString(doc));
+ group.appendChild(getEndImageDefinition(doc));
+ //Add Arrow
+ group.appendChild(getArrows(doc));
+
+ return group;
+ }
+
+ protected Element getArrows(SVGDocument doc) {
+ Element subGroup = null;
+ subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ if (subActivities != null) {
+ ActivityInterface activity = null;
+ String id = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myExitCoords = getEndIconEntryArrowCoords();
+ SVGCoordinates activityExitCoords = null;
+ SVGCoordinates activityEntryCoords = null;
+ Iterator<ActivityInterface> itr = subActivities.iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ activityExitCoords = activity.getExitArrowCoords();
+ activityEntryCoords = activity.getEntryArrowCoords();
+ subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(), myStartCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(), activityExitCoords.getYTop(), myExitCoords.getXLeft(), myExitCoords.getYTop(), id));
+ }
+ }
+ return subGroup;
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/IfImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/IfImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/IfImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,470 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ElseIfInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.IfInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+
+public class IfImpl extends ActivityImpl implements IfInterface {
+
+ private org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension coreDimensions = null;
+ private org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension conditionalDimensions = null;
+
+ public IfImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public IfImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public IfImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+
+ setVerticalChildLayout(false);
+ }
+
+ protected int getElseIfAdjustment() {
+ int adjustment = 0;
+ if (layoutManager.isVerticalLayout()) {
+ adjustment = getStartIconHeight() + getYSpacing();
+ } else {
+ adjustment = getStartIconWidth() + getYSpacing();
+ }
+
+ return adjustment;
+ }
+
+ @Override
+ public String getId() {
+ return getName(); // + "-If";
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.IF_END_TAG;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ int coreWidth = 0;
+ int coreHeight = 0;
+ int conWidth = 0;
+ int conHeight = 0;
+ dimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(coreWidth, coreHeight);
+ coreDimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(coreWidth, coreHeight);
+ conditionalDimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(conWidth, conHeight);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension subActivityDim = null;
+ ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (activity instanceof ElseIfImpl || activity instanceof ElseImpl) {
+ if (subActivityDim.getHeight() > conHeight) {
+ conHeight += subActivityDim.getHeight();
+ }
+ conWidth += subActivityDim.getWidth();
+ } else {
+ if (subActivityDim.getWidth() > coreWidth) {
+ coreWidth += subActivityDim.getWidth();
+ }
+ coreHeight += subActivityDim.getHeight();
+ }
+ }
+
+ coreHeight += getYSpacing() + getStartIconHeight() + getEndIconHeight();
+ conHeight += getElseIfAdjustment();
+
+ coreDimensions.setHeight(coreHeight);
+ coreDimensions.setWidth(coreWidth);
+
+ conditionalDimensions.setHeight(conHeight);
+ conditionalDimensions.setWidth(conWidth);
+
+ if (coreHeight > conHeight) {
+ height = coreHeight;
+ } else {
+ height = conHeight;
+ }
+ width = coreWidth + conWidth;
+
+// height += (getYSpacing() * 2) + getStartIconHeight() + getEndIconHeight();
+ height += getYSpacing();
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+ }
+
+ return dimensions;
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getCoreDimensions() {
+ return coreDimensions;
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getConditionalDimensions() {
+ return conditionalDimensions;
+ }
+
+ @Override
+ public void switchDimensionsToHorizontal() {
+ super.switchDimensionsToHorizontal();
+ int height = 0;
+ int width = 0;
+ // Switch Core Dimensions
+ height = coreDimensions.getHeight();
+ width = coreDimensions.getWidth();
+ coreDimensions.setHeight(width);
+ coreDimensions.setWidth(height);
+ // Switch Conditional Dimensions
+ height = conditionalDimensions.getHeight();
+ width = conditionalDimensions.getWidth();
+ conditionalDimensions.setHeight(width);
+ conditionalDimensions.setWidth(height);
+ }
+
+ private boolean isSimpleLayout() {
+ boolean simple = true;
+
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof ElseIfImpl || activity instanceof ElseImpl) {
+ simple = false;
+ break;
+ }
+ }
+
+ return simple;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (dimensions.getWidth() / 2);
+ int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+ int endXLeft = centreOfMyLayout - (getEndIconWidth() / 2);
+ int endYTop = startYTop + dimensions.getHeight() - getEndIconHeight() - (getYSpacing() / 2);
+ int centerNHLayout = startXLeft + (coreDimensions.getWidth() / 2);
+
+ if (isSimpleLayout()) {
+ xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ endXLeft = centreOfMyLayout - (getEndIconWidth() / 2);
+ } else {
+ xLeft = centerNHLayout - (getStartIconWidth() / 2) + (getXSpacing() / 2);
+ endXLeft = centerNHLayout - (getEndIconWidth() / 2) + (getXSpacing() / 2);
+ }
+
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+
+ int childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
+ int childXLeft = startXLeft + (getXSpacing() / 2);
+
+ // Process None Handlers First
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof ElseIfImpl || activity instanceof ElseImpl) {
+ // Ignore
+ } else {
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+ }
+ // Process Handlers
+ itr = getSubActivities().iterator();
+ childXLeft = startXLeft + coreDimensions.getWidth();
+ childYTop = yTop + getElseIfAdjustment();
+
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof ElseIfImpl || activity instanceof ElseImpl) {
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ private void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = startXLeft + (getYSpacing() / 2);
+ int yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+ int endXLeft = startXLeft + dimensions.getWidth() - getEndIconWidth() - (getYSpacing() / 2);
+ int endYTop = centreOfMyLayout - (getEndIconHeight() / 2);
+ int centerNHLayout = startYTop + (coreDimensions.getHeight() / 2);
+
+ if (isSimpleLayout()) {
+ yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+ endYTop = centreOfMyLayout - (getEndIconHeight() / 2);
+ } else {
+ yTop = centerNHLayout - (getStartIconHeight() / 2);
+ endYTop = centerNHLayout - (getEndIconHeight() / 2);
+ }
+
+ ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+
+ int childXLeft = xLeft + getStartIconWidth() + (getYSpacing() / 2);
+ int childYTop = startYTop + (getXSpacing() / 2);
+
+ // Process None Handlers First
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof ElseIfImpl || activity instanceof ElseImpl) {
+ // Ignore
+ } else {
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+ }
+ // Process Handlers
+ itr = getSubActivities().iterator();
+ childYTop = startYTop + coreDimensions.getHeight();
+ childXLeft = xLeft + getElseIfAdjustment();
+
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof ElseIfImpl || activity instanceof ElseImpl) {
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop();
+ } else {
+ xLeft = getStartIconXLeft();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public SVGCoordinates getExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop() + getEndIconHeight();
+ } else {
+ xLeft = getEndIconXLeft() + getEndIconWidth();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getStartIconExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop() + getStartIconHeight();
+ } else {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected SVGCoordinates getEndIconEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop();
+ } else {
+ xLeft = getEndIconXLeft();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getStartIconElseArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+ } else {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop() + getStartIconHeight();
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ public Element getSVGString(SVGDocument doc) {
+ Element group1 = null;
+ group1 = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group1.setAttributeNS(null, "id", getLayerId());
+
+ if (isAddOpacity()) {
+ group1.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ }
+ group1.appendChild(getBoxDefinition(doc));
+ group1.appendChild(getImageDefinition(doc));
+ group1.appendChild(getStartImageText(doc));
+ // Get Sub Activities
+ group1.appendChild(getSubActivitiesSVGString(doc));
+ group1.appendChild(getEndImageDefinition(doc));
+ // Add Arrow
+ group1.appendChild(getArrows(doc));
+
+ //attention - here group1 contain the box definition+ImageDefinition+etc... in the original
+ // but here group does not contain that
+
+ return group1;
+ }
+
+ protected Element getArrows(SVGDocument doc) {
+ if (subActivities != null) {
+ ActivityInterface prevActivity = null;
+ ActivityInterface prevElseActivity = null;
+ ActivityInterface activity = null;
+ String id = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myExitCoords = getEndIconEntryArrowCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartElseCoords = getStartIconElseArrowCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates activityEntryCoords = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates activityExitCoords = null;
+ Iterator<ActivityInterface> itr = subActivities.iterator();
+ Element subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ while (itr.hasNext()) {
+ activity = itr.next();
+ activityEntryCoords = activity.getEntryArrowCoords();
+ activityExitCoords = activity.getExitArrowCoords();
+
+ if (activity instanceof ElseIfImpl || activity instanceof ElseImpl) {
+ if (prevActivity != null && prevActivity instanceof ElseIfImpl) {
+ exitCoords = ((ElseIfInterface) prevActivity).getNextElseExitArrowCoords();
+// activityEntryCoords = activity.getEntryArrowCoords();
+ id = prevActivity.getId() + "-" + activity.getId();
+
+ subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(), exitCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(), activityExitCoords.getYTop(), myExitCoords.getXLeft(), myExitCoords.getYTop(), id));
+
+ } else {
+// activityEntryCoords = activity.getEntryArrowCoords();
+ subGroup.appendChild(getArrowDefinition(doc, myStartElseCoords.getXLeft(), myStartElseCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(), activityExitCoords.getYTop(), myExitCoords.getXLeft(), myExitCoords.getYTop(), id));
+
+ }
+ } else {
+ if (prevActivity != null) {
+ exitCoords = prevActivity.getExitArrowCoords();
+// activityEntryCoords = activity.getEntryArrowCoords();
+// activityExitCoords = activity.getExitArrowCoords();
+ id = prevActivity.getId() + "-" + activity.getId();
+ subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(), exitCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ } else {
+// activityEntryCoords = activity.getEntryArrowCoords();
+ subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(), myStartCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(), activityExitCoords.getYTop(), myExitCoords.getXLeft(), myExitCoords.getYTop(), id));
+
+ }
+ }
+
+ prevActivity = activity;
+ }
+ return subGroup;
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/InvokeImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/InvokeImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/InvokeImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,40 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.InvokeInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class InvokeImpl extends SimpleActivityImpl implements InvokeInterface {
+
+ public InvokeImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public InvokeImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public InvokeImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.INVOKE_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnAlarmImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnAlarmImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnAlarmImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,48 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class OnAlarmImpl extends OnMessageImpl implements org.wso2.carbon.bpel.ui.bpel2svg.OnAlarmInterface {
+
+ public OnAlarmImpl(String token) {
+ super(token);
+
+ name = "OnAlarm";
+ displayName = "onAlarm";
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public OnAlarmImpl(OMElement omElement) {
+ super(omElement);
+
+ name = "OnAlarm";
+ displayName = "onAlarm";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public OnAlarmImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ name = "OnAlarm";
+ displayName = "onAlarm";
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ONALARM_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnEventImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnEventImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnEventImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,49 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class OnEventImpl extends OnMessageImpl implements org.wso2.carbon.bpel.ui.bpel2svg.OnEventInterface {
+
+ public OnEventImpl(String token) {
+ super(token);
+
+ name = "OnEvent";
+ displayName = "onEvent";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public OnEventImpl(OMElement omElement) {
+ super(omElement);
+
+ name = "OnEvent";
+ displayName = "onEvent";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public OnEventImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+
+ name = "OnEvent";
+ displayName = "onEvent";
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ONEVENT_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnMessageImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnMessageImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/OnMessageImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,290 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+import javax.xml.namespace.QName;
+
+public class OnMessageImpl extends ActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.OnMessageInterface {
+
+ public OnMessageImpl(String token) {
+ String partnerLink = "";
+ String operation = "";
+ // Get Partner Link Name
+ int plIndex = token.indexOf("partnerLink");
+ int firstQuoteIndex = 0;
+ int lastQuoteIndex = 0;
+ if (plIndex >= 0) {
+ firstQuoteIndex = token.indexOf("\"", plIndex + 1);
+ if (firstQuoteIndex >= 0) {
+ lastQuoteIndex = token.indexOf("\"", firstQuoteIndex + 1);
+ if (lastQuoteIndex > firstQuoteIndex) {
+ partnerLink = token.substring(firstQuoteIndex + 1, lastQuoteIndex);
+ }
+ }
+ }
+ // Get Operation Name
+ int opIndex = token.indexOf("operation");
+ if (opIndex >= 0) {
+ firstQuoteIndex = token.indexOf("\"", opIndex + 1);
+ if (firstQuoteIndex >= 0) {
+ lastQuoteIndex = token.indexOf("\"", firstQuoteIndex + 1);
+ if (lastQuoteIndex > firstQuoteIndex) {
+ operation = token.substring(firstQuoteIndex + 1, lastQuoteIndex);
+ setDisplayName(operation);
+ }
+ }
+ }
+ setName(partnerLink + "." + operation);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public OnMessageImpl(OMElement omElement) {
+ super(omElement);
+
+ String partnerLink = null;
+ String operation = null;
+ // Get Partner Link Name
+ if (omElement.getAttribute(new QName("partnerLink")) != null)
+ partnerLink = new String(omElement.getAttribute(new QName("partnerLink")).getAttributeValue()); //attention- consider about namespace
+ if (omElement.getAttribute(new QName("operation")) != null)
+ operation = new String(omElement.getAttribute(new QName("operation")).getAttributeValue()); //attention- consider about namespace
+
+ setName(partnerLink + "." + operation);
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public OnMessageImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+
+ String partnerLink = null;
+ String operation = null;
+ // Get Partner Link Name
+ if (omElement.getAttribute(new QName("partnerLink")) != null)
+ partnerLink = new String(omElement.getAttribute(new QName("partnerLink")).getAttributeValue()); //attention- consider about namespace
+ if (omElement.getAttribute(new QName("operation")) != null)
+ operation = new String(omElement.getAttribute(new QName("operation")).getAttributeValue()); //attention- consider about namespace
+
+ setName(partnerLink + "." + operation);
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getId() {
+ return getName(); // + "-OnMessage";
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.ONMESSAGE_END_TAG;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ dimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(width, height);
+
+ SVGDimension subActivityDim = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (subActivityDim.getWidth() > width) {
+ width += subActivityDim.getWidth();
+ }
+ height += subActivityDim.getHeight();
+ }
+
+ height += getYSpacing() + getStartIconHeight() + (getYSpacing() / 2);
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+ }
+
+ return dimensions;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (dimensions.getWidth() / 2);
+ int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
+ int childXLeft = startXLeft;
+ while (itr.hasNext()) {
+ activity = itr.next();
+ childXLeft = centreOfMyLayout - activity.getDimensions().getWidth() / 2;
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+
+ }
+
+ public void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = startXLeft + (getYSpacing() / 2);
+ int yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop;
+ int childXLeft = xLeft + getStartIconWidth() + (getYSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+ childYTop = centreOfMyLayout - (activity.getDimensions().getHeight() / 2);
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+
+ }
+
+ @Override
+ public SVGCoordinates getEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop();
+ } else {
+ xLeft = getStartIconXLeft();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ SVGCoordinates coords = getStartIconExitArrowCoords();
+
+ if (subActivities != null && subActivities.size() > 0) {
+ ActivityInterface activity = subActivities.get(subActivities.size() - 1);
+ coords = activity.getExitArrowCoords();
+ }
+ return coords;
+ }
+
+ protected org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getStartIconExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop() + getStartIconHeight();
+ } else {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public Element getSVGString(SVGDocument doc) {
+ Element group = null;
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", getLayerId());
+ if (isAddOpacity()) {
+ group.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ }
+ group.appendChild(getBoxDefinition(doc));
+ group.appendChild(getImageDefinition(doc));
+ group.appendChild(getStartImageText(doc));
+ // Process Sub Activities
+ group.appendChild(getSubActivitiesSVGString(doc));
+ //Add Arrow
+ group.appendChild(getArrows(doc));
+
+ return group;
+ }
+
+ protected Element getArrows(SVGDocument doc) {
+ Element subGroup = null;
+ subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ if (subActivities != null) {
+ ActivityInterface prevActivity = null;
+ ActivityInterface activity = null;
+ String id = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = null;
+ SVGCoordinates entryCoords = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = subActivities.iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (prevActivity != null) {
+ exitCoords = prevActivity.getExitArrowCoords();
+ entryCoords = activity.getEntryArrowCoords();
+ id = prevActivity.getId() + "-" + activity.getId();
+ subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(), exitCoords.getYTop(), entryCoords.getXLeft(), entryCoords.getYTop(), id));
+ } else {
+ entryCoords = activity.getEntryArrowCoords();
+ subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(), myStartCoords.getYTop(), entryCoords.getXLeft(), entryCoords.getYTop(), id));
+ }
+ prevActivity = activity;
+ }
+ }
+ return subGroup;
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/PickImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/PickImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/PickImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,47 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.PickInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class PickImpl extends FlowImpl implements PickInterface {
+
+ public PickImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public PickImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ // Set Layout
+ setVerticalChildLayout(false);
+ }
+
+ public PickImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+
+ setVerticalChildLayout(false);
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.PICK_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ProcessImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ProcessImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ProcessImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,423 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.*;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.Map;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class ProcessImpl extends ActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface {
+ private Log log = LogFactory.getLog(ActivityImpl.class);
+
+ public ProcessImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ endIconHeight = startIconHeight;
+ endIconWidth = startIconWidth;
+ }
+
+ public ProcessImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ endIconHeight = startIconHeight;
+ endIconWidth = startIconWidth;
+ }
+
+ public ProcessImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ endIconHeight = startIconHeight;
+ endIconWidth = startIconWidth;
+ }
+
+ @Override
+ public String getId() {
+ return getName() + "-Process";
+ }
+
+ @Override
+ public Element getSVGString(SVGDocument document) {
+
+ LayoutManager layoutManager = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getLayoutManager();
+ // Build Specific Code
+ //attention--------- getSVGFileHeader();
+ doc = (SVGDocument) dom.createDocument(svgNS, "svg", null);
+ root = doc.getDocumentElement();
+ root.setAttributeNS(null, "height", "1000");
+ root.appendChild(getDefs(doc));
+ root.appendChild(getBoxDefinition(doc));
+ root.appendChild(getImageDefinition(doc));
+ // Process Sub Activities
+ root.appendChild(getSubActivitiesSVGString(doc));
+ root.appendChild(getEndImageDefinition(doc));
+ // Add Arrow
+ root.appendChild(getArrows(doc));
+ // Add End Tag
+ // getSCGFileFooter(); //this isn't used
+
+ return root;
+ }
+
+ public SVGDocument getSVGDocument() {
+ LayoutManager layoutManager = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getLayoutManager();
+ // Build Specific Code
+ //attention--------- getSVGFileHeader();
+ doc = (SVGDocument) dom.createDocument(svgNS, "svg", null);
+ root = doc.getDocumentElement();
+
+ int iHeight = getDimensions().getHeight();
+ int iWidth = getDimensions().getWidth();
+
+ root.setAttributeNS(null, "height", Integer.toString(iHeight));
+ root.setAttributeNS(null, "width", Integer.toString(iWidth));
+ root.appendChild(getDefs(doc));
+ root.appendChild(getBoxDefinition(doc));
+ root.appendChild(getImageDefinition(doc));
+ // Process Sub Activities
+ root.appendChild(getSubActivitiesSVGString(doc));
+ root.appendChild(getEndImageDefinition(doc));
+ // Add Arrow
+ root.appendChild(getArrows(doc));
+ root.appendChild(getLinkArrows(doc)); //waruna
+
+ // Add End Tag
+ // getSCGFileFooter(); //this isn't used
+
+ return doc; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ //the following method should be removed.It's auto completed by Batik. But width and height should be changed.
+ private String getSVGFileHeader() {
+ StringBuffer svgSB = new StringBuffer();
+ // Build Specific Code
+ svgSB.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
+ svgSB.append("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1 Tiny//EN\"\n\t\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd\">\n");
+ svgSB.append("<!-- Created with Oen ESB SVG Generator http://blogs.sun.com/toxophily/ -->\n");
+
+ svgSB.append("<svg\n");
+ svgSB.append("\txmlns=\"http://www.w3.org/2000/svg\"\n");
+// svgSB.append("\txmlns:svg=\"http://www.w3.org/2000/svg\"\n");
+ svgSB.append("\txmlns:xlink=\"http://www.w3.org/1999/xlink\"\n");
+// svgSB.append("\txmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n");
+ svgSB.append("\tversion=\"1.1\" baseProfile=\"tiny\"\n");
+ // TODO : Fix Sizing
+ svgSB.append("\twidth=\"" + dimensions.getWidth() * 2 + "\"\n");
+ svgSB.append("\theight=\"" + dimensions.getHeight() * 2 + "\"\n");
+ svgSB.append("\tid=\"" + getId() + "\">\n");
+
+ return svgSB.toString();
+ }
+
+ private String getSCGFileFooter() {
+ return "</svg>\n";
+ }
+
+ protected Element getDefs(SVGDocument doc) {
+ Element defs = doc.createElementNS("http://www.w3.org/2000/svg", "defs");
+ defs.setAttributeNS(null, "id", "defs4");
+
+ Element marker1 = doc.createElementNS("http://www.w3.org/2000/svg", "marker");
+ marker1.setAttributeNS(null, "refX", "0");
+ marker1.setAttributeNS(null, "refY", "0");
+ marker1.setAttributeNS(null, "orient", "auto");
+ marker1.setAttributeNS(null, "id", "Arrow1Lend");
+ marker1.setAttributeNS(null, "style", "overflow:visible");
+
+ Element path1 = doc.createElementNS("http://www.w3.org/2000/svg", "path");
+ path1.setAttributeNS(null, "d", "M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z");
+ path1.setAttributeNS(null, "transform", "matrix(-0.8,0,0,-0.8,-10,0)");
+ path1.setAttributeNS(null, "id", "path3166");
+ path1.setAttributeNS(null, "style", "fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none");
+
+ Element marker2 = doc.createElementNS("http://www.w3.org/2000/svg", "marker");
+ marker2.setAttributeNS(null, "refX", "0");
+ marker2.setAttributeNS(null, "refY", "0");
+ marker2.setAttributeNS(null, "orient", "auto");
+ marker2.setAttributeNS(null, "id", "Arrow1Mend");
+ marker2.setAttributeNS(null, "style", "overflow:visible");
+
+ Element path2 = doc.createElementNS("http://www.w3.org/2000/svg", "path");
+ path2.setAttributeNS(null, "d", "M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z");
+ path2.setAttributeNS(null, "transform", "matrix(-0.8,0,0,-0.8,-10,0)");
+ path2.setAttributeNS(null, "id", "path3193");
+ path2.setAttributeNS(null, "style", "fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none");
+
+ Element linkMarker = doc.createElementNS("http://www.w3.org/2000/svg", "marker");
+ linkMarker.setAttributeNS(null, "refX", "0");
+ linkMarker.setAttributeNS(null, "refY", "0");
+ linkMarker.setAttributeNS(null, "orient", "auto");
+ linkMarker.setAttributeNS(null, "id", "LinkArrow");
+ linkMarker.setAttributeNS(null, "style", "overflow:visible");
+
+ Element linkPath = doc.createElementNS("http://www.w3.org/2000/svg", "path");
+ // linkPath.setAttributeNS(null, "d", "M 0,0 L 2.5,-7.5 L -1,0 L 2.5,7.5 L 0,0 z");
+ linkPath.setAttributeNS(null, "d", "M -11.5,0 L -7,-7.5 L -12.5,0 L -7,7.5 L -11.5,0 z");
+ linkPath.setAttributeNS(null, "transform", "matrix(-0.8,0,0,-0.8,-10,0)");
+ linkPath.setAttributeNS(null, "id", "linkPath");
+ linkPath.setAttributeNS(null, "style", "fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none");
+
+ Element linearGradient = doc.createElementNS("http://www.w3.org/2000/svg", "linearGradient");
+ linearGradient.setAttributeNS(null, "id", "orange_red");
+ linearGradient.setAttributeNS(null, "x1" ,"0%");
+ linearGradient.setAttributeNS(null, "y1", "0%");
+ linearGradient.setAttributeNS(null, "x2" ,"0%");
+ linearGradient.setAttributeNS(null, "y2", "100%");
+
+ Element stop1 = doc.createElementNS("http://www.w3.org/2000/svg", "stop");
+ stop1.setAttributeNS(null, "offset", "0%");
+ stop1.setAttributeNS(null, "style", "stop-color:rgb(255,255,255);stop-opacity:1");
+
+ Element stop2 = doc.createElementNS("http://www.w3.org/2000/svg", "stop"); //these should be taken from the svg factory
+ stop2.setAttributeNS(null, "offset", "100%");
+ stop2.setAttributeNS(null, "style", "stop-color:rgb(0,0,255);stop-opacity:1"); //these should be taken from the svg factory
+
+ marker1.appendChild(path1);
+ marker2.appendChild(path2);
+ linkMarker.appendChild(linkPath);
+ defs.appendChild(marker1);
+ defs.appendChild(marker2);
+ defs.appendChild(linkMarker);
+ linearGradient.appendChild(stop1);
+ linearGradient.appendChild(stop2);
+ defs.appendChild(linearGradient);
+
+ return defs;
+
+ }
+
+ protected Element getArrows(SVGDocument doc) {
+ Element group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ if (subActivities != null) {
+ ActivityInterface startActivity = subActivities.get(0);
+ ActivityInterface endActivity = subActivities.get(subActivities.size() - 1);
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = getExitArrowCoords();
+ group.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(), exitCoords.getYTop(), startActivity.getEntryArrowCoords().getXLeft(), startActivity.getEntryArrowCoords().getYTop(), name));
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates entryCoords = getEndEntryArrowCoords();
+ group.appendChild(getArrowDefinition(doc, endActivity.getExitArrowCoords().getXLeft(), endActivity.getExitArrowCoords().getYTop(), entryCoords.getXLeft(), entryCoords.getYTop(), name));
+ }
+ return group;
+ }
+
+ private Element getLinkArrows(SVGDocument doc) {
+ Element group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ if (links != null && !links.isEmpty()) {
+ Set linksSet = links.entrySet();
+ Iterator linksIterator = linksSet.iterator();
+ while(linksIterator.hasNext()){
+ Map.Entry<String, Link> link = (Map.Entry<String, Link>)linksIterator.next();
+ ActivityInterface startActivity = link.getValue().getSource();
+ ActivityInterface endActivity = link.getValue().getTarget();
+ String linkName = link.getKey();
+ //Element pathGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ //group.setAttributeNS("xlink", "title", linkName);
+ group.appendChild(drawLink(doc, startActivity.getExitArrowCoords().getXLeft(),
+ startActivity.getExitArrowCoords().getYTop(), endActivity.getEntryArrowCoords().getXLeft(),
+ endActivity.getEntryArrowCoords().getYTop(), startActivity.getStartIconWidth(),
+ link.getKey(), linkName));
+ //group.appendChild(pathGroup);
+ }
+ }
+ return group;
+ }
+
+ private Element drawLink(SVGDocument doc, int startX, int startY, int endX, int endY, int startIconWidth, String id, String linkName)
+ {
+ Element path = doc.createElementNS("http://www.w3.org/2000/svg", "path");
+
+ int firstBend = 20;
+ if(layoutManager.isVerticalLayout()){
+ if (startY < endY) {
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + startX + "," + (startY + firstBend) +
+ " L " + startX + "," + (startY + firstBend) + " L " + endX + "," + (startY + firstBend) +
+ " L " + endX + "," + endY); //use constants for these propotions
+ }
+ else {
+ if (startX > endX) {
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + startX + "," + (startY + firstBend) +
+ " L " + (startX - (startIconWidth/2 + firstBend)) + "," + (startY + firstBend) + " L " +
+ (startX - (startIconWidth/2 + firstBend)) + "," + (endY - firstBend) + " L " + endX + "," + (endY - firstBend)+
+ " L " + endX + "," + endY); //use constants for these propotions
+ }
+ else {
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + startX + "," + (startY + firstBend) +
+ " L " + (startX + (startIconWidth/2 + firstBend)) + "," + (startY + firstBend) + " L " +
+ (startX + (startIconWidth/2 + firstBend)) + "," + (endY - firstBend) + " L " + endX + "," + (endY - firstBend)+
+ " L " + endX + "," + endY);
+ }
+ }
+
+ }else{
+ path.setAttributeNS(null, "d", "M " + startX + "," + startY + " L " + ((startX + 1* endX) / 2) + "," + startY + " L " + ((startX + 1* endX) / 2) + "," + endY + " L " + endX + "," + endY); //use constants for these propotions
+ }
+ path.setAttributeNS(null, "id", id);
+ path.setAttributeNS(null, "style", getLinkArrowStyle());
+ path.setAttributeNS("xlink", "title", linkName);
+ //path.setAttributeNS(null, "style", "opacity:" + getIconOpacity());
+ //path.setAttributeNS(null, "onmouseover", "this.style.opacity=1;this.filters.alpha.opacity=100");
+ //path.setAttributeNS(null, "onmouseout", "this.style.opacity=" + getIconOpacity() + ";this.filters.alpha.opacity=25");
+
+ path.setAttributeNS(null, "onmouseover", "this.style.opacity=1;this.filters.alpha.opacity=100");
+ path.setAttributeNS(null, "onmouseout", "this.style.opacity=" + getIconOpacity() + ";this.filters.alpha.opacity=100");
+ //path.setAttributeNS(null, "onload", "this.style.opacity=" + getIconOpacity() + ";this.filters.alpha.opacity=100");
+ // path.setAttributeNS(null, "onmousemove", "this.style.opacity=1;this.filters.alpha.opacity=100");
+
+ return path;
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.PROCESS_END_TAG;
+ }
+
+ @Override
+ public SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ dimensions = new SVGDimension(width, height);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension subActivityDim = null;
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ try {
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (subActivityDim.getWidth() > width) {
+ width += subActivityDim.getWidth();
+ }
+ height += subActivityDim.getHeight();
+ }
+ } catch (NoSuchElementException e) {
+ log.error("Invalid Element access", e);
+ //throw new Exception("Error in reading Dimensions", e);
+ }
+
+ height += ((getYSpacing() * 2) + getStartIconHeight() + getEndIconHeight());
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+
+ layoutManager.setSvgHeight(height);
+ layoutManager.setSvgWidth(width);
+
+ if (!layoutManager.isVerticalLayout()) {
+ switchDimensionsToHorizontal();
+ }
+ }
+ return dimensions;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (dimensions.getWidth() / 2);
+ int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+ int endXLeft = centreOfMyLayout - (getEndIconWidth() / 2);
+ int endYTop = startYTop + dimensions.getHeight() - getEndIconHeight() - (getYSpacing() / 2);
+
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
+ int childXLeft = startXLeft + (getXSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ getDimensions().setXLeft(startXLeft); //TODO why startXleft not Xleft?
+ getDimensions().setYTop(startYTop);
+ }
+
+ private void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = startXLeft + (getYSpacing() / 2);
+ int yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+ int endXLeft = startXLeft + dimensions.getWidth() - getEndIconWidth() - (getYSpacing() / 2);
+ int endYTop = centreOfMyLayout - (getEndIconHeight() / 2);
+
+ ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childXLeft = xLeft + getStartIconWidth() + (getYSpacing() / 2);
+ int childYTop = startYTop + (getXSpacing() / 2);
+ while (itr.hasNext()) {
+ activity = itr.next();
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ int xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ int yTop = getStartIconYTop() + getStartIconHeight();
+ if (!layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+ }
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+ return coords;
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getEndEntryArrowCoords() {
+ int xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ int yTop = getEndIconYTop();
+ if (!layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+ }
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+ return coords;
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReThrowImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReThrowImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReThrowImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,41 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ReThrowInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class ReThrowImpl extends SimpleActivityImpl implements ReThrowInterface {
+
+ public ReThrowImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ReThrowImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ReThrowImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.RETHROW_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReceiveImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReceiveImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReceiveImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,38 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ReceiveInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+
+public class ReceiveImpl extends SimpleActivityImpl implements ReceiveInterface {
+
+ public ReceiveImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ReceiveImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ReceiveImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.RECEIVE_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/RepeatUntilImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/RepeatUntilImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/RepeatUntilImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,40 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.apache.axiom.om.OMElement;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+
+public class RepeatUntilImpl extends ForEachImpl implements org.wso2.carbon.bpel.ui.bpel2svg.RepeatUntilInterface {
+
+ public RepeatUntilImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public RepeatUntilImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public RepeatUntilImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.REPEATUNTIL_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReplyImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReplyImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ReplyImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,37 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ReplyInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class ReplyImpl extends SimpleActivityImpl implements ReplyInterface {
+
+ public ReplyImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ReplyImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ReplyImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.REPLY_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SVGImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SVGImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SVGImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,124 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface;
+
+import java.io.*;
+
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.batik.dom.util.DOMUtilities;
+import org.apache.batik.transcoder.TranscoderInput;
+import org.apache.batik.transcoder.TranscoderOutput;
+import org.apache.batik.transcoder.TranscoderException;
+import org.apache.batik.transcoder.image.JPEGTranscoder;
+import org.apache.batik.util.SVGConstants;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SVGImpl implements org.wso2.carbon.bpel.ui.bpel2svg.SVGInterface {
+
+ private org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface rootActivity = null;
+ private Log log = LogFactory.getLog(SVGImpl.class);
+ private String svgStr = null;
+
+ private SVGDocument svgDoc = null;
+
+ public ProcessInterface getRootActivity() {
+ return rootActivity;
+ }
+
+ public void setRootActivity(org.wso2.carbon.bpel.ui.bpel2svg.ProcessInterface rootActivity) {
+ this.rootActivity = rootActivity;
+ }
+
+ /*
+ * Return the image as a SVG string
+ * */
+ public String generateSVGString() {
+ try {
+ StringWriter writer = new StringWriter();
+ SVGDocument svgDoc = getRootActivity().getSVGDocument();
+ this.svgDoc = svgDoc;
+
+ DOMUtilities.writeDocument(svgDoc, writer);
+ writer.close();
+ svgStr = writer.toString();
+ return svgStr;
+ } catch (IOException ioe) {
+ log.error("Error Generating SVG String", ioe);
+ return null;
+ }
+ }
+
+ /*
+ * Return the image as a base64 encoded string of a PNG
+ * */
+ public String toPNGBase64String() {
+ // Create a JPEG transcoder
+ JPEGTranscoder jpegTranscoder = new JPEGTranscoder();
+ // Set the transcoding hints.
+ jpegTranscoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, new Float(0.8));
+ // Create the transcoder input.
+ String inputString = getHeaders() + generateSVGString(); //svgDoc is set from generateSVGString()
+ TranscoderInput transcoderInput = new TranscoderInput(svgDoc);
+ Reader stringReader = new StringReader(inputString);
+ TranscoderInput transcoderInput2 = new TranscoderInput(stringReader);
+ // Create the transcoder output.
+ OutputStream osByteArray = new ByteArrayOutputStream();
+ TranscoderOutput transcoderOutput = new TranscoderOutput(osByteArray);
+ try {
+ jpegTranscoder.transcode(transcoderInput2, transcoderOutput);
+ } catch (TranscoderException e) {
+ log.error("JPEGTranscoder error", e);
+ return null;
+ }
+ try {
+ osByteArray.flush();
+ } catch (IOException e) {
+ log.error("Error while flushing OutputStreamByteArray", e);
+ return null;
+ }
+
+ String base64 = new String(Base64.encodeBase64(((ByteArrayOutputStream) osByteArray).toByteArray()));
+ return base64;
+ }
+
+ /*
+ * Return the image as a byte array of a PNG
+ * */
+ public byte[] toPNGBytes() {
+ // Create a JPEG transcoder
+ JPEGTranscoder jpegTranscoder = new JPEGTranscoder();
+ // Set the transcoding hints.
+ jpegTranscoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, new Float(0.8));
+ // Create the transcoder input.
+ String inputString = getHeaders() + generateSVGString(); //svgDoc is set from generateSVGString()
+ TranscoderInput transcoderInput = new TranscoderInput(svgDoc);
+ Reader stringReader = new StringReader(inputString);
+ TranscoderInput transcoderInput2 = new TranscoderInput(stringReader);
+ // Create the transcoder output.
+ OutputStream osByteArray = new ByteArrayOutputStream();
+ TranscoderOutput transcoderOutput = new TranscoderOutput(osByteArray);
+ try {
+ jpegTranscoder.transcode(transcoderInput2, transcoderOutput);
+ } catch (TranscoderException e) {
+ log.error("JPEGTranscoder transcode error", e);
+ return null;
+ }
+
+ try {
+ osByteArray.flush();
+ } catch (IOException e) {
+ log.error("Error while flushing OutputStreamByteArray", e);
+ return null;
+ }
+ return ((ByteArrayOutputStream) osByteArray).toByteArray();
+ }
+
+ public String getHeaders() {
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<!DOCTYPE svg PUBLIC '" +
+ SVGConstants.SVG_PUBLIC_ID + "' '" + SVGConstants.SVG_SYSTEM_ID + "'>\n\n";
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ScopeImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ScopeImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ScopeImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,639 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+public class ScopeImpl extends ActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.ScopeInterface {
+
+ private org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension coreDimensions = null;
+ private org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension conditionalDimensions = null;
+
+ public ScopeImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ScopeImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ScopeImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ private int handlerIconWidth = 16;
+ private int handlerIconHeight = 16;
+
+ public int getHandlerIconHeight() {
+ return handlerIconHeight;
+ }
+
+ public int getHandlerIconWidth() {
+ return handlerIconWidth;
+ }
+
+ public void setHandlerIconHeight(int handlerIconHeight) {
+ this.handlerIconHeight = handlerIconHeight;
+ }
+
+ public void setHandlerIconWidth(int handlerIconWidth) {
+ this.handlerIconWidth = handlerIconWidth;
+ }
+
+ protected int getHandlerConnectorSpacing() {
+ int spacing = 5;
+ return spacing;
+ }
+
+ protected int getHandlerAdjustment() {
+ int adjustment = 0;
+ if (layoutManager.isVerticalLayout()) {
+ adjustment = (getHandlerIconHeight() * 4) + (getHandlerConnectorSpacing() * 4);
+ } else {
+ adjustment = (getHandlerIconWidth() * 4) + (getHandlerConnectorSpacing() * 4);
+ }
+ return adjustment;
+ }
+
+ @Override
+ public String getId() {
+ return getName();
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.SCOPE_END_TAG;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ int coreWidth = 0;
+ int coreHeight = 0;
+ int conWidth = 0;
+ int conHeight = 0;
+ dimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(coreWidth, coreHeight);
+ coreDimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(coreWidth, coreHeight);
+ conditionalDimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(conWidth, conHeight);
+
+ SVGDimension subActivityDim = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
+ if (subActivityDim.getHeight() > conHeight) {
+ conHeight = subActivityDim.getHeight();
+ }
+ conWidth += subActivityDim.getWidth();
+ } else {
+ if (subActivityDim.getWidth() > coreWidth) {
+ coreWidth = subActivityDim.getWidth();
+ }
+ coreHeight += subActivityDim.getHeight();
+ }
+ }
+
+ coreHeight += getYSpacing() + getStartIconHeight() + getEndIconHeight();
+ if (!isSimpleLayout()) {
+ coreWidth += getXSpacing();
+ }
+ conHeight += getHandlerAdjustment();
+
+ coreDimensions.setHeight(coreHeight);
+ coreDimensions.setWidth(coreWidth);
+
+ conditionalDimensions.setHeight(conHeight);
+ conditionalDimensions.setWidth(conWidth);
+
+ if (coreHeight > conHeight) {
+ height = coreHeight;
+ } else {
+ height = conHeight;
+ }
+ width = coreWidth + conWidth;
+
+ height += getYSpacing();
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+ }
+
+ return dimensions;
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getCoreDimensions() {
+ return coreDimensions;
+ }
+
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension getConditionalDimensions() {
+ return conditionalDimensions;
+ }
+
+ @Override
+ public void switchDimensionsToHorizontal() {
+ super.switchDimensionsToHorizontal();
+ int height = 0;
+ int width = 0;
+ // Switch Core Dimensions
+ height = coreDimensions.getHeight();
+ width = coreDimensions.getWidth();
+ coreDimensions.setHeight(width);
+ coreDimensions.setWidth(height);
+ // Switch Conditional Dimensions
+ height = conditionalDimensions.getHeight();
+ width = conditionalDimensions.getWidth();
+ conditionalDimensions.setHeight(width);
+ conditionalDimensions.setWidth(height);
+ }
+
+ private boolean isSimpleLayout() {
+ boolean simple = true;
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
+ simple = false;
+ break;
+ }
+ }
+
+ return simple;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (getDimensions().getWidth() / 2);
+ int xLeft = 0;
+ int yTop = 0;
+ int endXLeft = 0;
+ int endYTop = 0;
+ int centerNHLayout = startXLeft + (getCoreDimensions().getWidth() / 2);
+
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ getCoreDimensions().setXLeft(startXLeft + (getXSpacing() / 2));
+ getCoreDimensions().setYTop(startYTop + (getYSpacing() / 2));
+
+ if (isSimpleLayout()) {
+ xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ yTop = startYTop + (getYSpacing() / 2);
+ endXLeft = centreOfMyLayout - (getEndIconWidth() / 2);
+ endYTop = startYTop + getDimensions().getHeight() - getEndIconHeight() - (getYSpacing() / 2);
+ } else {
+ xLeft = centerNHLayout - (getStartIconWidth() / 2) + (getXSpacing() / 2);
+ yTop = getCoreDimensions().getYTop() + (getYSpacing() / 2);
+ endXLeft = centerNHLayout - (getEndIconWidth() / 2) + (getXSpacing() / 2);
+ endYTop = getCoreDimensions().getYTop() + getCoreDimensions().getHeight() - getEndIconHeight() - (getYSpacing() / 2);
+ }
+
+ ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+
+ int childYTop = 0;
+ int childXLeft = 0;
+
+ if (isSimpleLayout()) {
+ childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
+ childXLeft = startXLeft + (getXSpacing() / 2);
+ } else {
+ childYTop = getCoreDimensions().getYTop() + getStartIconHeight() + (getYSpacing() / 2);
+ childXLeft = getCoreDimensions().getXLeft() + (getXSpacing() / 2);
+ }
+
+ // Process None Handlers First
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
+ // Ignore
+ } else {
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+ }
+ // Process Handlers
+ itr = getSubActivities().iterator();
+ childXLeft = startXLeft + getCoreDimensions().getWidth();
+ childYTop = yTop + getHandlerAdjustment();
+
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + BPEL2SVGFactory.TEXT_ADJUST);
+ }
+
+ private void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = 0;
+ int yTop = 0;
+ int endXLeft = 0;
+ int endYTop = 0;
+ int centerNHLayout = startYTop + (coreDimensions.getHeight() / 2);
+
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ getCoreDimensions().setXLeft(startXLeft + (getXSpacing() / 2));
+ getCoreDimensions().setYTop(startYTop + (getYSpacing() / 2));
+
+ if (isSimpleLayout()) {
+ yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+ xLeft = startXLeft + (getYSpacing() / 2);
+ endYTop = centreOfMyLayout - (getEndIconHeight() / 2);
+ endXLeft = getCoreDimensions().getXLeft() + getCoreDimensions().getWidth() - getEndIconWidth() - (getXSpacing() / 2);
+ } else {
+ yTop = centerNHLayout - (getStartIconHeight() / 2) + (getYSpacing() / 2);
+ xLeft = getCoreDimensions().getXLeft() + (getXSpacing() / 2);
+ endYTop = centerNHLayout - (getEndIconHeight() / 2) + (getYSpacing() / 2);
+ endXLeft = getCoreDimensions().getXLeft() + getCoreDimensions().getWidth() - getEndIconWidth() - (getXSpacing() / 2);
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+
+ int childXLeft = 0;
+ int childYTop = 0;
+
+ if (isSimpleLayout()) {
+ childXLeft = xLeft + getStartIconWidth() + (getYSpacing() / 2);
+ childYTop = startYTop + (getXSpacing() / 2);
+ } else {
+ childXLeft = getCoreDimensions().getXLeft() + getStartIconWidth() + (getYSpacing() / 2);
+ childYTop = getCoreDimensions().getYTop() + (getXSpacing() / 2);
+ }
+
+ // Process None Handlers First
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
+ // Ignore
+ } else {
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+ }
+ // Process Handlers
+ itr = getSubActivities().iterator();
+ childYTop = startYTop + getCoreDimensions().getHeight() + (getYSpacing() / 2);
+ childXLeft = xLeft + getHandlerAdjustment();
+
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+ }
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setEndIconXLeft(endXLeft);
+ setEndIconYTop(endYTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + BPEL2SVGFactory.TEXT_ADJUST);
+ }
+
+ @Override
+ public SVGCoordinates getEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop();
+ } else {
+ xLeft = getStartIconXLeft();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop() + getEndIconHeight();
+ } else {
+ xLeft = getEndIconXLeft() + getEndIconWidth();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected SVGCoordinates getStartIconExitArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ yTop = getStartIconYTop() + getStartIconHeight();
+ } else {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+
+ }
+
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getEndIconEntryArrowCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
+ yTop = getEndIconYTop();
+ } else {
+ xLeft = getEndIconXLeft();
+ yTop = getEndIconYTop() + (getEndIconHeight() / 2);
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected SVGCoordinates getStartEventCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getCoreDimensions().getXLeft() + getCoreDimensions().getWidth();
+ yTop = getCoreDimensions().getYTop() + getHandlerConnectorSpacing() + (getYSpacing() / 2);
+ } else {
+ xLeft = getCoreDimensions().getXLeft() + getHandlerConnectorSpacing() + (getYSpacing() / 2);
+ yTop = getCoreDimensions().getYTop() + getCoreDimensions().getHeight();
+
+ }
+
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getStartTerminationCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getCoreDimensions().getXLeft() + getCoreDimensions().getWidth();
+ yTop = getCoreDimensions().getYTop() + getHandlerIconHeight() + (getHandlerConnectorSpacing() * 2) + (getYSpacing() / 2);
+ } else {
+ xLeft = getCoreDimensions().getXLeft() + getHandlerIconWidth() + (getHandlerConnectorSpacing() * 2) + (getYSpacing() / 2);
+ yTop = getCoreDimensions().getYTop() + getCoreDimensions().getHeight();
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected SVGCoordinates getStartCompensationCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getCoreDimensions().getXLeft() + getCoreDimensions().getWidth();
+ yTop = getCoreDimensions().getYTop() + (getHandlerIconHeight() * 2) + (getHandlerConnectorSpacing() * 3) + (getYSpacing() / 2);
+ } else {
+ xLeft = getCoreDimensions().getXLeft() + (getHandlerIconWidth() * 2) + (getHandlerConnectorSpacing() * 3) + (getYSpacing() / 2);
+ yTop = getCoreDimensions().getYTop() + getCoreDimensions().getHeight();
+
+ }
+
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ protected SVGCoordinates getStartFaultCoords() {
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = getCoreDimensions().getXLeft() + getCoreDimensions().getWidth();
+ yTop = getCoreDimensions().getYTop() + (getHandlerIconHeight() * 3) + (getHandlerConnectorSpacing() * 4) + (getYSpacing() / 2);
+ } else {
+ xLeft = getCoreDimensions().getXLeft() + (getHandlerIconWidth() * 3) + (getHandlerConnectorSpacing() * 4) + (getYSpacing() / 2);
+ yTop = getCoreDimensions().getYTop() + getCoreDimensions().getHeight();
+
+ }
+
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+
+ return coords;
+ }
+
+ @Override
+ public Element getSVGString(SVGDocument doc) {
+ Element group = null;
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", getLayerId());
+ if (isAddOpacity()) {
+ group.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ }
+
+ group.appendChild(getBoxDefinition(doc));
+ group.appendChild(getImageDefinition(doc));
+ if (!isSimpleLayout()) {
+ group.appendChild(getEventHandlerIcon(doc));
+ group.appendChild(getCompensationHandlerIcon(doc));
+ group.appendChild(getFaultHandlerIcon(doc));
+ group.appendChild(getTerminationHandlerIcon(doc));
+ }
+ // Get Sub Activities
+ group.appendChild(getSubActivitiesSVGString(doc));
+ group.appendChild(getEndImageDefinition(doc));
+ //Add Arrow
+ group.appendChild(getArrows(doc));
+ //attention - here group1 contain the box definition+ImageDefinition+etc... in the original
+ // but here group does not contain that
+ return group;
+ }
+
+ protected Element getArrows(SVGDocument doc) {
+ if (subActivities != null) {
+ Element subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface prevActivity = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ String id = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myExitCoords = getEndIconEntryArrowCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartEventCoords = getStartEventCoords();
+ SVGCoordinates myStartTerminationCoords = getStartTerminationCoords();
+ SVGCoordinates myStartCompensationCoords = getStartCompensationCoords();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartFaultCoords = getStartFaultCoords();
+ SVGCoordinates activityEntryCoords = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates activityExitCoords = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = subActivities.iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ activityEntryCoords = activity.getEntryArrowCoords();
+ activityExitCoords = activity.getExitArrowCoords();
+ id = getId() + "-" + activity.getId();
+ if (activity instanceof FaultHandlerImpl) {
+ subGroup.appendChild(getArrowDefinition(doc, myStartFaultCoords.getXLeft(), myStartFaultCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ } else if (activity instanceof TerminationHandlerImpl) {
+ subGroup.appendChild(getArrowDefinition(doc, myStartTerminationCoords.getXLeft(), myStartTerminationCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ } else if (activity instanceof CompensationHandlerImpl) {
+ subGroup.appendChild(getArrowDefinition(doc, myStartCompensationCoords.getXLeft(), myStartCompensationCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ } else if (activity instanceof EventHandlerImpl) {
+ subGroup.appendChild(getArrowDefinition(doc, myStartEventCoords.getXLeft(), myStartEventCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ } else {
+ subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(), myStartCoords.getYTop(), activityEntryCoords.getXLeft(), activityEntryCoords.getYTop(), id));
+ subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(), activityExitCoords.getYTop(), myExitCoords.getXLeft(), myExitCoords.getYTop(), id));
+ }
+ prevActivity = activity;
+ }
+ return subGroup;
+ }
+ return null;
+ }
+
+
+ @Override
+
+ protected Element getBoxDefinition(SVGDocument doc) {
+ if (isSimpleLayout()) {
+ return super.getBoxDefinition(doc);
+ } else {
+ return getBoxDefinition(doc, getCoreDimensions().getXLeft() + BOX_MARGIN, getCoreDimensions().getYTop() + BOX_MARGIN, getCoreDimensions().getWidth() - (BOX_MARGIN * 2), getCoreDimensions().getHeight() - (BOX_MARGIN * 2), getBoxId());
+ }
+ }
+
+ @Override
+ protected Element getStartImageText(SVGDocument doc) {
+ if (isSimpleLayout()) {
+ return getImageText(doc, getDimensions().getXLeft(), getDimensions().getYTop(), getStartIconWidth(), getStartIconHeight(), getStartImageTextId(), getDisplayName());
+ } else {
+ return getImageText(doc, getCoreDimensions().getXLeft(), getCoreDimensions().getYTop(), getStartIconWidth(), getStartIconHeight(), getStartImageTextId(), getDisplayName());
+ }
+ }
+
+ public Element getTerminationHandlerIcon(SVGDocument doc) {
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = getStartTerminationCoords();
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = coords.getXLeft() - getHandlerIconWidth();
+ yTop = coords.getYTop() - (getHandlerIconHeight() / 2);
+ } else {
+ xLeft = coords.getXLeft() - (getHandlerIconWidth() / 2);
+ yTop = coords.getYTop() - getHandlerIconHeight();
+ }
+ String iconPath = BPEL2SVGFactory.getInstance().getIconSource() + "/scopeterminationhandler" + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconExtension();
+
+ return getImageDefinition(doc, iconPath, xLeft, yTop, getHandlerIconWidth(), getHandlerIconHeight(), getId());
+ }
+
+ public Element getFaultHandlerIcon(SVGDocument doc) {
+ SVGCoordinates coords = getStartFaultCoords();
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = coords.getXLeft() - getHandlerIconWidth();
+ yTop = coords.getYTop() - (getHandlerIconHeight() / 2);
+ } else {
+ xLeft = coords.getXLeft() - (getHandlerIconWidth() / 2);
+ yTop = coords.getYTop() - getHandlerIconHeight();
+ }
+ String iconPath = BPEL2SVGFactory.getInstance().getIconSource() + "/scopefaulthandler" + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconExtension();
+
+ return getImageDefinition(doc, iconPath, xLeft, yTop, getHandlerIconWidth(), getHandlerIconHeight(), getId());
+ }
+
+ public Element getCompensationHandlerIcon(SVGDocument doc) {
+ SVGCoordinates coords = getStartCompensationCoords();
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = coords.getXLeft() - getHandlerIconWidth();
+ yTop = coords.getYTop() - (getHandlerIconHeight() / 2);
+ } else {
+ xLeft = coords.getXLeft() - (getHandlerIconWidth() / 2);
+ yTop = coords.getYTop() - getHandlerIconHeight();
+ }
+ String iconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconSource() + "/scopecompensationhandler" + BPEL2SVGFactory.getInstance().getIconExtension();
+
+ return getImageDefinition(doc, iconPath, xLeft, yTop, getHandlerIconWidth(), getHandlerIconHeight(), getId());
+ }
+
+ public Element getEventHandlerIcon(SVGDocument doc) {
+ SVGCoordinates coords = getStartEventCoords();
+ int xLeft = 0;
+ int yTop = 0;
+ if (layoutManager.isVerticalLayout()) {
+ xLeft = coords.getXLeft() - getHandlerIconWidth();
+ yTop = coords.getYTop() - (getHandlerIconHeight() / 2);
+ } else {
+ xLeft = coords.getXLeft() - (getHandlerIconWidth() / 2);
+ yTop = coords.getYTop() - getHandlerIconHeight();
+ }
+ String iconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconSource() + "/scopeeventhandler" + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconExtension();
+
+ return getImageDefinition(doc, iconPath, xLeft, yTop, getHandlerIconWidth(), getHandlerIconHeight(), getId());
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SequenceImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SequenceImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SequenceImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,244 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates;
+import org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension;
+import org.wso2.carbon.bpel.ui.bpel2svg.SequenceInterface;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+public class SequenceImpl extends ActivityImpl implements SequenceInterface {
+
+ public SequenceImpl(String token) {
+ super(token);
+ if (name == null) {
+ name = "SEQUENCE" + System.currentTimeMillis();
+ displayName = null;
+ }
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public SequenceImpl(OMElement omElement) {
+ super(omElement);
+ if (name == null) {
+ name = "SEQUENCE" + System.currentTimeMillis();
+ displayName = null;
+ }
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public SequenceImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ if (name == null) {
+ name = "SEQUENCE" + System.currentTimeMillis();
+ displayName = name;
+ }
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getId() {
+ return getName(); // + "-Sequence";
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SEQUENCE_END_TAG;
+ }
+
+ @Override
+ public SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = 0;
+ int height = 0;
+ dimensions = new SVGDimension(width, height);
+
+ SVGDimension subActivityDim = null;
+ ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ subActivityDim = activity.getDimensions();
+ if (subActivityDim.getWidth() > width) {
+ width += subActivityDim.getWidth();
+ }
+ height += subActivityDim.getHeight();
+ }
+
+ height += getYSpacing();
+ width += getXSpacing();
+
+ dimensions.setWidth(width);
+ dimensions.setHeight(height);
+ }
+
+ return dimensions;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startXLeft + (dimensions.getWidth() / 2);
+ int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop;
+ int childXLeft = startXLeft;
+ while (itr.hasNext()) {
+ activity = itr.next();
+ childXLeft = centreOfMyLayout - activity.getDimensions().getWidth() / 2;
+ activity.layout(childXLeft, childYTop);
+ childYTop += activity.getDimensions().getHeight();
+ }
+
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft); //TODO why startXleft not Xleft?
+ getDimensions().setYTop(startYTop);
+
+ }
+
+ public void layoutHorizontal(int startXLeft, int startYTop) {
+ int centreOfMyLayout = startYTop + (dimensions.getHeight() / 2);
+ int xLeft = startXLeft + (getXSpacing() / 2);
+ int yTop = centreOfMyLayout - (getStartIconHeight() / 2);
+
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
+ Iterator<ActivityInterface> itr = getSubActivities().iterator();
+ int childYTop = yTop;
+ int childXLeft = xLeft;
+ while (itr.hasNext()) {
+ activity = itr.next();
+ childYTop = centreOfMyLayout - (activity.getDimensions().getHeight() / 2);
+ activity.layout(childXLeft, childYTop);
+ childXLeft += activity.getDimensions().getWidth();
+ }
+
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setStartIconTextXLeft(startXLeft + BOX_MARGIN);
+ setStartIconTextYTop(startYTop + BOX_MARGIN + org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+
+ }
+
+ @Override
+ public SVGCoordinates getEntryArrowCoords() {
+ int xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ int yTop = getStartIconYTop();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = null;
+ if (layoutManager.isVerticalLayout()) {
+ coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+ } else {
+ coords = new SVGCoordinates(yTop, xLeft);
+ }
+ // Check Sub Activities
+ if (subActivities != null && subActivities.size() > 0) {
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = subActivities.get(0);
+ coords = activity.getEntryArrowCoords();
+ }
+ return coords;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ int xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ int yTop = getStartIconYTop();
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = null;
+ if (layoutManager.isVerticalLayout()) {
+ coords = new SVGCoordinates(xLeft, yTop);
+ } else {
+ coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(yTop, xLeft);
+ }
+ // Check Sub Activities
+ if (subActivities != null && subActivities.size() > 0) {
+ org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = subActivities.get(subActivities.size() - 1);
+ coords = activity.getExitArrowCoords();
+ }
+ return coords;
+ }
+
+ @Override
+ public Element getSVGString(SVGDocument doc) {
+ Element group = null;
+
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", getLayerId());
+
+ if (isAddOpacity()) {
+ group.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ }
+ //Add Arrow
+ group.appendChild(getArrows(doc));
+
+ group.appendChild(getBoxDefinition(doc));
+ group.appendChild(getStartImageText(doc));
+ // Process Sub Activities
+ group.appendChild(getSubActivitiesSVGString(doc));
+ //Add Arrow
+ // group.appendChild(getArrows(doc));
+
+ return group;
+ }
+
+ protected Element getArrows(SVGDocument doc) {
+ Element subGroup = null;
+ subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+
+ if (subActivities != null) {
+ ActivityInterface prevActivity = null;
+ ActivityInterface activity = null;
+ String id = null;
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = null;
+ SVGCoordinates entryCoords = null;
+ Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = subActivities.iterator();
+ while (itr.hasNext()) {
+ activity = itr.next();
+ if (prevActivity != null) {
+ exitCoords = prevActivity.getExitArrowCoords();
+ entryCoords = activity.getEntryArrowCoords();
+ id = prevActivity.getId() + "-" + activity.getId();
+ subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(), exitCoords.getYTop(), entryCoords.getXLeft(), entryCoords.getYTop(), id));
+ }
+ prevActivity = activity;
+ }
+ }
+ return subGroup;
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddCompositeActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getCompositeOpacity();
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SimpleActivityImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SimpleActivityImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SimpleActivityImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,142 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.*;
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGDocument;
+import org.apache.axiom.om.OMElement;
+
+public class SimpleActivityImpl extends ActivityImpl implements ReceiveInterface {
+
+ public SimpleActivityImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public SimpleActivityImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public SimpleActivityImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getId() {
+ return getName();
+ }
+
+ @Override
+ public SVGDimension getDimensions() {
+ if (dimensions == null) {
+ int width = getStartIconWidth() + getXSpacing();
+ int height = getStartIconHeight() + getYSpacing();
+ dimensions = new SVGDimension(width, height);
+ }
+
+ return dimensions;
+ }
+
+ @Override
+ public void layout(int startXLeft, int startYTop) {
+ if (layoutManager.isVerticalLayout()) {
+ layoutVertical(startXLeft, startYTop);
+ } else {
+ layoutHorizontal(startXLeft, startYTop);
+ }
+ }
+
+ public void layoutVertical(int startXLeft, int startYTop) {
+ int xLeft = startXLeft + (getXSpacing() / 2);
+ int yTop = startYTop + (getYSpacing() / 2);
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setStartIconTextXLeft(xLeft);
+ setStartIconTextYTop(yTop + getStartIconHeight() + BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft); //TODO why startXleft not Xleft?
+ getDimensions().setYTop(startYTop);
+ }
+
+ public void layoutHorizontal(int startXLeft, int startYTop) {
+ int xLeft = startXLeft + (getYSpacing() / 2);
+ int yTop = startYTop + (getXSpacing() / 2);
+
+ // Set the values
+ setStartIconXLeft(xLeft);
+ setStartIconYTop(yTop);
+ setStartIconTextXLeft(xLeft);
+ setStartIconTextYTop(yTop + getStartIconHeight() + BPEL2SVGFactory.TEXT_ADJUST);
+ getDimensions().setXLeft(startXLeft);
+ getDimensions().setYTop(startYTop);
+ }
+
+ @Override
+
+ public Element getSVGString(SVGDocument doc) {
+ Element group = null;
+ group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ group.setAttributeNS(null, "id", getLayerId());
+ if (isAddOpacity()) {
+ group.setAttributeNS(null, "style", "opacity:" + getOpacity());
+ group.setAttributeNS(null, "onmouseover", "this.style.opacity=1;this.filters.alpha.opacity=100");
+ group.setAttributeNS(null, "onmouseout", "this.style.opacity=" + getIconOpacity() + ";this.filters.alpha.opacity=40");
+ group.setAttributeNS("xlink", "title", getActivityInfoString());
+ }
+
+// group.appendChild(getBoxDefinition());
+ group.appendChild(getImageDefinition(doc));
+ group.appendChild(getStartImageText(doc));
+
+ return group;
+ }
+
+ @Override
+ public SVGCoordinates getEntryArrowCoords() {
+ int xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ int yTop = getStartIconYTop();
+ if (!layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+ }
+ org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+ // Check Sub Activities
+ return coords;
+ }
+
+ @Override
+ public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
+ int xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
+ int yTop = getStartIconYTop() + getStartIconHeight();
+ if (!layoutManager.isVerticalLayout()) {
+ xLeft = getStartIconXLeft() + getStartIconWidth();
+ yTop = getStartIconYTop() + (getStartIconHeight() / 2);
+ }
+ SVGCoordinates coords = new org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates(xLeft, yTop);
+ // Check Sub Activities
+ return coords;
+ }
+
+ @Override
+ public boolean isAddOpacity() {
+ return isAddSimpleActivityOpacity();
+ }
+
+ @Override
+ public String getOpacity() {
+ return getSimpleActivityOpacity();
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SourceImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SourceImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SourceImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,52 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.SourceInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:12:16 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class SourceImpl extends SourcesImpl implements SourceInterface{
+ public SourceImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+
+
+ }
+
+ /* public ActivityImpl getParent() {
+ return parent;
+ }
+
+ public void setParent(ActivityImpl parent) {
+ this.parent = parent;
+ }
+ */
+ // protected ActivityImpl parent;
+
+
+ public SourceImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SOURCE_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SourcesImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SourcesImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/SourcesImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,55 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.SourcesInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:27:23 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class SourcesImpl extends ActivityImpl implements SourcesInterface{
+
+ /* public ActivityImpl getParent() {
+ return parent;
+ }
+
+ public void setParent(ActivityImpl parent) {
+ this.parent = parent;
+ }
+ */
+ // protected ActivityImpl parent;
+
+
+ public SourcesImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+
+ public SourcesImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SOURCES_END_TAG;
+ }
+
+ public String getId() {
+ return getName(); // + "-Sequence";
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TargetImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TargetImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TargetImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,49 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.TargetInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:12:29 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class TargetImpl extends TargetsImpl implements TargetInterface{
+ public TargetImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+
+
+ }
+
+ public TargetImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ /* public ActivityImpl getParent() {
+ return parent;
+ }
+
+ public void setParent(ActivityImpl parent) {
+ this.parent = parent;
+ }
+ */
+ // protected ActivityImpl parent;
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TARGET_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TargetsImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TargetsImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TargetsImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,52 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.TargetsInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: waruna
+ * Date: Jul 17, 2009
+ * Time: 10:26:15 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class TargetsImpl extends ActivityImpl implements TargetsInterface{
+ public TargetsImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public TargetsImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TARGETS_END_TAG;
+ }
+
+ public String getId() {
+ return getName(); // + "-Sequence";
+ }
+
+ /*public ActivityImpl getParent() {
+ return parent;
+ }
+
+ public void setParent(ActivityImpl parent) {
+ this.parent = parent;
+ }
+ */
+ // protected ActivityImpl parent;
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TerminationHandlerImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TerminationHandlerImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/TerminationHandlerImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,50 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.TerminationHandlerInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.apache.axiom.om.OMElement;
+
+public class TerminationHandlerImpl extends SequenceImpl implements TerminationHandlerInterface {
+
+ public TerminationHandlerImpl(String token) {
+ super(token);
+
+ name = "TERMINATIONHANDLER" + System.currentTimeMillis();
+ displayName = "Termination Handler";
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public TerminationHandlerImpl(OMElement omElement) {
+ super(omElement);
+
+ name = "TERMINATIONHANDLER" + System.currentTimeMillis();
+ displayName = "Termination Handler";
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public TerminationHandlerImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ name = "TERMINATIONHANDLER" + System.currentTimeMillis();
+ displayName = "Termination Handler";
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TERMINATIONHANDLER_END_TAG;
+ }
+
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ThrowImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ThrowImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/ThrowImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,39 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class ThrowImpl extends SimpleActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.ThrowInterface {
+
+ public ThrowImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ThrowImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public ThrowImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.THROW_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/WaitImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/WaitImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/WaitImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,39 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class WaitImpl extends SimpleActivityImpl implements org.wso2.carbon.bpel.ui.bpel2svg.WaitInterface {
+
+ public WaitImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public WaitImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public WaitImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.WAIT_END_TAG;
+ }
+}
Added: trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/WhileImpl.java
===================================================================
--- trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/WhileImpl.java (rev 0)
+++ trunk/console/bpel2svg/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/impl/WhileImpl.java 2010-08-04 15:46:46 UTC (rev 901)
@@ -0,0 +1,40 @@
+// This code is taken from WSO2 Carbon and is licensed by WSO2, Inc.
+// under the Apache License version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html
+package org.wso2.carbon.bpel.ui.bpel2svg.impl;
+
+import org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory;
+import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
+import org.apache.axiom.om.OMElement;
+
+public class WhileImpl extends ForEachImpl implements org.wso2.carbon.bpel.ui.bpel2svg.WhileInterface {
+
+ public WhileImpl(String token) {
+ super(token);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public WhileImpl(OMElement omElement) {
+ super(omElement);
+
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ public WhileImpl(OMElement omElement, ActivityInterface parent) {
+ super(omElement);
+ setParent(parent);
+ // Set Icon and Size
+ startIconPath = BPEL2SVGFactory.getInstance().getIconPath(this.getClass().getName());
+ endIconPath = BPEL2SVGFactory.getInstance().getEndIconPath(this.getClass().getName());
+ }
+
+ @Override
+ public String getEndTag() {
+ return BPEL2SVGFactory.WHILE_END_TAG;
+ }
+
+}
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2010-08-02 11:02:32 UTC (rev 900)
+++ trunk/console/pom.xml 2010-08-04 15:46:46 UTC (rev 901)
@@ -18,6 +18,7 @@
<modules>
<module>integration</module>
<module>identity</module>
+ <!--module>bpel2svg</module-->
</modules>
</project>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-08-02 11:02:32 UTC (rev 900)
+++ trunk/pom.xml 2010-08-04 15:46:46 UTC (rev 901)
@@ -92,6 +92,9 @@
<cxf.version>2.2.6</cxf.version>
<saxon.version>9.1.0.8</saxon.version>
<spring.version>2.5.6.SEC01</spring.version> <!-- This version must match the version used by the ESB -->
+ <batik.version>1.6</batik.version>
+ <axiom.version>1.2.5</axiom.version>
+ <commons.codec.version>1.4</commons.codec.version>
</properties>
<dependencyManagement>
14 years, 4 months
Build failed in Hudson: RiftSaw-jbossws-cxf-2.1.x #34
by jboss-qa-internal@redhat.com
See <http://hudson.qa.jboss.com/hudson/job/RiftSaw-jbossws-cxf-2.1.x/34/changes>
Changes:
[jeff.yuchang] * update version to 2.1.1-SNAPSHOT.
[objectiser] RIFTSAW-119 - apply Aleksander's patch to overcome webcontext conflict issue.
------------------------------------------
[...truncated 2827 lines...]
at org.jboss.soa.bpel.tests.RiftSawTestSetup.setUp(RiftSawTestSetup.java:104)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!
Running org.jboss.soa.bpel.tests.testcases.RiftSaw70TestCase
java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:97)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
at $Proxy1.invoke(Unknown Source)
at org.jboss.soa.bpel.tests.TestDeployerJBoss.invokeMainDeployer(TestDeployerJBoss.java:65)
at org.jboss.soa.bpel.tests.TestDeployerJBoss.deploy(TestDeployerJBoss.java:55)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.deploy(RiftSawTestHelper.java:48)
at org.jboss.soa.bpel.tests.RiftSawTestSetup.setUp(RiftSawTestSetup.java:104)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
Running org.jboss.soa.bpel.tests.samples.QuickstartBPELSecureInvokeTestCase
java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:97)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
at $Proxy1.invoke(Unknown Source)
at org.jboss.soa.bpel.tests.TestDeployerJBoss.invokeMainDeployer(TestDeployerJBoss.java:65)
at org.jboss.soa.bpel.tests.TestDeployerJBoss.deploy(TestDeployerJBoss.java:55)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.deploy(RiftSawTestHelper.java:48)
at org.jboss.soa.bpel.tests.RiftSawTestSetup.setUp(RiftSawTestSetup.java:104)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!
Results :
Tests in error:
org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldHeaderODETestCase
org.jboss.soa.bpel.tests.tutorials.BluePrint4.BluePrint4TestCase
org.jboss.soa.bpel.tests.tutorials.BluePrint5.BluePrint5TestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELSimpleInvokeTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELSecureServiceTestCase
org.jboss.soa.bpel.tests.samples.QuickstartESBBPELHelloWorldTestCase
org.jboss.soa.bpel.tests.tutorials.BluePrint2.BluePrint2TestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELSayHelloTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELSimplePickTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldTestCase
org.jboss.soa.bpel.tests.testcases.RiftSaw209TestCase
org.jboss.soa.bpel.tests.testcases.RiftSaw118TestCase
org.jboss.soa.bpel.tests.tutorials.BluePrint1.BluePrint1TestCase
org.jboss.soa.bpel.tests.samples.QuickstartESBBPELLoanFaultTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELSimpleCorrelationTestCase
org.jboss.soa.bpel.tests.testcases.RiftSaw144TestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELLoanApprovalTestCase
org.jboss.soa.bpel.tests.testcases.RiftSaw163TestCase
org.jboss.soa.bpel.tests.samples.QuickstartESBBPELLoanApprovalTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELSimpleCorrelationWithOneWayTestCase
org.jboss.soa.bpel.tests.samples.QuickstartESBBPELHelloWorldExtendedTimeoutTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldHeaderWSDLTestCase
org.jboss.soa.bpel.tests.testcases.RiftSaw154TestCase
org.jboss.soa.bpel.tests.samples.QuickstartESBBPELHelloWorldNoExtendedTimeoutTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldExtendedTimeoutTestCase
org.jboss.soa.bpel.tests.tutorials.BluePrint3.BluePrint3TestCase
org.jboss.soa.bpel.tests.testcases.RiftSaw70TestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELSecureInvokeTestCase
Tests run: 31, Failures: 0, Errors: 28, Skipped: 0
[ERROR] There are test failures.
Please refer to <http://hudson.qa.jboss.com/hudson/job/RiftSaw-jbossws-cxf-2.1.x/ws/riftsa...> for the individual test results.
[INFO] [antrun:run {execution: undeploy-riftsaw}]
[INFO] Executing tasks
stop-server:
[echo] Stopping the server
[echo] Server is at <http://hudson.qa.jboss.com/hudson/job/RiftSaw-jbossws-cxf-2.1.x/ws/riftsa...>
[java] Exception in thread "main" java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
[java] at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:97)
[java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
[java] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
[java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
[java] at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
[java] at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
[java] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
[java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
[java] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
[java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
[java] at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:159)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[java] at java.lang.Thread.run(Thread.java:619)
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
[java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)
[java] at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
[java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
[java] at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)
[java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
[java] at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
[java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
[java] at $Proxy0.invoke(Unknown Source)
[java] at org.jboss.Shutdown$ServerProxyHandler.invoke(Shutdown.java:271)
[java] at $Proxy1.shutdown(Unknown Source)
[java] at org.jboss.Shutdown.main(Shutdown.java:242)
[java] Java Result: 1
[echo] Shutdown rc = 1
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: The following error occurred while executing this line:
<http://hudson.qa.jboss.com/hudson/job/RiftSaw-jbossws-cxf-2.1.x/ws/riftsa...>:117: Unable to shut down JBoss (maybe it hasn't fully started yet?).
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 minutes 1 second
[INFO] Finished at: Tue Jul 20 00:24:14 EDT 2010
[INFO] Final Memory: 73M/495M
[INFO] ------------------------------------------------------------------------
Archiving artifacts
Recording test results
14 years, 4 months