[jboss-svn-commits] JBL Code SVN: r29451 - in labs/jbossrules/trunk/drools-guvnor: bpel-editor and 19 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Sep 24 08:19:10 EDT 2009
Author: Rikkola
Date: 2009-09-24 08:19:08 -0400 (Thu, 24 Sep 2009)
New Revision: 29451
Added:
labs/jbossrules/trunk/drools-guvnor/bpel-editor/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/ActivityPanel.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/AssignPopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/BPELEditor.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyForm.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyPopUp.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyTo.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/DirFileName.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/InvokePopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/MonitoringComponent.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/MyLoginForm.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/ParameterInput.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkPopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkWSDLPopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSDecider.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSForm.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSPanel.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSSubForm.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_CE_Popup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IER_Popup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IE_Popup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_SE_Popup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReceivePopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReplyPopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/SequencePopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/VariablePopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/WSDLPopUp.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/WaitPopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/WhilePopup.mxml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/AC_OETags.js
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel-debug.html
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel-debug.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel.html
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor-debug.html
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor-debug.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor.html
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iml
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.ipr
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iws
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload-debug.html
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload-debug.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload.html
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/gg.txt
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.htm
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.js
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/ArrowDown.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/BPEL.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/DownArrow.gif
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/QoS.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/QoSLarge.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/WSDL.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/process.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/playerProductInstall.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/test.txt
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynch.wsdl
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynchronous.wsdl
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Synchronous.wsdl
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/VisualCoordinateConstant.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/WorkflowActivities.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/BPELLoader.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/MonitoringWorkflow.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PDDCreator.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PLPortMapping.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/ProcessCreator.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/QoSCreator.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflow.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflow.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SubmissionDocumentCreator.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCatalogCreator.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCreator.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WebServiceRegistry.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowArrayParser.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowManager.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ActivityDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/AssignDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CaseDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchAllDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CopyDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/DOInterface.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/EmptyDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FaultHandlersDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FromDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/InvokeDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/OtherwiseDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeWrapperDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinksDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ProcessDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReceiveDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReplyDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ScopeDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SequenceDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SwitchDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/TerminateDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ToDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariableDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariablesDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WaitDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WhileDO.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/events/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/events/MonitoringArrayUpdate.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ActivityDOSearch.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ComponenetPanels.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/DragNDropLogic.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/QueryString.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Activity.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Assign.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Case.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Catch.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CatchAll.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CompositeActivity.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Copy.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Empty.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/FaultHandlers.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Invoke.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Otherwise.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLink.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLinks.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Process.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PropertyPanel.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Receive.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Reply.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Scope.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Sequence.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Switch.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Terminate.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variable.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variables.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Wait.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/While.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/WorkflowParser.as
labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/AC_OETags.js
labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.htm
labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.js
labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/index.template.html
labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/playerProductInstall.swf
labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/ArrowDown.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/BPEL.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/DownArrow.gif
labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/QoS.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/QoSLarge.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/WSDL.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/process.jpg
labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/
labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Asynchronous.wsdl
labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Synchronous.wsdl
Log:
GUVNOR-432 : BPEL editor -Editor source codes
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/ActivityPanel.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/ActivityPanel.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/ActivityPanel.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="10" fontWeight="bold">
+ <mx:Script>
+ <![CDATA[
+
+ import mx.events.DragEvent;
+ import mx.containers.Box;
+ import mx.managers.DragManager;
+ import mx.core.DragSource;
+
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.*;
+
+ [Embed (source="images/process.jpg")]
+ [Bindable]
+ public var processImage:Class;
+
+ private var _tempWidth:Number;
+ private var _tempHeight:Number;
+ private var workflowManager:WorkflowManager = new WorkflowManager();
+
+ [Bindable]
+ private var _isEditable:Boolean = false;
+
+ private function dragIt(event:MouseEvent, value:String):void {
+ workflowManager.dragStart(event, value);
+ }
+
+ private function workflowUploadDownload(event:MouseEvent, value:String):void {
+ workflowManager.workflowUploadDownload(event, value);
+ }
+
+ [Bindable]
+ public function set tempWidth(value:Number):void {
+ _tempWidth = value;
+ }
+
+ public function get tempWidth():Number {
+ return _tempWidth;
+ }
+
+ [Bindable]
+ public function set tempHeight(value:Number):void {
+ _tempHeight = value;
+ }
+
+ public function get tempHeight():Number {
+ return _tempHeight;
+ }
+
+ [Bindable]
+ public function set isEditable(value:Boolean):void {
+ _isEditable = value;
+ }
+
+ public function get isEditable():Boolean {
+ return _isEditable;
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:Button label="process" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{!isEditable}"
+ toolTip="Create a new BPEL workflow"
+ mouseMove="dragIt(event, WorkflowActivities.PROCESS);" labelPlacement="left" />
+ <mx:Button label="partnerLink" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.PARTNERLINK);" labelPlacement="left"/>
+ <mx:Button label="variable" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.VARIABLE);" labelPlacement="left"/>
+ <mx:Button label="sequence" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.SEQUENCE);" labelPlacement="left"/>
+ <mx:Button label="invoke" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.INVOKE);" labelPlacement="left"/>
+ <mx:Button label="reply" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.REPLY);"/>
+ <mx:Button label="receive" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.RECEIVE);" labelPlacement="left"/>
+ <mx:Button label="assign" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.ASSIGN);" labelPlacement="left"/>
+ <mx:Button label="wait" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.WAIT);" labelPlacement="left"/>
+ <mx:Button label="while" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.WHILE);" labelPlacement="left"/>
+ <mx:Button label="flow" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="false"/>
+ <mx:Button label="pick" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="false"/>
+ <mx:Button label="SAVE" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="{isEditable}" toolTip="Save curent workflow"
+ mouseDown="workflowUploadDownload(event, 'SAVE');" labelPlacement="left"/>
+ <!--
+ <mx:Button label="LOAD" width="{tempWidth * .90}"
+ height="{tempHeight * .065}" enabled="true" toolTip="Load existing workflow"
+ mouseDown="workflowUploadDownload(event, 'LOAD');" labelPlacement="left"/>
+ -->
+</mx:VBox>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/ActivityPanel.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/AssignPopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/AssignPopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/AssignPopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();"
+ title="Add Assign Activity in the BPEL Process" width="432" height="442"
+ xmlns:customComponent="*" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+ import bpel.editor.gridcc.data.FromDO;
+ import bpel.editor.gridcc.data.ToDO;
+ import bpel.editor.gridcc.data.AssignDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ [Bindable]
+ public var fromDO:FromDO;
+
+ [Bindable]
+ public var toDO:ToDO;
+
+ [Bindable]
+ public var assignDO:AssignDO;
+
+ [Bindable]
+ private var assignName:String ="";
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ public function setAssignDO(assignDOValue:AssignDO):void {
+ assignDO = assignDOValue;
+ assignName = assignDO.getName();
+ }
+
+ public function setFromDO(fromDOValue:FromDO):void {
+ fromDO = fromDOValue;
+ }
+
+ public function setToDO(toDOValue:ToDO):void {
+ toDO = toDOValue;
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ nameAssign.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+
+ if(modifyable)
+ nameAssign.enabled = false;
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ private function createAssign():void {
+ assignDO.updateAttributesArray("name",nameAssign.text);
+
+ copyFromForm.createFrom();
+ copyToForm.createTo();
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.ASSIGN);
+ }
+
+
+ ]]>
+ </mx:Script>
+
+ <mx:FormItem label="Name Assign Activity" width="402" borderStyle="solid"
+ horizontalScrollPolicy="off" verticalScrollPolicy="off" height="28">
+ <mx:TextInput id="nameAssign" width="251" text="{assignName}"/>
+ </mx:FormItem>
+
+ <customComponent:CopyForm fromDO="{fromDO}" height="159" horizontalScrollPolicy="off"
+ verticalScrollPolicy="off" width="405" id="copyFromForm">
+ </customComponent:CopyForm>
+
+ <customComponent:CopyTo toDO="{toDO}" height="160" horizontalScrollPolicy="off"
+ verticalScrollPolicy="off" id="copyToForm">
+ </customComponent:CopyTo>
+
+ <mx:HBox>
+ <mx:Button click="createAssign();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+
+
+</mx:TitleWindow>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/AssignPopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/BPELEditor.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/BPELEditor.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/BPELEditor.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" name="BPELEditor" layout="absolute" creationComplete="init()"
+ xmlns:ns1="gridcc.ic.ac.uk.*"
+ xmlns:customComponent="*"
+ backgroundGradientColors="[#eeeff7, #cfd8fa]"
+ backgroundGradientAlphas="[0.72, 0.0]">
+
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WebServiceRegistry;
+
+ import mx.core.Container;
+ import mx.controls.Button;
+ import mx.controls.Alert;
+
+ import mx.core.UIComponent;
+ import mx.controls.Label;
+ import mx.containers.*;
+ import mx.events.DragEvent;
+ import mx.containers.Box;
+ import mx.managers.DragManager;
+ import mx.core.DragSource;
+ import flash.display.*;
+ import flash.net.URLRequest;
+
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.controller.ProcessCreator;
+ import bpel.editor.gridcc.utility.QueryString;
+
+ import flash.events.TimerEvent;
+ import flash.utils.Timer;
+
+ private var x1:Number;
+ private var y1:Number;
+
+ private var tempContainer:Canvas;
+
+ public var minuteTimer:Timer;
+ public var processDropped:Boolean = false;
+
+ [Embed (source="images/WSDL.jpg")]
+ [Bindable]
+ public var wsdlImage:Class;
+
+ [Embed (source="images/QoSLarge.jpg")]
+ [Bindable]
+ public var qosLargeImage:Class;
+
+ // BPEL Activities Panel
+ [Bindable]
+ private var component1X:Number;
+ [Bindable]
+ private var component1Y:Number;
+ [Bindable]
+ private var component1Width:Number;
+ [Bindable]
+ private var component1Height:Number;
+
+ // Workflow Editor Panel
+ [Bindable]
+ private var component2X:Number;
+ [Bindable]
+ private var component2Y:Number;
+ [Bindable]
+ private var component2Width:Number;
+ [Bindable]
+ private var component2Height:Number;
+
+ // Web Services Registry
+ [Bindable]
+ private var component3X:Number;
+ [Bindable]
+ private var component3Y:Number;
+ [Bindable]
+ private var component3Width:Number;
+ [Bindable]
+ private var component3Height:Number;
+
+ // QoS Elements Panel
+ [Bindable]
+ private var component4X:Number;
+ [Bindable]
+ private var component4Y:Number;
+ [Bindable]
+ private var component4Width:Number;
+ [Bindable]
+ private var component4Height:Number;
+
+ // Properties Panel
+ [Bindable]
+ private var component5X:Number;
+ [Bindable]
+ private var component5Y:Number;
+ [Bindable]
+ private var component5Width:Number;
+ [Bindable]
+ private var component5Height:Number;
+
+ // XML Schema Registry
+ [Bindable]
+ private var component6X:Number;
+ [Bindable]
+ private var component6Y:Number;
+ [Bindable]
+ private var component6Width:Number;
+ [Bindable]
+ private var component6Height:Number;
+
+ private var workflowManager:WorkflowManager = null;
+
+ private var processCreator:ProcessCreator = null;
+
+ //private var wsRegistry:WebServiceRegistry = null;
+
+ // For Testing
+ private var queryString:QueryString = null;
+
+ public function init():void{
+
+ workflowManager = WorkflowManager.getInstance();
+ workflowManager.setBPELEditor(this);
+ workflowManager.setbpelActivityPanel(BPELActivitiesPanel);
+
+ processCreator = ProcessCreator.getInstance();
+ minuteTimer = new Timer(200, 1);
+
+ minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete);
+
+ this.addEventListener(Event.RESIZE, resizeHandler);
+
+ //wsRegistry = WebServiceRegistry.getInstance();
+ // For Testing
+ /*
+ queryString = new QueryString();
+ try {
+ var keyStr:String;
+ var valueStr:String;
+ //Alert.show("URL: "+ queryString.url, 'Message');
+ //Alert.show("Name: "+ queryString.parameters.myName, 'Message');
+ trace(queryString.url);
+ var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
+ for (keyStr in paramObj) {
+ valueStr = String(paramObj[keyStr]);
+ trace("\t" + keyStr + ":\t" + valueStr + "\n");
+ }
+ //Alert.show("this.parameters.one: "+ this.parameters.one, 'Message');
+ //Alert.show("this.url: "+ this.url, 'Message');
+ //this.p
+ } catch (error:Error) {
+ trace(error);
+ //Alert.show("Error: "+ error, 'Message');
+ //trace(this.parameters.myWorkflowNameIs);
+ //trace(this.parameters.myServletNameIs);
+ //trace(this.parameters.myDirNameIs);
+ }
+
+ */
+ }
+
+ private function resizeHandler (event:Event):void {
+ componentsSizeAndLocation();
+ }
+
+ private function dragIt(event:MouseEvent, value:String):void {
+ //trace("dragIt " + event.localX + " " + event.localY);
+ //workflowManager.dragStart(event, value);
+ }
+
+ private function treeItemChange(event:Event, value:String):void {
+ //trace("Tree drag It " + event.type);
+ //workflowManager.dragStart(event, value);
+
+ var selectedNode:XML;
+ var selectedType:String = "";
+
+ //Tree(event.target).selectedItem;
+ //trace("Selected Index: " + Tree(event.target).selectedIndex)
+ selectedNode = Tree(event.target).selectedItem as XML;
+
+ if(selectedNode. at type == "operation")
+ selectedType = "operation";
+ else if (selectedNode. at type == "portType"){
+ var tempPortName:String = selectedNode. at label;
+ var colinIndex:Number = tempPortName.indexOf(":");
+ var dashIndex:Number = tempPortName.indexOf("-");
+ //trace("colinIndex: " + colinIndex + " dashIndex: " + dashIndex);
+
+ var prefix:String = tempPortName.substr(0, colinIndex);
+ var onlyPortName:String = tempPortName.substr(colinIndex +1, ((dashIndex -1) - colinIndex));
+
+ selectedType = "Port Type: " + onlyPortName + " will be added as Partner Link";
+ var operationNameArray:Array = new Array();
+ for each(var item:XML in selectedNode.elements()){
+ var tempOperationName:String = item. at label;
+ var colinIndexOp:Number = tempOperationName.indexOf(":");
+ var dashIndexOp:Number = tempOperationName.indexOf("-");
+
+
+ //var prefix:String = tempPortName.substr(0, colinIndex);
+ var onlyOperationName:String = tempOperationName.substr(colinIndexOp +1, ((dashIndexOp -1) - colinIndexOp));
+ operationNameArray.push(onlyOperationName);
+ //trace(item. at label +" " +onlyOperationName);
+ }
+ workflowManager.addNewPartner(prefix, onlyPortName, selectedNode. at namespace, operationNameArray)
+ }
+
+ //Alert.show(selectedType);
+ //trace("Tree Selected Node: " + selectedNode.toXMLString());
+
+ }
+ private function componentsSizeAndLocation():void {
+ //trace("Height " + this.height + " Width " + this.width);
+
+ var tempWidth:Number = tabNavigator.width;
+ var tempHeight:Number = tabNavigator.height;
+
+ //trace("Height " + tabNavigator.height + " Width " + tabNavigator.width);
+
+ var horizontalGap:Number = Math.abs((tempWidth * 0.02)/4);
+ var verticalGap:Number = Math.abs((tempHeight * 0.015)/3);
+
+ // BPEL Activities Elements Panel
+ component1X = horizontalGap;
+ component1Y = verticalGap;
+ component1Width = Math.abs(tempWidth * .087);
+ component1Height = Math.abs(tempHeight * 0.60);
+
+ component2X = horizontalGap + component1Width + horizontalGap;
+ component2Y = verticalGap;
+ component2Width = Math.abs(tempWidth * .83);
+ component2Height = Math.abs(tempHeight * 0.92);
+
+ component3X = horizontalGap + component1Width + horizontalGap + component2Width + horizontalGap;
+ component3Y = verticalGap;
+ component3Width = Math.abs(tempWidth * .08);
+ component3Height = Math.abs(tempHeight * 0.6);
+
+ // QoS Elements Panel
+ component4X = horizontalGap;
+ component4Y = verticalGap + component1Height + verticalGap;
+ component4Width = Math.abs(tempWidth * .087);
+ component4Height = Math.abs(tempHeight * 0.30);
+
+ component5X = horizontalGap + component4Width + horizontalGap;
+ component5Y = verticalGap + component2Height + verticalGap;
+ component5Width = Math.abs(tempWidth * .81);
+ component5Height = Math.abs(tempHeight * 0.19);
+
+ component6X = horizontalGap + component4Width + horizontalGap + component5Width + horizontalGap;
+ component6Y = verticalGap + component3Height + verticalGap;
+ component6Width = Math.abs(tempWidth * .08);
+ component6Height = Math.abs(tempHeight * 0.38);
+ }
+
+
+ public function dragEnterHandler(event:DragEvent):void
+ {
+ //trace("dragEnterHandler");
+ // Get the drop target component from the event object.
+ var dropTarget:Canvas = event.currentTarget as Canvas;
+
+ // Accept the drag only if the user is dragging data
+ // identified by the 'value' format value.
+ if (event.dragSource.hasFormat("activity"))
+ {
+ // Make the border of the Box thicker to
+ // visually signal to the user that they can
+ // drop the coin there.
+ dropTarget.setStyle("borderThickness", 5);
+
+ // Accept the drop.
+ DragManager.acceptDragDrop(dropTarget);
+ }
+ }
+
+ // Called if the user drags the drag proxy away from the drop target.
+ private function dragExitHandler(event:DragEvent):void
+ {
+ //trace("dragExitHandler");
+ }
+
+ // Called if the target accepts the dragged object and the user
+ // releases the mouse button while over the drop target.
+ public function dragDropHandler(event:DragEvent):void
+ {
+ var activityType:String = event.dragSource.dataForFormat("activity") as String;
+ workflowManager.dragDropped("mainCanvas", activityType, event);
+ }
+
+ public function onTimerComplete(evt:Event):void
+ {
+ //trace("Time's Up!");
+ /*
+ var partnerLinks:PartnerLinks = new PartnerLinks(tempContainer);
+ //var bpel:BPELCreator = new BPELCreator();
+ //trace (partnerLinks.name + " AAAA " + partnerLinks.type);
+ tempContainer.addChild(partnerLinks);
+ bpel.createPartnerLinks();
+
+
+ var variables:Variables = new Variables(tempContainer);
+ tempContainer.addChild(variables);
+ bpel.createVariables();
+ //workflowManager.XMLCreator(tempContainer.parent.name, variables.name);
+ */
+ }
+
+ private function retrieveWSDL(event:Event):void{
+ workflowManager.displayWSDLPopUp();
+ }
+
+ private function getBPEL(event:Event):void{
+ //trace("getBPEL");
+ if(workflowManager.retrieveBPEL()){
+ bpelTextArea.text = workflowManager.retrieveBPEL();
+ } else {
+ bpelTextArea.text = "Error in Loading BPEL Process";
+ }
+ }
+
+ private function getWSDL(event:Event):void{
+ //trace("getBPEL");
+ if(workflowManager.retrieveWSDL()){
+ wsdlTextArea.text = workflowManager.retrieveWSDL();
+ } else {
+ wsdlTextArea.text = "Error in Loading WSDL";
+ }
+ }
+
+ private function getPDD(event:Event):void{
+ //trace("getBPEL");
+ if(workflowManager.retrievePDD()){
+ pddArea.text = workflowManager.retrievePDD();
+ } else {
+ pddArea.text = "Error in Loading Process Deployment Descriptor";
+ }
+ }
+
+ private function getWSDLCatalog(event:Event):void{
+ //trace("getBPEL");
+ if(workflowManager.retrieveWSDLCatalog()){
+ catalogArea.text = workflowManager.retrieveWSDLCatalog().toXMLString();
+ } else {
+ catalogArea.text = "Error in Loading WSDL Catalog";
+ }
+ }
+
+ private function getSubDoc(event:Event):void{
+ //trace("getBPEL");
+ if(workflowManager.retrieveSubDoc()){
+ submDocArea.text = workflowManager.retrieveSubDoc();
+ } else {
+ submDocArea.text = "Error in Loading Submission Document";
+ }
+ }
+
+ private function getQoSDoc(event:Event):void{
+ //trace("getBPEL");
+ if(workflowManager.retrieveQoSDoc()){
+ var updatedSubDOc:XML = workflowManager.retrieveSubDoc();
+ updatedSubDOc.appendChild(workflowManager.retrieveQoSDoc());
+ QoSArea.text = updatedSubDOc;
+ } else {
+ QoSArea.text = "Error in Loading QoS Document";
+ }
+ }
+
+ public function updateWSRegistryTree(wsRegistryXML:XML):void{
+ this.wsRegistryTree.dataProvider = wsRegistryXML;
+ wsRegistryTree.labelField = "@label";
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:TabNavigator id="tabNavigator" width="100%" height="100%">
+ <mx:Canvas label="BPEL Designer" id="BPELDesigner" borderColor="#8080ff" borderStyle="outset">
+ <!-- Original fillColors="[#ebd9ec, #f062f0]" -->
+ <mx:ApplicationControlBar label="BPEL Activities" id="BPELActivity" x="{component1X}"
+ y="{component1Y}"
+ width="{component1Width}" height="{component1Height}" fillColors="[#ebd9ec, #a4a4ff]"
+ fillAlphas="[0.7, 0.28]">
+ <customComponent:ActivityPanel label="BPEL Activities" x="{BPELActivity.height + 10}"
+ id="BPELActivitiesPanel"
+ tempHeight="{component1Height - 5}"
+ tempWidth="{component1Width - 5}">
+ </customComponent:ActivityPanel>
+ </mx:ApplicationControlBar>
+
+ <mx:ApplicationControlBar label="QoS Activities" id="QoSActivity" x="{component4X}"
+
+ width="{component4Width}" height="{component4Height}" fillColors="[#ebd9ec, #a4a4ff]"
+ fillAlphas="[0.7, 0.28]" bottom="5">
+ <customComponent:QoSPanel label="QoS Activities" x="{component4X - 5}"
+ id="QoSActivitiesPanel"
+ tempWidth="{component4Width - 5}"
+ tempHeight="{component4Height - 5}" >
+ </customComponent:QoSPanel>
+ </mx:ApplicationControlBar>
+
+ <mx:Canvas id="mainCanvas"
+ width="69%" height="100%"
+ dragEnter="dragEnterHandler(event);"
+ dragExit="dragExitHandler(event);"
+ dragDrop="dragDropHandler(event);" backgroundColor="#e0e0e0" x="{BPELActivity.width + 11}">
+ </mx:Canvas>
+
+ <mx:ApplicationControlBar id="WSRegistry" width="20.5%" height="99%"
+ fillColors="[#ebd9ec, #a4a4ff]" fillAlphas="[0.7, 0.28]" dock="false" right="5">
+
+ <mx:VBox label="Workflow Registry" width="100%">
+
+ <mx:Button label="Add New Web Service" width="100%" height="40" top="10"
+ y= "10" labelPlacement="top" click="retrieveWSDL(event);"/>
+ <mx:Tree id="wsRegistryTree" labelField="Web Service Registry" height="{WSRegistry.height - 60}"
+ backgroundColor="#dfdfff" width="100%" horizontalScrollPolicy="auto"
+ backgroundAlpha="0.78" enabled="true" change="treeItemChange(event,'');">
+ </mx:Tree>
+ </mx:VBox>
+ </mx:ApplicationControlBar>
+ </mx:Canvas>
+
+ <mx:Canvas label="WSDL" show="getWSDL(event)" height="100%" width="100%">
+ <mx:VBox height="100%" width="100%">
+ <mx:TextArea id="wsdlTextArea" editable="false" height="100%" width="100%"
+ x="10" y="15" enabled="true" borderThickness="3" borderColor="#8080ff"
+ borderStyle="solid" cornerRadius="4" fontSize="14" backgroundColor="#e0e0e0">
+ </mx:TextArea>
+ </mx:VBox>
+ </mx:Canvas>
+
+ <mx:Canvas label="BPEL" show="getBPEL(event)" height="100%" width="100%">
+ <mx:VBox height="100%" width="100%">
+ <mx:TextArea id="bpelTextArea" editable="false" height="100%" width="100%"
+ x="10" y="15" enabled="true" borderThickness="3" borderColor="#8080ff"
+ borderStyle="solid" cornerRadius="4" fontSize="14" backgroundColor="#e0e0e0">
+ </mx:TextArea>
+ </mx:VBox>
+ </mx:Canvas>
+
+ <!-- Original borderColor="#f062f0" -->
+ <mx:Canvas label="Submission Document" show="getSubDoc(event)" height="100%" width="100%">
+ <mx:VBox height="100%" width="100%">
+ <mx:TextArea id="submDocArea" editable="false" height="85%" width="100%"
+ x="10" y="15" enabled="true" borderThickness="3" borderColor="#8080ff"
+ borderStyle="solid" cornerRadius="4" fontSize="14" backgroundColor="#e0e0e0">
+ </mx:TextArea>
+ <customComponent:ParameterInput width="100%" />
+ </mx:VBox>
+ </mx:Canvas>
+
+ <mx:Canvas label="Deployment Descriptor" show="getPDD(event)" height="100%" width="100%">
+ <mx:VBox height="100%" width="100%">
+ <mx:TextArea id="pddArea" editable="false" height="98%" width="100%"
+ x="10" y="15" enabled="true" borderThickness="3" borderColor="#8080ff"
+ borderStyle="solid" cornerRadius="4" fontSize="14" backgroundColor="#e0e0e0">
+ </mx:TextArea>
+ </mx:VBox>
+ </mx:Canvas>
+
+ <mx:Canvas label="WSDL Catalog" show="getWSDLCatalog(event)" height="100%" width="100%">
+ <mx:VBox height="100%" width="100%">
+ <mx:TextArea id="catalogArea" editable="false" height="98%" width="100%"
+ x="10" y="15" enabled="true" borderThickness="3" borderColor="#8080ff"
+ borderStyle="solid" cornerRadius="4" fontSize="14" backgroundColor="#e0e0e0">
+ </mx:TextArea>
+ </mx:VBox>
+ </mx:Canvas>
+
+ <mx:Canvas label="QoS" height="100%" show="getQoSDoc(event)" width="100%">
+ <mx:VBox height="100%" width="100%">
+ <mx:TextArea id="QoSArea" editable="false" height="98%" width="100%"
+ x="10" y="15" enabled="true" borderThickness="3" borderColor="#8080ff"
+ borderStyle="solid" cornerRadius="4" fontSize="14" backgroundColor="#e0e0e0">
+ </mx:TextArea>
+ </mx:VBox>
+ </mx:Canvas>
+
+ <customComponent:MonitoringComponent id="BPELMonitor" borderStyle="outset"
+ height="100%" width="100%" backgroundColor="#e0e0e0">
+ </customComponent:MonitoringComponent>
+
+ </mx:TabNavigator>
+
+
+</mx:Application>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/BPELEditor.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyForm.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyForm.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyForm.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml"
+ width="404" height="160" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+ import bpel.editor.gridcc.data.FromDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ [Bindable]
+ private var _fromDO:FromDO;
+
+ [Bindable]
+ private var variableArrayName:Array = ActivityDOSearch.getVariableAsArray();
+
+ [Bindable]
+ private var nameVariable:String = "";
+
+ [Bindable]
+ private var expressionType:String = "";
+
+ [Bindable]
+ private var expressionValue:String = "";
+
+ [Bindable]
+ private var variableNameIndex:Number = 0;
+
+ [Bindable]
+ private var querySelection:Boolean = false;
+
+ [Bindable]
+ private var partSelection:Boolean = false;
+
+ [Bindable]
+ private var literalSelection:Boolean = false;
+
+ [Bindable]
+ private var expressionSelection:Boolean = false;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ public function set fromDO(fromDOValue:FromDO):void {
+ _fromDO = fromDOValue;
+ nameVariable = _fromDO.variableValue;
+ expressionType = _fromDO.queryType;
+ expressionValue = _fromDO.fromValue
+
+ selectIndex(expressionType);
+ selectVariableIndex();
+ }
+
+ private function selectIndex(expressionType:String):void{
+ if (expressionType == "query"){
+ querySelection = true;
+ } else if (expressionType == "part"){
+ partSelection = true;
+ } else if (expressionType == "empty"){
+ literalSelection = true;
+ }else if (expressionType == "expression"){
+ expressionSelection = true;
+ }
+ }
+
+ private function selectVariableIndex():void {
+ if(nameVariable.length > 0){
+ variableNameIndex = ActivityDOSearch.variableIndex(nameVariable);
+ }
+ }
+
+ public function createFrom():void {
+
+ _fromDO.updateAttributesArray("variable", variableName.text);
+ _fromDO.updateAttributesArray(expressionType, expressionValueInput.text)
+ }
+
+ private function handleType(event:ItemClickEvent):void {
+ expressionType = event.currentTarget.selectedValue;
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="370" height="129" borderStyle="solid" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:FormItem label="Copy From " width="336" horizontalAlign="left" fontSize="12" fontWeight="bold"/>
+ <mx:FormItem label="Variable Name " width="336" horizontalAlign="left">
+ <mx:ComboBox id="variableName" dataProvider="{variableArrayName}"
+ width="211" selectedIndex="{variableNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:HBox>
+ <mx:RadioButtonGroup id="paramTypeGroup" itemClick="handleType(event);" enabled="false"/>
+ <mx:RadioButton label="Literal " groupName="paramTypeGroup" value="empty" selected="{literalSelection}" enabled="false"/>
+ <mx:RadioButton label="Query " groupName="paramTypeGroup" value="query" selected="{querySelection}" enabled="false"/>
+ <mx:RadioButton label="Part " groupName="paramTypeGroup" value="part" selected="{partSelection}" enabled="false"/>
+ <mx:RadioButton label="Expression" groupName="paramTypeGroup" value="expression" selected="{expressionSelection}"
+ enabled="false"/>
+ </mx:HBox>
+
+ <mx:FormItem label="Expression " width="336" horizontalAlign="left">
+ <mx:TextInput id="expressionValueInput" width="212" text="{expressionValue}"/>
+ </mx:FormItem>
+ </mx:Form>
+</mx:Form>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyForm.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyPopUp.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyPopUp.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyPopUp.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();"
+ title="Add Copy Activity in the BPEL Process" width="436" height="416" xmlns:customComponent="*" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+ import bpel.editor.gridcc.data.FromDO;
+ import bpel.editor.gridcc.data.ToDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ [Bindable]
+ public var fromDO:FromDO;
+
+ [Bindable]
+ public var toDO:ToDO;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ public function setFromDO(fromDOValue:FromDO):void {
+ fromDO = fromDOValue;
+ //nameVariable = fromDO.variableValue;
+ //expressionType = fromDO.queryType;
+ //expressionValue = fromDO.fromValue
+
+ //selectIndex(expressionType);
+ }
+
+ public function setToDO(toDOValue:ToDO):void {
+ toDO = toDOValue;
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ }
+
+ private function createCopy():void {
+ PopUpManager.removePopUp(this);
+ }
+
+
+
+ ]]>
+ </mx:Script>
+
+ <customComponent:CopyForm fromDO="{fromDO}" height="161" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+
+ </customComponent:CopyForm>
+
+ <customComponent:CopyTo toDO="{toDO}" height="164" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+
+ </customComponent:CopyTo>
+
+ <mx:HBox>
+ <mx:Button click="createCopy();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+
+
+</mx:TitleWindow>
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyPopUp.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyTo.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyTo.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyTo.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml"
+ width="404" height="164" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+ import bpel.editor.gridcc.data.ToDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ [Bindable]
+ private var _toDO:ToDO;
+
+ [Bindable]
+ private var variableArrayName:Array = ActivityDOSearch.getVariableAsArray();
+
+ [Bindable]
+ private var nameVariable:String = "";
+
+ [Bindable]
+ private var expressionType:String = "empty";
+
+ [Bindable]
+ private var expressionValue:String = "";
+
+ [Bindable]
+ private var variableNameIndex:Number = 0;
+
+ [Bindable]
+ private var querySelection:Boolean = false;
+
+ [Bindable]
+ private var partSelection:Boolean = false;
+
+ [Bindable]
+ private var literalSelection:Boolean = false;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+
+ public function set toDO(toDOValue:ToDO):void {
+ _toDO = toDOValue;
+ nameVariable = _toDO.variableValue;
+ expressionType = _toDO.queryType;
+ expressionValue = _toDO.toValue
+
+ selectIndex(expressionType);
+ selectVariableIndex();
+ }
+
+ private function selectIndex(expressionType:String):void{
+ if (expressionType == "query"){
+ querySelection = true;
+ } else if (expressionType == "part"){
+ partSelection = true;
+ } else if (expressionType == "empty"){
+ literalSelection = true;
+ }
+ }
+
+ private function selectVariableIndex():void {
+ if(nameVariable.length > 0){
+ variableNameIndex = ActivityDOSearch.variableIndex(nameVariable);
+ }
+ }
+
+ public function createTo():void {
+ /*
+ var tempArray:Array = new Array();
+ tempArray.push(["variable",variableName.text]);
+ tempArray.push([paramTypeGroup.selectedValue, expressionValueInput.text]);
+
+ _toDO.attributesArray = tempArray;
+ */
+
+ _toDO.updateAttributesArray("variable", variableName.text);
+ _toDO.updateAttributesArray(expressionType, expressionValueInput.text)
+
+ }
+
+ private function handleType(event:ItemClickEvent):void {
+ expressionType = event.currentTarget.selectedValue;
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="370" height="132" borderStyle="solid" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+
+ <mx:FormItem label="Copy To " width="336" horizontalAlign="left" fontSize="12" fontWeight="bold"/>
+
+ <mx:FormItem label="Variable Name" width="336">
+ <mx:ComboBox id="variableName" dataProvider="{variableArrayName}"
+ width="232" selectedIndex="{variableNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:HBox>
+ <mx:RadioButtonGroup id="paramTypeGroup" itemClick="handleType(event);" enabled="false"/>
+ <mx:RadioButton label="Literal Value " groupName="paramTypeGroup" value="empty" selected="{literalSelection}"/>
+ <mx:RadioButton label="XPath query " groupName="paramTypeGroup" value="query" selected="{querySelection}"/>
+ <mx:RadioButton label="Variable part" groupName="paramTypeGroup" value="part" selected="{partSelection}"/>
+ </mx:HBox>
+
+ <mx:FormItem label="Expression " width="336" >
+ <mx:TextInput id="expressionValueInput" width="232" text="{expressionValue}"/>
+ </mx:FormItem>
+ </mx:Form>
+</mx:Form>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/CopyTo.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/DirFileName.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/DirFileName.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/DirFileName.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Create New BPEL Process" creationComplete="doInit();" height="194">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import mx.managers.PopUpManager;
+ import mx.core.IFlexDisplayObject;
+ import flash.events.*;
+
+ public var loadOrSave:String;
+ [Bindable]
+ public var myFile:String;
+ [Bindable]
+ public var myDir:String;
+ [Bindable]
+ public var myServlet:String;
+
+ public var popupWindow:IFlexDisplayObject;
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+
+ PopUpManager.centerPopUp(this);
+ dir.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ }
+
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //trace(event.currentTarget.);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ var textField:TextInput = TextInput(event.currentTarget);
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ private function populateDirAndFileName():void{
+ /*
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ workflowManager.setDirAndFileName(this);
+ PopUpManager.removePopUp(this);
+ */
+ PopUpManager.removePopUp(this);
+ popupWindow.visible = true;
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form>
+ <mx:FormItem label="Directory Path" width="310" >
+ <mx:TextInput id="dir" width="214" textInput="textInputHandler(event)" text="{myDir}" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="File Name" width="310">
+ <mx:TextInput id="fileName" width="214" text="{myFile}" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Servlet URL" width="310">
+ <mx:TextInput id="servletURL" width="215" text="{myServlet}" editable="false"/>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="populateDirAndFileName();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/DirFileName.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/InvokePopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/InvokePopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/InvokePopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,236 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();" width="450" height="300" title="Add New Invoke Activity in the BPEL Process" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.controller.PLPortMapping;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.InvokeDO;
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+ import mx.managers.PopUpManager;
+ import mx.controls.Alert;
+ import flash.events.*;
+
+ //[Bindable]
+ public var invokeDO:InvokeDO;
+
+ [Bindable]
+ private var nameInvoke:String;
+
+ [Bindable]
+ private var variableArray:Array;
+
+ [Bindable]
+ private var partnerLinkArray:Array;
+
+ [Bindable]
+ private var operationsArray:Array;
+
+ [Bindable]
+ private var inputVariableNameIndex:Number = 0;
+
+ [Bindable]
+ private var outputVariableNameIndex:Number = 0;
+
+ [Bindable]
+ private var partnerLinkNameIndex:Number = 0;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ [Bindable]
+ public var monitoringEnabledVar:Boolean = false;
+
+ public function setInvokeDO(invokeDOValue:InvokeDO):void {
+ invokeDO = invokeDOValue;
+ nameInvoke = invokeDO.getName();
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ invokeName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ variableArray = ActivityDOSearch.getVariableAsArray();
+ partnerLinkArray = ActivityDOSearch.getPartnerLinkAsArray();
+
+ operationsArray = new Array();
+ operationsArray.push([" - - - - - - - - - - -"]);
+ //myRole.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+
+ inputVariableNameIndex = ActivityDOSearch.variableIndex(invokeDO.inputVariable);
+ outputVariableNameIndex = ActivityDOSearch.variableIndex(invokeDO.outputVariable);
+ partnerLinkNameIndex = ActivityDOSearch.partnerLinkIndex(invokeDO.partnerLink);
+ //trace(inputVariableNameIndex + " " + outputVariableNameIndex);
+
+ // Only for testing purposes
+ // if [Binding] is not working
+ //outputVariable.selectedIndex = outputVariableNameIndex;
+ //inputVariable.selectedIndex = inputVariableNameIndex;
+
+ if(invokeDO.operation){
+ operationsArray.push(invokeDO.operation);
+ operation.selectedIndex = 1;
+ }
+ if(invokeDO.portType){
+ portType.text = invokeDO.portType;
+ }
+
+ if(modifyable){
+ invokeName.enabled = false;
+ monitorCheckbox.enabled = true;
+ qosCheckbox.enabled = true;
+ }
+ if(monitoringEnabled()){
+ monitorCheckbox.selected = true;
+ }
+ }
+
+ private function partnerLinkSelectionHandler(e:Event):void{
+ trace("partnerLinkSelectionHandler: " + partnerLinkName.selectedItem);
+ var tempPLPortMapping:PLPortMapping = PLPortMapping.getInstance();
+ portType.text = tempPLPortMapping.getPort(String(partnerLinkName.selectedItem));
+
+ operationsArray = tempPLPortMapping.getOperations(String(partnerLinkName.selectedItem), portType.text);
+ }
+
+ private function operationSelectionHandler(e:Event):void{
+ trace("operationSelectionHandler: " + operation.selectedItem);
+ //var tempPLPortMapping:PLPortMapping = PLPortMapping.getInstance();
+ //portType.text = tempPLPortMapping.getPort(String(partnerLinkName.selectedItem));
+ }
+
+ private function monitoringEvent():void{
+ trace("monitoringEvent: " + monitorCheckbox.selected);
+ var tempOldName:String = invokeName.text;
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+
+ if(monitorCheckbox.selected){
+ if(workflowManager.updateNameForMonitoring(WorkflowActivities.INVOKE, tempOldName, invokeName.text + "_monitor")){
+ invokeName.text = invokeName.text + "_monitor";
+ invokeDO.updateAttributesArray("name",invokeName.text);
+ //trace(this.parent.name);
+ }
+ else
+ Alert.show("Error in updating activity name for Monitoring", 'Message');
+ } else {
+ var index:Number = tempOldName.indexOf("_monitor");
+ var tempString:String = tempOldName.substr(0, index);
+ if(workflowManager.updateNameForMonitoring(WorkflowActivities.INVOKE, tempOldName, tempString)){
+ invokeName.text = tempString;
+ invokeDO.updateAttributesArray("name",invokeName.text);
+ }
+ else
+ Alert.show("Error in updating activity name to disable Monitoring", 'Message');
+ }
+ //invokeDO.printArray();
+ }
+
+ private function monitoringEnabled():Boolean {
+ var tempActivityName:String = invokeName.text;
+ if(tempActivityName.search("_monitor") != -1)
+ return true;
+ else return false;
+ }
+
+ private function createInvokeDO():void {
+ invokeDO.updateAttributesArray("name",invokeName.text);
+ invokeDO.updateAttributesArray("partnerLink",partnerLinkName.text);
+ invokeDO.updateAttributesArray("portType",portType.text);
+ invokeDO.updateAttributesArray("operation",operation.text);
+ invokeDO.updateAttributesArray("inputVariable",inputVariable.text);
+ invokeDO.updateAttributesArray("outputVariable",outputVariable.text);
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.INVOKE);
+ }
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function qosEvent():void{
+ var qosDeciderPopup:QoSDecider = new QoSDecider();
+ qosDeciderPopup.popupWindow = this;
+ qosDeciderPopup.partnerLinkReference = invokeDO.partnerLink;
+ qosDeciderPopup.methodName = invokeDO.operation;
+ //dirFileNamePopup.setReplyDO(replyDO);
+ //replyPopup.modifyable = true;
+ // bpel.editor.gridcc.controller.WorkflowManager.getInstance().getBPELEditor()
+ PopUpManager.addPopUp(qosDeciderPopup, this, true);
+ this.visible = false;
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="420" height="219" horizontalScrollPolicy="off" verticalScrollPolicy="off" borderStyle="solid">
+ <mx:FormItem label="Invoke Name" width="390" >
+ <mx:TextInput id="invokeName" width="284" text="{nameInvoke}" fontWeight="bold" fontSize="12"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="PartnerLink" width="390" >
+ <mx:ComboBox id="partnerLinkName" dataProvider="{partnerLinkArray}"
+ width="284" change="partnerLinkSelectionHandler(event)"
+ selectedIndex="{partnerLinkNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="PortType" width="390">
+ <mx:TextInput id="portType" width="284" text=" - - - - - - - - - - - - "
+ enabled="false" fontSize="13"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Operation" width="390" >
+ <mx:ComboBox id="operation" dataProvider="{operationsArray}"
+ width="284" change="operationSelectionHandler(event)"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="Input Variable" width="390">
+ <mx:ComboBox id="inputVariable" dataProvider="{variableArray}"
+ width="284" selectedIndex="{inputVariableNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="Output Variable" width="390">
+ <mx:ComboBox id="outputVariable" dataProvider="{variableArray}"
+ width="284" selectedIndex="{outputVariableNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+ <mx:HBox width="390">
+ <mx:FormItem label="Monitoring Enabled " horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:CheckBox id="monitorCheckbox" label="" enabled="false" click="monitoringEvent()" width="19"
+ selected="false"/>
+ </mx:FormItem>
+ <mx:FormItem label="QoS Enabled " horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:CheckBox id="qosCheckbox" label="" enabled="false" width="18" click="qosEvent()"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createInvokeDO();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/InvokePopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/MonitoringComponent.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/MonitoringComponent.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/MonitoringComponent.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" label="Worflow Monitoring"
+ show="IMShowing();" hide="IMHiding();" height="100%" width="638">
+
+ <mx:Script>
+ <![CDATA[
+ import flash.events.Event;
+ import mx.controls.Button;
+ import mx.controls.Label;
+
+ import mx.styles.*;
+ import flash.utils.Timer;
+ import flash.events.TimerEvent;
+ import mx.skins.halo.ButtonSkin;
+
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.controller.MonitoringWorkflow;
+ import bpel.editor.gridcc.events.MonitoringArrayUpdate;
+
+ [Embed (source="images/DownArrow.gif")]
+ [Bindable]
+ public var arrowImage:Class;
+
+ private var updateTimer:Timer = null;
+ public function IMShowing():void{
+ //trace("Now I am Showing");
+ statusTableFunction();
+ WorkflowManager.getInstance().getMonitoringBPELArray();
+ MonitoringWorkflow.getInstance(null).addEventListener(
+ MonitoringArrayUpdate.MONITORING_ARRAY_UPDATE_EVENT, arrayUpdatedEventHandler);
+ //this.addEventListener(MonitoringArrayUpdate.MONITORING_ARRAY_UPDATE_EVENT, arrayUpdatedEventHandler);
+ updateMonitoring(MonitoringWorkflow.getInstance(null).getMonitoringArray());
+ updateTimer= new Timer(2000, 0);
+ updateTimer.addEventListener(TimerEvent.TIMER, updateAray);
+ updateTimer.start();
+
+ }
+
+ private function statusTableFunction():void{
+
+ this.statusTable.removeAllChildren();
+
+ var tempButton:Button = null;
+ var tempLabel:Label = null;
+
+ tempLabel = new Label();
+ tempLabel.height = 10;
+ this.statusTable.addChild(tempLabel);
+
+ tempButton = new Button();
+ tempButton.height = 50;
+ tempButton.width = 105;
+ tempButton.setStyle("fillColors",[0xccff00, 0xccff00]);
+ tempButton.setStyle("fontSize","14");
+ tempButton.setStyle("fontStyle","italic");
+ tempButton.label = "Inactive";
+ this.statusTable.addChild(tempButton);
+
+ tempLabel = new Label();
+ tempLabel.height = 20;
+ this.statusTable.addChild(tempLabel);
+
+ tempButton = new Button();
+ tempButton.height = 50;
+ tempButton.width = 105;
+ tempButton.setStyle("fillColors",[0x33CC00, 0x33CC00]);
+ tempButton.setStyle("fontSize","14");
+ tempButton.setStyle("fontStyle","italic");
+ tempButton.label = "Executing";
+ this.statusTable.addChild(tempButton);
+
+ tempLabel = new Label();
+ tempLabel.height = 20;
+ this.statusTable.addChild(tempLabel);
+
+ tempButton = new Button();
+ tempButton.height = 50;
+ tempButton.width = 105;
+ tempButton.setStyle("fillColors",[0x002EB8, 0x002EB8]);
+ tempButton.setStyle("fontSize","14");
+ tempButton.setStyle("fontStyle","italic");
+ tempButton.label = "Finished";
+ this.statusTable.addChild(tempButton);
+
+ tempLabel = new Label();
+ tempLabel.height = 20;
+ this.statusTable.addChild(tempLabel);
+
+ tempButton = new Button();
+ tempButton.height = 50;
+ tempButton.width = 105;
+ tempButton.setStyle("fillColors",[0xffcc66, 0xffcc66]);
+ tempButton.setStyle("fontSize","14");
+ tempButton.setStyle("fontStyle","italic");
+ tempButton.label = "Suspended";
+ this.statusTable.addChild(tempButton);
+
+ tempLabel = new Label();
+ tempLabel.height = 20;
+ this.statusTable.addChild(tempLabel);
+
+ tempButton = new Button();
+ tempButton.height = 50;
+ tempButton.width = 105;
+ tempButton.setStyle("fillColors",[0x663300, 0x663300]);
+ tempButton.setStyle("fontSize","14");
+ tempButton.setStyle("fontStyle","italic");
+ tempButton.label = "Terminated";
+ this.statusTable.addChild(tempButton);
+
+ tempLabel = new Label();
+ tempLabel.height = 20;
+ this.statusTable.addChild(tempLabel);
+
+ tempButton = new Button();
+ tempButton.height = 50;
+ tempButton.width = 105;
+ tempButton.setStyle("fillColors",[0xff0000, 0xff0000]);
+ tempButton.setStyle("fontSize","14");
+ tempButton.setStyle("fontStyle","italic");
+ tempButton.label = "Faulted";
+ this.statusTable.addChild(tempButton);
+
+ tempLabel = new Label();
+ tempLabel.height = 10;
+ this.statusTable.addChild(tempLabel);
+ }
+
+ private function updateAray(evt:TimerEvent):void {
+ WorkflowManager.getInstance().getMonitoringBPELArray();
+ }
+
+ public function arrayUpdatedEventHandler(event:Event):void {
+ //trace("arrayUpdatedEventHandler");
+ updateMonitoring(MonitoringWorkflow.getInstance(null).getMonitoringArray());
+ }
+ public function IMHiding():void{
+ //trace("Now I am Hiding");
+ //this.removeEventListener(MonitoringArrayUpdate.MONITORING_ARRAY_UPDATE_EVENT, arrayUpdatedEventHandler);
+ updateTimer.stop();
+ }
+
+ private function updateMonitoring(monitoringArray:Array):void {
+ this.monitoringBox.removeAllChildren();
+ var tempButton:Button = null;
+ var arrowButton:Button = null;
+ //var tempLabel:Label = null;
+ //var style:CSSStyleDeclaration = new CSSStyleDeclaration ("Button");
+
+ if(monitoringArray){
+ for(var i:int = 0; i < monitoringArray.length; i++){
+ tempButton = new Button();
+ //tempLabel = new Label();
+ tempButton.label = monitoringArray[i][1];
+ //tempLabel.text = monitoringArray[i][1];
+ tempButton.height = 50;
+ tempButton.setStyle("fillColors",[0xccccff, 0xccccff]);
+ //tempLabel.height = 50;
+ //trace("monitoringArray[i][2]: " + monitoringArray[i][2])
+
+ arrowButton = new Button();
+ arrowButton.setStyle("icon",arrowImage);
+ arrowButton.enabled = false;
+ arrowButton.setStyle("borderColor", "FFFFFF");
+
+ if(monitoringArray[i][2] == "Finished"){
+ //trace("My status is finished"); BLUE
+ tempButton.setStyle("fillColors",[0x002EB8, 0x002EB8]);
+ tempButton.toolTip = monitoringArray[i][1] + " has Finished";
+ }
+ else if(monitoringArray[i][2] == "Executing"){
+ //trace("My status is started"); GREEN
+ tempButton.setStyle("fillColors",[0x33CC00, 0x33CC00]);
+ tempButton.toolTip = monitoringArray[i][1] + " is Executing";
+ }
+ else if(monitoringArray[i][2] == "Faulted"){
+ //trace("My status is error"); RED
+ tempButton.setStyle("fillColors",[0xff0000, 0xff0000]);
+ tempButton.toolTip = monitoringArray[i][1] + " is Faulted";
+ }
+ else if(monitoringArray[i][2] == "Inactive"){
+ //trace("My status is unknown"); LIGHT BLUE
+ tempButton.setStyle("fillColors",[0xccff00, 0xccff00]);
+ tempButton.toolTip = monitoringArray[i][1] + " is Inactive";
+ }
+ else if(monitoringArray[i][2] == "Terminated"){
+ //trace("My status is unknown");
+ tempButton.setStyle("fillColors",[0x663300, 0x663300]);
+ }
+ else if(monitoringArray[i][2] == "Suspended"){
+ //trace("My status is unknown"); ORANGE
+ tempButton.setStyle("fillColors",[0xFF6633, 0xFF6633]);
+ tempButton.toolTip = monitoringArray[i][1] + " is Suspended";
+ }
+ else if(monitoringArray[i][2] == "Ready to Execute"){
+ //trace("My status is unknown"); YELLOW
+ tempButton.setStyle("fillColors",[0xFFC20A, 0xFFC20A]);
+ tempButton.toolTip = monitoringArray[i][1] + " is Qued for Executing";
+ }
+ else if(monitoringArray[i][2] == "Dead Path"){
+ //trace("My status is unknown"); BUEGENDY
+ tempButton.setStyle("fillColors",[0x663300, 0x663300]);
+ tempButton.toolTip = monitoringArray[i][1] + " is Dead Path";
+ }
+ else{
+ tempButton.toolTip = monitoringArray[i][1] + " has Unknown Status";
+ }
+
+ tempButton.setStyle("fontWeight","bold");
+ this.monitoringBox.addChild(tempButton);
+ if((i+1) != monitoringArray.length){
+ this.monitoringBox.addChild(arrowButton);
+ }
+ //trace(monitoringBPELArray[i][0] + " " + monitoringBPELArray[i][1] + " " + monitoringBPELArray[i][2]);
+ }
+ }
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:Metadata>
+ [Event(name="monitoringArrayUpdateEvent", type="bpel.editor.gridcc.events.MonitoringArrayUpdate")]
+ </mx:Metadata>
+
+ <mx:HBox>
+ <mx:VBox id="statusTable" height="95%" width="225" borderStyle="solid" borderColor="#8a7ec2"
+ horizontalAlign="center">
+
+
+ </mx:VBox>
+ <mx:VBox id="dummyBox" height="95%" width="225" horizontalAlign="center">
+
+
+ </mx:VBox>
+ <mx:VBox id="monitoringBox" height="95%" width="325" borderStyle="solid" borderColor="#8a7ec2"
+ horizontalAlign="center" horizontalCenter="0" y="10">
+ </mx:VBox>
+ </mx:HBox>
+</mx:Canvas>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/MonitoringComponent.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/MyLoginForm.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/MyLoginForm.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/MyLoginForm.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Create New BPEL Process" creationComplete="doInit();">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.utility.QueryString;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+
+ [Bindable]
+ private var workflowTypeArray:Array = ["synchronous","asynchronous","empty"];
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ workflowName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+
+ var queryString:QueryString = new QueryString();
+ workflowName.text = queryString.parameters.fileName;
+ }
+
+ private function createProcess():void {
+ // Check credentials (not shown) then remove pop up.
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, "process");
+ }
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //trace(event.currentTarget.);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ workflowName.text = workflowName.text.substr(0,workflowName.length -1);
+ }
+ }
+ }
+ // Key Code 8 is for back space (Not Used)
+ //if(event.keyCode == 8){
+ //if(targetNamespace.length > 20){
+ //var tempNamespace:String = targetNamespace.text;
+ //var tempNamespace1:String = tempNamespace.substr(0,tempNamespace.length -1);
+
+ targetNamespace.text = "http://gridcc.org/" + workflowName.text
+ //}
+ //}
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form>
+ <mx:FormItem label="Workflow Name" width="310" >
+ <mx:TextInput id="workflowName" width="187" textInput="textInputHandler(event)" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Target Namespace" width="310">
+ <mx:TextInput id="targetNamespace" width="187" text="http://gridcc.org/"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Workflow Type" width="310" >
+ <mx:ComboBox id="workflowType" dataProvider="{workflowTypeArray}" width="187"></mx:ComboBox>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createProcess();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/MyLoginForm.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/ParameterInput.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/ParameterInput.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/ParameterInput.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml">
+<mx:Script>
+
+ <![CDATA[
+ import mx.events.ItemClickEvent;
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.controller.WSDLCreator;
+ import bpel.editor.gridcc.controller.SubmissionDocumentCreator;
+
+ private var paramNameString:String;
+ private var paramTypeString:String = "xs:string";
+ private var paramValueString:String = "xs:string";
+
+ private function updateSubmissionDocument():void {
+ paramNameString = paramNameText.text;
+ paramValueString = paramValueText.text;
+
+ SubmissionDocumentCreator.getInstance().createParameter("trigger", paramTypeString, paramValueString, null);
+
+ var wsdlCreator:WSDLCreator = WSDLCreator.getInstance();
+ wsdlCreator.addNewRequestMessagePart(paramNameString , paramTypeString);
+
+ //trace(this.parent.name);
+ //trace(this.parent.parent.name);
+ //trace(this.parent.parent.parent.name);
+ //trace(this.parent.parent.parent.parent.name);
+
+ // Not Sure why it is casted into BPEl Editor
+ BPELEditor(this.parent.parent.parent.parent).submDocArea.text =
+ WorkflowManager.getInstance().retrieveSubDoc();
+ paramNameText.text = ""
+ paramValueText.text = "";
+ }
+
+
+ private function handleType(event:ItemClickEvent):void {
+
+ if (event.currentTarget.selectedValue == "String") {
+ trace("Parameter Input: " + event.currentTarget.selectedValue)
+ paramTypeString = "xs:string";
+ }
+ else {
+ paramTypeString = "xs:integer";
+ }
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:HBox width="98%">
+ <mx:FormItem label="Parameter Name " id="paramName" width="70%">
+ <mx:TextInput id="paramNameText" enabled="true" editable="true" width="100%"/>
+ </mx:FormItem>
+
+ <mx:RadioButtonGroup id="paramTypeGroup" itemClick="handleType(event);" />
+ <mx:RadioButton label="Parameter Type 'String'" groupName="paramTypeGroup" value="String" selected="true"/>
+ <mx:RadioButton label="Parameter Type 'Long'" groupName="paramTypeGroup" value="Integer"/>
+
+ </mx:HBox>
+
+ <mx:FormItem label="Parameter Value " id="paramValue" width="98%">
+ <mx:TextInput id="paramValueText" editable="true" width="100%"/>
+ </mx:FormItem>
+
+ <mx:Button click="updateSubmissionDocument();" label="Add New Parameter"/>
+</mx:Form>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/ParameterInput.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkPopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkPopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkPopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,130 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();" width="386" height="220" title="Add New PartnerLink in the BPEL Process">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.PartnerLinkDO;
+ import bpel.editor.gridcc.data.PartnerLinkTypeWrapperDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+ import mx.controls.Alert;
+
+ //[Bindable]
+ public var partnerLinkDO:PartnerLinkDO;
+
+ [Bindable]
+ private var partnerLinkTypeArray:Array;
+
+ [Bindable]
+ private var namePartnerLink:String = "";
+
+ [Bindable]
+ private var namePartnerRole:String = "";
+
+ [Bindable]
+ private var nameMyRole:String = "";
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ public function setPartnerLinkDO(partnerLinkDOValue:PartnerLinkDO):void {
+ partnerLinkDO = partnerLinkDOValue;
+ namePartnerLink = partnerLinkDO.getName();
+ namePartnerRole = partnerLinkDO.partnerRole;
+ //trace("partnerLinkDO.partnerRole: " + partnerLinkDO.partnerRole);
+ nameMyRole = partnerLinkDO.myRole;
+ //trace("partnerLinkDO.myRole: " + partnerLinkDO.myRole);
+
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ partnerLinkName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ myRole.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ partnerLinkTypeArray = PartnerLinkTypeWrapperDO.getInstance().partnerLinkTypeNamesArray();
+
+ if(modifyable)
+ partnerLinkName.enabled = false;
+ }
+
+ private function createPartnerLink():void {
+ /*
+ var tempArray:Array = new Array();
+ tempArray.push(["name",partnerLinkName.text]);
+ tempArray.push(["partnerLinkType",partnerLinkType.text]);
+ tempArray.push(["myRole",myRole.text]);
+ tempArray.push(["partnerRole",partnerRole.text]);
+ //partnerLinkDO.attributesArray = tempArray;
+ */
+
+ partnerLinkDO.updateAttributesArray("name",partnerLinkName.text);
+ partnerLinkDO.updateAttributesArray("partnerLinkType",partnerLinkType.text);
+ partnerLinkDO.updateAttributesArray("myRole",myRole.text);
+ partnerLinkDO.updateAttributesArray("partnerRole",partnerRole.text);
+
+
+ //partnerLinkDO.printArray();
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+
+ workflowManager.popUPOKHandler(this, WorkflowActivities.PARTNERLINK);
+ }
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="352" height="140">
+ <mx:FormItem label="PartnerLink Name" width="315" >
+ <mx:TextInput id="partnerLinkName" width="179" text="{namePartnerLink}" textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="PartnerLink Type " width="315" >
+ <mx:ComboBox id="partnerLinkType" dataProvider="{partnerLinkTypeArray}"
+ width="179" ></mx:ComboBox>
+ </mx:FormItem>
+
+
+ <mx:FormItem label="My Role" width="315">
+ <mx:TextInput id="myRole" width="179" text="{nameMyRole}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Partner Role" width="315" >
+ <mx:TextInput id="partnerRole" width="179" text="{namePartnerRole}"/>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createPartnerLink();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkPopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkWSDLPopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkWSDLPopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkWSDLPopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();" width="464" height="230" title="Add New PartnerLink in the BPEL Process">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.PartnerLinkDO;
+ import bpel.editor.gridcc.data.PartnerLinkTypeWrapperDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+
+ //[Bindable]
+ public var partnerLinkDO:PartnerLinkDO;
+
+ [Bindable]
+ private var namePartnerLink:String;
+
+ [Bindable]
+ private var namePartnerLinkType:String;
+
+ [Bindable]
+ private var namePartnerRole:String;
+
+ public function setPartnerLinkDO(partnerLinkDOValue:PartnerLinkDO):void {
+ partnerLinkDO = partnerLinkDOValue;
+ namePartnerLink = partnerLinkDO.getName();
+ namePartnerLinkType = partnerLinkDO.getPartnerLinkType();
+ namePartnerRole = partnerLinkDO.getPartnerRole();
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ }
+
+ private function createPartnerLink():void {
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.PARTNERLINK);
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="429" height="143">
+ <mx:FormItem label="PartnerLink Name" width="396" horizontalAlign="center">
+ <mx:TextInput id="partnerLinkName" width="279" text="{namePartnerLink}"
+ enabled="false" fontSize="10" fontWeight="bold"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="PartnerLink Type " width="396" horizontalAlign="center">
+ <mx:TextInput id="partnerLinkType" text="{namePartnerLinkType}"
+ width="279" enabled="false" fontSize="10" fontWeight="bold"></mx:TextInput>
+ </mx:FormItem>
+
+
+ <mx:FormItem label="My Role" width="396" horizontalAlign="center">
+ <mx:TextInput id="myRole" width="279" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Partner Role" width="396" horizontalAlign="center">
+ <mx:TextInput id="partnerRole" width="279" text="{namePartnerRole}"
+ enabled="false" fontSize="10" fontWeight="bold"/>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createPartnerLink();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/PartnerLinkWSDLPopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSDecider.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSDecider.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSDecider.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
+ title="QoS attributes for ...." creationComplete="doInit();" height="198">
+ <mx:Script>
+ <![CDATA[
+ import mx.managers.PopUpManager;
+ import mx.core.IFlexDisplayObject;
+ import mx.controls.Alert;
+ import flash.events.*;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ public var popupWindow:IFlexDisplayObject;
+ public var partnerLinkReference:String = null;
+ public var methodName:String = null;
+
+ private var qosSelection:String = "ie";
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+
+ PopUpManager.centerPopUp(this);
+ }
+
+ private function unavailable():void{
+ Alert.show("Sorry, Reservation for Storage and Computing Elements is " +
+ "not available due to 'NO' Data in the Performance Repository from Brunel");
+ }
+
+ private function forwardQoS():void{
+
+ if(qosSelection == "ie"){
+
+ var qosIEPopup:QoS_IE_Popup = new QoS_IE_Popup();
+ qosIEPopup.popupWindow = this;
+ qosIEPopup.partnerLinkReference = partnerLinkReference;
+ qosIEPopup.methodName = methodName;
+ PopUpManager.addPopUp(qosIEPopup, this, true);
+ this.visible = false;
+
+ } else if(qosSelection == "ier"){
+ var qosIERPopup:QoS_IE_Popup = new QoS_IE_Popup();
+ qosIERPopup.popupWindow = this;
+ qosIERPopup.partnerLinkReference = partnerLinkReference;
+ qosIERPopup.methodName = methodName;
+ qosIERPopup.withoutReservation = false;
+
+ PopUpManager.addPopUp(qosIERPopup, this, true);
+ this.visible = false;
+ } else if(qosSelection == "ce"){
+ unavailable();
+ } else if(qosSelection == "se"){
+ unavailable();
+ }
+ }
+
+ private function cancelQoS():void{
+ PopUpManager.removePopUp(this);
+ popupWindow.visible = true;
+ }
+
+ private function handleType(event:ItemClickEvent):void {
+ trace(event.currentTarget.selectedValue);
+ qosSelection = event.currentTarget.selectedValue;
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form>
+ <mx:VBox>
+ <mx:RadioButtonGroup id="qosTypeGroup" itemClick="handleType(event);" enabled="false"/>
+ <mx:RadioButton label="Instrument Element" groupName="qosTypeGroup" value="ie" selected="true"/>
+ <mx:RadioButton label="Instrument Element with Reservation" groupName="qosTypeGroup" value="ier"/>
+ <mx:RadioButton label="Computing Element" groupName="qosTypeGroup"
+ value="ce" enabled="false" click="unavailable()"/>
+ <mx:RadioButton label="Storage Element" groupName="qosTypeGroup"
+ value="se" enabled="false" click="unavailable()"/>
+ </mx:VBox>
+ </mx:Form>
+
+ <mx:HBox>
+ <mx:Button click="forwardQoS();" label="OK"/>
+ <mx:Button click="cancelQoS();" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSDecider.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSForm.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSForm.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSForm.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml"
+ width="420" height="556" horizontalScrollPolicy="off" verticalScrollPolicy="off" xmlns:customComponent="*" horizontalGap="0">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+
+ private function textInputHandler(event:Event):void {
+
+ }
+
+ ]]>
+ </mx:Script>
+ <!--
+ <mx:Form width="419" height="277" borderStyle="solid" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ -->
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Availability Criteria" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="availabilityCriteria" width="245" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation1" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence1" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Accessibility Criteria" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="accessibilityCriteria" width="236" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation2" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence2" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Reservability Criteria" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="reservabilityCriteria" width="233" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation3" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence3" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Reliability Criteria" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="reliabilityCriteria" width="254" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation4" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence4" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Response Time Criteria" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="responseTimeCriteria" width="220" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation5" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence5" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Worst Response Time" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="worstResponseTimeCriteria" width="231" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation6" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence6" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Best Response Time" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="bestResponseTimeCriteria" width="191" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation7" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence7" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Average Response Time" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="avgResponseTimeCriteria" width="215" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation8" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence8" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+
+ <mx:Box borderStyle="solid">
+ <mx:FormItem label="Dev ResponseTime Criteria" width="390" fontWeight="bold" fontSize="11">
+ <mx:TextInput id="stDevResponseTimeCriteria" width="196" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Operation" width="201" >
+ <mx:TextInput id="operation9" width="127" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Confidence" width="181" >
+ <mx:TextInput id="confidence9" width="100" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:Box>
+</mx:Form>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSForm.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSPanel.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSPanel.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSPanel.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="10" fontWeight="bold">
+ <mx:Script>
+ <![CDATA[
+
+ import mx.events.DragEvent;
+ import mx.containers.Box;
+ import mx.managers.DragManager;
+ import mx.core.DragSource;
+
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.*;
+
+ [Embed (source="images/process.jpg")]
+ [Bindable]
+ public var processImage:Class;
+
+ private var _tempWidth:Number;
+ private var _tempHeight:Number;
+
+ [Bindable]
+ private var _isEditable:Boolean = false;
+
+ private function dragIt(event:MouseEvent, value:String):void {
+ //workflowManager.dragStart(event, value);
+ }
+
+ private function workflowUploadDownload(event:MouseEvent, value:String):void {
+ //workflowManager.workflowUploadDownload(event, value);
+ }
+
+ [Bindable]
+ public function set tempWidth(value:Number):void {
+ _tempWidth = value;
+ }
+
+ public function get tempWidth():Number {
+ return _tempWidth;
+ }
+
+ [Bindable]
+ public function set tempHeight(value:Number):void {
+ _tempHeight = value;
+ }
+
+ public function get tempHeight():Number {
+ return _tempHeight;
+ }
+
+ [Bindable]
+ public function set isEditable(value:Boolean):void {
+ _isEditable = value;
+ }
+
+ public function get isEditable():Boolean {
+ return _isEditable;
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:Button label="XpathRef" width="{tempWidth * .90}"
+ height="{tempHeight * .12}" enabled="{isEditable}"
+ toolTip="XPath Reference to an Activity"
+ mouseMove="dragIt(event, WorkflowActivities.PROCESS);" labelPlacement="left" />
+ <mx:Button label="CPUSpeed" width="{tempWidth * .90}"
+ height="{tempHeight * .12}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.PARTNERLINK);" labelPlacement="left"/>
+ <mx:Button label="Reliability" width="{tempWidth * .90}"
+ height="{tempHeight * .12}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.VARIABLE);" labelPlacement="left"/>
+ <mx:Button label="MaxDuration" width="{tempWidth * .90}"
+ height="{tempHeight * .12}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.SEQUENCE);" labelPlacement="left"/>
+
+ <mx:Button label="StorageSpace" width="{tempWidth * .90}"
+ height="{tempHeight * .12}" enabled="{isEditable}"
+ mouseMove="dragIt(event, WorkflowActivities.INVOKE);" labelPlacement="left"/>
+</mx:VBox>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSPanel.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSSubForm.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSSubForm.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSSubForm.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();"
+ width="440" height="192" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+
+ import mx.managers.PopUpManager;
+ import mx.core.IFlexDisplayObject;
+ import flash.events.*;
+
+ private var parameters:Array;
+
+ [Bindable]
+ public var withoutReservation:Boolean = true;
+
+ [Bindable]
+ public var methodName:String = " ";
+
+ private function doInit():void {
+ //popupWindow.visible = false;
+ //PopUpManager.centerPopUp(this);
+
+ parameters = new Array();
+ }
+
+ public function populateSubform1(formElements:Array):void{
+ if(!parameters){
+ parameters = new Array();
+ }
+ for(var i:int = 0; i < formElements.length; i++ ){
+ parameters.push([formElements[i][0], formElements[i][1]]);
+ }
+ }
+
+ private function textInputHandler(event:Event):void {
+
+ }
+ private function cancelQoS():void{
+ //PopUpManager.removePopUp(this);
+ //popupWindow.visible = true;
+ }
+
+ private function OK_QoS():void{
+
+ }
+
+ ]]>
+ </mx:Script>
+ <!--
+ <mx:Form width="428" height="56" borderStyle="solid" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ -->
+ <mx:FormItem label="Method" width="410" >
+ <mx:TextInput id="method" width="326" text="{methodName}" editable="false"
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Input Size" width="410" >
+ <mx:TextInput id="inputSize" width="326" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Output Size" width="410" >
+ <mx:TextInput id="outputSize" width="326" text=""
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="IE Endpoint" width="410" >
+ <mx:TextInput id="ieEndpoint" width="326" text=""
+ textInput="textInputHandler(event)" editable="{withoutReservation}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Manager ID" width="410" >
+ <mx:TextInput id="managerID" width="326" text=""
+ textInput="textInputHandler(event)" editable="{withoutReservation}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Token" width="410" >
+ <mx:TextInput id="token" width="326" text=""
+ textInput="textInputHandler(event)" editable="{withoutReservation}"/>
+ </mx:FormItem>
+ <!--
+ <mx:HBox>
+ <mx:Button click="OK_QoS();" label="OK"/>
+ <mx:Button click="cancelQoS();" label="Cancel"/>
+ </mx:HBox>
+ -->
+</mx:Form>
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoSSubForm.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_CE_Popup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_CE_Popup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_CE_Popup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
+ title="QoS attributes for Computing Element" creationComplete="doInit();" height="198">
+ <mx:Script>
+ <![CDATA[
+ import mx.managers.PopUpManager;
+ import mx.core.IFlexDisplayObject;
+ import flash.events.*;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ public var popupWindow:IFlexDisplayObject;
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+
+ PopUpManager.centerPopUp(this);
+ }
+
+ private function forwardQoS():void{
+
+ PopUpManager.removePopUp(QoSDecider(popupWindow).popupWindow);
+
+ PopUpManager.removePopUp(popupWindow);
+
+ PopUpManager.removePopUp(this);
+ //popupWindow.visible = true;
+ }
+
+ private function cancelQoS():void{
+ PopUpManager.removePopUp(this);
+ popupWindow.visible = true;
+ }
+
+ private function handleType(event:ItemClickEvent):void {
+ trace(event.currentTarget.selectedValue);
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form>
+
+ </mx:Form>
+
+ <mx:HBox>
+ <mx:Button click="forwardQoS();" label="OK"/>
+ <mx:Button click="cancelQoS();" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_CE_Popup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IER_Popup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IER_Popup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IER_Popup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
+ title="QoS attributes for Instrument Element With Reservation" creationComplete="doInit();" height="198">
+ <mx:Script>
+ <![CDATA[
+ import mx.managers.PopUpManager;
+ import mx.core.IFlexDisplayObject;
+ import flash.events.*;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ public var popupWindow:IFlexDisplayObject;
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+
+ PopUpManager.centerPopUp(this);
+ }
+
+ private function forwardQoS():void{
+
+ PopUpManager.removePopUp(QoSDecider(popupWindow).popupWindow);
+ PopUpManager.removePopUp(popupWindow);
+
+ PopUpManager.removePopUp(this);
+ //popupWindow.visible = true;
+ }
+
+ private function cancelQoS():void{
+ PopUpManager.removePopUp(this);
+ popupWindow.visible = true;
+ }
+
+ private function handleType(event:ItemClickEvent):void {
+ trace(event.currentTarget.selectedValue);
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form>
+
+ </mx:Form>
+
+ <mx:HBox>
+ <mx:Button click="forwardQoS();" label="OK"/>
+ <mx:Button click="cancelQoS();" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IER_Popup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IE_Popup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IE_Popup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IE_Popup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,193 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:customComponent="*"
+ title="QoS attributes for Instrument Element" creationComplete="doInit();" height="266">
+ <mx:Script>
+ <![CDATA[
+ import mx.managers.PopUpManager;
+ import mx.core.IFlexDisplayObject;
+ import flash.events.*;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ import bpel.editor.gridcc.controller.WorkflowManager;
+
+ public var popupWindow:IFlexDisplayObject;
+ private var parameters:Array;
+ private var attributes:Array;
+
+ [Bindable]
+ public var withoutReservation:Boolean = true;
+
+ public var partnerLink:String = null;
+ private var formStage:String = "stage1";
+ public var partnerLinkReference:String = null;
+
+ [Bindable]
+ public var methodName:String = "";
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+
+ parameters = new Array();
+ attributes = new Array();
+ }
+
+ private function addQoS():void{
+
+ // Have to call WorkflowManager to update QoS attributes
+ if(withoutReservation){
+ WorkflowManager.getInstance().createQoSDocument(parameters, attributes, "IE");
+ } else {
+ WorkflowManager.getInstance().createQoSDocument(parameters, attributes, "IER");
+ }
+
+ PopUpManager.removePopUp(QoSDecider(popupWindow).popupWindow);
+ PopUpManager.removePopUp(popupWindow);
+
+ PopUpManager.removePopUp(this);
+ //popupWindow.visible = true;
+ }
+
+ private function cancelQoS():void{
+ PopUpManager.removePopUp(this);
+ popupWindow.visible = true;
+ }
+
+ private function OK_QoS():void{
+
+ if(formStage == "stage1"){
+ updateStage1();
+
+ formStage = "stage2"
+ } else{
+ updateStage2();
+ //printArray();
+
+ // Have to call WorkflowManager to update QoS attributes
+ addQoS();
+ }
+ }
+
+ private function updateStage1():void{
+ parameters.push(["PartnerLinkReference", partnerLinkReference]);
+ trace("PartnerLinkReference: " + parameters.length);
+
+ attributes.push(["methodName", methodName]);
+ trace("PartnerLinkReference: " + parameters.length);
+
+ parameters.push(["inputSize", subForm1.inputSize.text]);
+ trace("PartnerLinkReference: " + parameters.length);
+
+ parameters.push(["methodName", subForm1.method.text]);
+ trace("PartnerLinkReference: " + parameters.length);
+
+ parameters.push(["outputSize", subForm1.outputSize.text]);
+ trace("PartnerLinkReference: " + parameters.length);
+
+ parameters.push(["token", subForm1.token.text]);
+ trace("PartnerLinkReference: " + parameters.length);
+
+ if(withoutReservation){
+ attributes.push(["ieEndpoint", subForm1.ieEndpoint.text]);
+ attributes.push(["IM_ID", subForm1.managerID.text]);
+ }
+
+ this.removeChild(subForm1);
+ this.height = 638;
+
+ this.addChildAt(new QoSForm(), 0);
+
+ trace(parameters.length);
+ }
+
+ private function updateStage2():void{
+ //this.c
+ //this.e
+ if(this.getChildAt(0) is QoSForm){
+ var qosForm:QoSForm = QoSForm(this.getChildAt(0));
+ parameters.push(["availabilityCriterion", qosForm.availabilityCriteria.text]);
+
+ parameters.push(["accessibilityCriterion", qosForm.accessibilityCriteria.text]);
+ parameters.push(["reservabilityCriterion", qosForm.reservabilityCriteria.text]);
+
+ parameters.push(["reliabilityCriterion", qosForm.reliabilityCriteria.text]);
+ parameters.push(["responseTimeCriterion", qosForm.responseTimeCriteria.text]);
+
+
+ parameters.push(["worstResponseTimeCriterion", qosForm.worstResponseTimeCriteria.text]);
+ parameters.push(["bestResponseTimeCriterion", qosForm.bestResponseTimeCriteria.text]);
+
+
+ parameters.push(["avgResponseTimeCriterion", qosForm.avgResponseTimeCriteria.text]);
+ parameters.push(["stDevResponseTimeCriterion", qosForm.stDevResponseTimeCriteria.text]);
+
+
+ attributes.push(["operation_availabilityCriterion", qosForm.operation1.text]);
+ attributes.push(["confidence_availabilityCriterion", qosForm.confidence1.text]);
+
+
+ attributes.push(["operation_accessibilityCriterion", qosForm.operation2.text]);
+ attributes.push(["confidence_accessibilityCriterion", qosForm.confidence2.text]);
+
+
+ attributes.push(["operation_reservabilityCriterion", qosForm.operation3.text]);
+
+ attributes.push(["confidence_reservabilityCriterion", qosForm.confidence3.text]);
+
+
+ attributes.push(["operation_reliabilityCriterion", qosForm.operation4.text]);
+ attributes.push(["confidence_reliabilityCriterion", qosForm.confidence4.text]);
+
+
+ attributes.push(["operation_responseTimeCriterion", qosForm.operation5.text]);
+ attributes.push(["confidence_responseTimeCriterion", qosForm.confidence5.text]);
+
+
+ attributes.push(["operation_worstResponseTimeCriterion", qosForm.operation6.text]);
+ attributes.push(["confidence_worstResponseTimeCriterion", qosForm.confidence6.text]);
+
+
+ attributes.push(["operation_bestResponseTimeCriterion", qosForm.operation7.text]);
+ attributes.push(["confidence_bestResponseTimeCriterion", qosForm.confidence7.text]);
+
+
+ attributes.push(["operation_avgResponseTimeCriterion", qosForm.operation8.text]);
+ attributes.push(["confidence_avgResponseTimeCriterion", qosForm.confidence8.text]);
+
+
+ attributes.push(["operation_stDevResponseTimeCriterion", qosForm.operation9.text]);
+ attributes.push(["confidence_stDevResponseTimeCriterion", qosForm.confidence9.text]);
+
+ }
+ }
+
+ private function printArray():void {
+ for(var i:int = 0; i < parameters.length; i++) {
+ trace(parameters[i][0] + " " + parameters[i][1]);
+ }
+ }
+ ]]>
+ </mx:Script>
+ <customComponent:QoSSubForm id="subForm1" height="188" methodName="{methodName}"
+ withoutReservation="{withoutReservation}"/>
+
+ <!--
+ <mx:Form>
+
+ <customComponent:QoSSubForm/>
+ <customComponent:QoSForm width="421" height="544"/>
+
+
+ </mx:Form>
+ -->
+
+ <mx:HBox>
+ <mx:Button click="OK_QoS();" label="OK"/>
+ <mx:Button click="cancelQoS();" label="Cancel"/>
+ </mx:HBox>
+ <!-- -->
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_IE_Popup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_SE_Popup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_SE_Popup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_SE_Popup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
+ title="QoS attributes for Storage Element" creationComplete="doInit();" height="198">
+ <mx:Script>
+ <![CDATA[
+ import mx.managers.PopUpManager;
+ import mx.core.IFlexDisplayObject;
+ import flash.events.*;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ public var popupWindow:IFlexDisplayObject;
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+
+ PopUpManager.centerPopUp(this);
+ }
+
+ private function forwardQoS():void{
+ PopUpManager.removePopUp(QoSDecider(popupWindow).popupWindow);
+ PopUpManager.removePopUp(popupWindow);
+
+ PopUpManager.removePopUp(this);
+ //popupWindow.visible = true;
+ }
+
+ private function cancelQoS():void{
+ PopUpManager.removePopUp(this);
+ popupWindow.visible = true;
+ }
+
+ private function handleType(event:ItemClickEvent):void {
+ trace(event.currentTarget.selectedValue);
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form>
+
+ </mx:Form>
+
+ <mx:HBox>
+ <mx:Button click="forwardQoS();" label="OK"/>
+ <mx:Button click="cancelQoS();" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/QoS_SE_Popup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReceivePopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReceivePopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReceivePopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,217 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();"
+ width="452" height="272" title="Add New Receive Activity in the BPEL Process">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.controller.PLPortMapping;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.ReceiveDO;
+
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+ import mx.managers.PopUpManager;
+ import mx.controls.Alert;
+ import flash.events.*;
+
+ //[Bindable]
+ public var receiveDO:ReceiveDO;
+
+ [Bindable]
+ private var nameReceive:String;
+
+ [Bindable]
+ private var variableArray:Array;
+
+ [Bindable]
+ private var partnerLinkArray:Array;
+
+ [Bindable]
+ private var operationsArray:Array;
+
+ [Bindable]
+ private var variableNameIndex:Number = 0;
+
+ [Bindable]
+ private var partnerLinkNameIndex:Number = 0;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ public function setReceiveDO(receiveDOValue:ReceiveDO):void {
+ receiveDO = receiveDOValue;
+ nameReceive = receiveDO.getName();
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ receiveName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ variableArray = ActivityDOSearch.getVariableAsArray();
+ partnerLinkArray = ActivityDOSearch.getPartnerLinkAsArray();
+
+ operationsArray = new Array();
+ operationsArray.push([" - - - - - - - - - - -"]);
+ //myRole.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+
+ variableNameIndex = ActivityDOSearch.variableIndex(receiveDO.variable);
+ partnerLinkNameIndex = ActivityDOSearch.partnerLinkIndex(receiveDO.partnerLink);
+ if(receiveDO.operation){
+ operationsArray.push(receiveDO.operation);
+ operation.selectedIndex = 1;
+ }
+ if(receiveDO.portType){
+ portType.text = receiveDO.portType;
+ }
+
+ if(modifyable){
+ receiveName.enabled = false;
+ monitorCheckbox.enabled = true;
+ qosCheckbox.enabled = true;
+ }
+
+ if(monitoringEnabled()){
+ monitorCheckbox.selected = true;
+ }
+ }
+
+ private function createReceiveDO():void {
+
+ receiveDO.updateAttributesArray("name",receiveName.text);
+ receiveDO.updateAttributesArray("partnerLink",partnerLinkName.text);
+ receiveDO.updateAttributesArray("portType",portType.text);
+ receiveDO.updateAttributesArray("operation",operation.text);
+ receiveDO.updateAttributesArray("variable",variable.text);
+
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.RECEIVE);
+ }
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function partnerLinkSelectionHandler(e:Event):void{
+ trace("partnerLinkSelectionHandler: " + partnerLinkName.selectedItem);
+ var tempPLPortMapping:PLPortMapping = PLPortMapping.getInstance();
+ portType.text = tempPLPortMapping.getPort(String(partnerLinkName.selectedItem));
+
+ operationsArray = tempPLPortMapping.getOperations(String(partnerLinkName.selectedItem), portType.text);
+ }
+
+ private function monitoringEvent():void{
+ //trace("monitoringEvent: " + monitorCheckbox.selected);
+ var tempOldName:String = receiveName.text;
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+
+ if(monitorCheckbox.selected){
+ if(workflowManager.updateNameForMonitoring(WorkflowActivities.RECEIVE, tempOldName, receiveName.text + "_monitor"))
+ receiveName.text = receiveName.text + "_monitor";
+ else
+ Alert.show("Error in updating activity name for Monitoring", 'Message');
+ } else {
+ var index:Number = tempOldName.indexOf("_monitor");
+ var tempString:String = tempOldName.substr(0, index);
+ if(workflowManager.updateNameForMonitoring(WorkflowActivities.RECEIVE, tempOldName, tempString))
+ receiveName.text = tempString;
+ else
+ Alert.show("Error in updating activity name to disable Monitoring", 'Message');
+
+ }
+ }
+
+ private function monitoringEnabled():Boolean {
+ var tempActivityName:String = receiveName.text;
+ if(tempActivityName.search("_monitor") != -1)
+ return true;
+ else return false;
+ }
+
+ private function qosEvent():void{
+ var qosDeciderPopup:QoSDecider = new QoSDecider();
+ qosDeciderPopup.popupWindow = this;
+ qosDeciderPopup.partnerLinkReference = receiveDO.partnerLink;
+ qosDeciderPopup.methodName = receiveDO.operation;
+ //dirFileNamePopup.setReplyDO(replyDO);
+ //replyPopup.modifyable = true;
+ // bpel.editor.gridcc.controller.WorkflowManager.getInstance().getBPELEditor()
+ PopUpManager.addPopUp(qosDeciderPopup, this, true);
+ this.visible = false;
+ }
+
+ private function operationSelectionHandler(e:Event):void{
+ trace("operationSelectionHandler: " + operation.selectedItem);
+ //var tempPLPortMapping:PLPortMapping = PLPortMapping.getInstance();
+ //portType.text = tempPLPortMapping.getPort(String(partnerLinkName.selectedItem));
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="420" height="190" verticalScrollPolicy="off" horizontalScrollPolicy="off" borderStyle="solid">
+ <mx:FormItem label="Receive Name" width="390" >
+ <mx:TextInput id="receiveName" width="292" text="{nameReceive}"
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="PartnerLink" width="390" >
+ <mx:ComboBox id="partnerLinkName" dataProvider="{partnerLinkArray}"
+ width="292" change="partnerLinkSelectionHandler(event)"
+ selectedIndex="{partnerLinkNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="PortType" width="390">
+ <mx:TextInput id="portType" width="292" text=" - - - - - - - - - - - - "
+ enabled="false" fontSize="13"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Operation" width="390" >
+ <mx:ComboBox id="operation" dataProvider="{operationsArray}"
+ width="292" change="operationSelectionHandler(event)"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="Variable" width="390">
+ <mx:ComboBox id="variable" dataProvider="{variableArray}"
+ width="292" selectedIndex="{variableNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:HBox>
+ <mx:FormItem label="Monitoring Enabled ">
+ <mx:CheckBox id="monitorCheckbox" label="" enabled="false" click="monitoringEvent()"/>
+ </mx:FormItem>
+ <mx:FormItem label="QoS Enabled ">
+ <mx:CheckBox id="qosCheckbox" label="" enabled="false" click="qosEvent()"/>
+ </mx:FormItem>
+ </mx:HBox>
+
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createReceiveDO();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReceivePopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReplyPopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReplyPopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReplyPopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,227 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
+ creationComplete="doInit();" width="456" height="300"
+ title="Add New Reply Activity in the BPEL Process">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.controller.PLPortMapping;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+
+ import bpel.editor.gridcc.data.ReplyDO;
+
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+ import mx.managers.PopUpManager;
+ import mx.controls.Alert;
+ import flash.events.*;
+
+ //[Bindable]
+ public var replyDO:ReplyDO;
+
+ [Bindable]
+ private var nameReply:String;
+
+ [Bindable]
+ private var variableArray:Array;
+
+ [Bindable]
+ private var partnerLinkArray:Array;
+
+ [Bindable]
+ private var operationsArray:Array;
+
+ [Bindable]
+ private var variableNameIndex:Number = 0;
+
+ [Bindable]
+ private var faultVariableNameIndex:Number = 0;
+
+ [Bindable]
+ private var partnerLinkNameIndex:Number = 0;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ public function setReplyDO(replyDOValue:ReplyDO):void {
+ replyDO = replyDOValue;
+ nameReply = replyDO.getName();
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ replyName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ variableArray = ActivityDOSearch.getVariableAsArray();
+ partnerLinkArray = ActivityDOSearch.getPartnerLinkAsArray();
+
+ operationsArray = new Array();
+ operationsArray.push([" - - - - - - - - - - -"]);
+ //myRole.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+
+ variableNameIndex = ActivityDOSearch.variableIndex(replyDO.variable);
+ faultVariableNameIndex = ActivityDOSearch.variableIndex(replyDO.faultName);
+ partnerLinkNameIndex = ActivityDOSearch.partnerLinkIndex(replyDO.partnerLink);
+ if(replyDO.operation){
+ operationsArray.push(replyDO.operation);
+ operation.selectedIndex = 1;
+ }
+ if(replyDO.portType){
+ portType.text = replyDO.portType;
+ }
+
+ if(modifyable){
+ replyName.enabled = false;
+ monitorCheckbox.enabled = true;
+ qosCheckbox.enabled = true;
+ }
+
+ if(monitoringEnabled()){
+ monitorCheckbox.selected = true;
+ }
+ }
+
+ private function partnerLinkSelectionHandler(e:Event):void{
+ trace("partnerLinkSelectionHandler: " + partnerLinkName.selectedItem);
+ var tempPLPortMapping:PLPortMapping = PLPortMapping.getInstance();
+ portType.text = tempPLPortMapping.getPort(String(partnerLinkName.selectedItem));
+
+ operationsArray = tempPLPortMapping.getOperations(String(partnerLinkName.selectedItem), portType.text);
+ }
+
+ private function operationSelectionHandler(e:Event):void{
+ trace("operationSelectionHandler: " + operation.selectedItem);
+ //var tempPLPortMapping:PLPortMapping = PLPortMapping.getInstance();
+ //portType.text = tempPLPortMapping.getPort(String(partnerLinkName.selectedItem));
+ }
+
+ private function createReplyDO():void {
+
+ replyDO.updateAttributesArray("name",replyName.text);
+ replyDO.updateAttributesArray("partnerLink",partnerLinkName.text);
+ replyDO.updateAttributesArray("portType",portType.text);
+ replyDO.updateAttributesArray("operation",operation.text);
+ replyDO.updateAttributesArray("variable",variable.text);
+ replyDO.updateAttributesArray("faultName", faultName.text);
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.REPLY);
+ }
+
+ private function monitoringEvent():void{
+ //trace("monitoringEvent: " + monitorCheckbox.selected);
+ var tempOldName:String = replyName.text;
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+
+ if(monitorCheckbox.selected){
+ if(workflowManager.updateNameForMonitoring(WorkflowActivities.REPLY, tempOldName, replyName.text + "_monitor"))
+ replyName.text = replyName.text + "_monitor";
+ else
+ Alert.show("Error in updating activity name for Monitoring", 'Message');
+ } else {
+ var index:Number = tempOldName.indexOf("_monitor");
+ var tempString:String = tempOldName.substr(0, index);
+ if(workflowManager.updateNameForMonitoring(WorkflowActivities.REPLY, tempOldName, tempString))
+ replyName.text = tempString;
+ else
+ Alert.show("Error in updating activity name to disable Monitoring", 'Message');
+
+ }
+ }
+
+ private function monitoringEnabled():Boolean {
+ var tempActivityName:String = replyName.text;
+ if(tempActivityName.search("_monitor") != -1)
+ return true;
+ else return false;
+ }
+
+ private function qosEvent():void{
+ var qosDeciderPopup:QoSDecider = new QoSDecider();
+ qosDeciderPopup.popupWindow = this;
+ qosDeciderPopup.partnerLinkReference = replyDO.partnerLink;
+ qosDeciderPopup.methodName = replyDO.operation;
+ //dirFileNamePopup.setReplyDO(replyDO);
+ //replyPopup.modifyable = true;
+ // bpel.editor.gridcc.controller.WorkflowManager.getInstance().getBPELEditor()
+ PopUpManager.addPopUp(qosDeciderPopup, this, true);
+ this.visible = false;
+ }
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="420" height="217" horizontalScrollPolicy="off" verticalScrollPolicy="off" borderStyle="solid">
+ <mx:FormItem label="Reply Name" width="390" >
+ <mx:TextInput id="replyName" width="304" text="{nameReply}"
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="PartnerLink" width="390" >
+ <mx:ComboBox id="partnerLinkName" dataProvider="{partnerLinkArray}"
+ width="304" change="partnerLinkSelectionHandler(event)"
+ selectedIndex="{partnerLinkNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="PortType" width="390">
+ <mx:TextInput id="portType" width="304" text=" - - - - - - - - - - - - "
+ enabled="false" fontSize="13"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Operation" width="390" >
+ <mx:ComboBox id="operation" dataProvider="{operationsArray}"
+ width="304" change="operationSelectionHandler(event)"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="Variable" width="390">
+ <mx:ComboBox id="variable" dataProvider="{variableArray}"
+ width="304" selectedIndex="{variableNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="Fault Name" width="390">
+ <mx:ComboBox id="faultName" dataProvider="{variableArray}"
+ width="304" selectedIndex="{faultVariableNameIndex}"></mx:ComboBox>
+ </mx:FormItem>
+ <mx:HBox>
+ <mx:FormItem label="Monitoring Enabled ">
+ <mx:CheckBox id="monitorCheckbox" label="" enabled="false" click="monitoringEvent()"/>
+ </mx:FormItem>
+ <mx:FormItem label="QoS Enabled ">
+ <mx:CheckBox id="qosCheckbox" label="" enabled="false" click="qosEvent()"/>
+ </mx:FormItem>
+ </mx:HBox>
+
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createReplyDO();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/ReplyPopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/SequencePopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/SequencePopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/SequencePopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();" width="386" height="142" title="Add New Sequence in the BPEL Process">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.SequenceDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+
+ //[Bindable]
+ public var sequenceDO:SequenceDO;
+
+ [Bindable]
+ private var nameSequence:String;
+
+ public function setSequenceDO(sequenceDOValue:SequenceDO):void {
+ sequenceDO = sequenceDOValue;
+ nameSequence = sequenceDO.getName();
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ sequenceName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ //myRole.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ }
+
+ private function createSequence():void {
+ var tempArray:Array = new Array();
+ tempArray.push(["name",sequenceName.text]);
+
+ sequenceDO.attributesArray = tempArray;
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.SEQUENCE);
+ }
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="352" height="58">
+ <mx:FormItem label="Sequence Name" width="315" >
+ <mx:TextInput id="sequenceName" width="179" text="{nameSequence}" textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ <!--
+ <mx:FormItem label="PartnerLink Type " width="315" >
+ <mx:TextInput id="partnerLinkType" width="179" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="My Role" width="315">
+ <mx:TextInput id="myRole" width="179" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Partner Role" width="315" >
+ <mx:TextInput id="partnerRole" width="179" text=""/>
+ </mx:FormItem>
+ -->
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createSequence();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/SequencePopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/VariablePopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/VariablePopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/VariablePopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();" title="Add New Variable in the BPEL Process" height="198">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.VariableDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+
+ [Bindable]
+ private var variableTypeArray:Array = ["messageType","type","element"];
+ public var variableDO:VariableDO;
+
+ [Bindable]
+ private var nameVariable:String;
+
+ private var typeVariable:String = "";
+
+ [Bindable]
+ private var typeVariableIndex:int = 0;
+
+ [Bindable]
+ private var nameTypeVariable:String;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ [Bindable]
+ private var variableNameIndex:Number = 0;
+
+ public function setVariableDO(variableDOValue:VariableDO):void {
+ variableDO = variableDOValue;
+ nameVariable = variableDO.getName();
+ typeVariable = variableDO.getVariableType();
+ //trace("variableDO.getVariableType(): " + variableDO.getVariableType());
+ selectIndex(typeVariable);
+ //trace("variableDO.getVariableTypeValue(): " + variableDO.getVariableTypeValue());
+ nameTypeVariable = variableDO.getVariableTypeValue();
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ variableName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ variableTypeName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ if(modifyable)
+ variableName.enabled = false;
+ }
+
+ private function selectIndex(typeVariable:String):void{
+ if (typeVariable == "messageType"){
+ typeVariableIndex = 0;
+ } else if (typeVariable == "type"){
+ typeVariableIndex = 1;
+ } else if (typeVariable == "element"){
+ typeVariableIndex = 2
+ }
+ }
+
+ private function createVariable():void {
+
+ variableDO.updateAttributesArray("name",variableName.text);
+ variableDO.updateAttributesArray(variableType.text,variableTypeName.text);
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.VARIABLE);
+ }
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="369" height="110">
+ <mx:FormItem label="Variable Name" width="336" >
+ <mx:TextInput id="variableName" width="205" text="{nameVariable}"
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Variable Type" width="336">
+ <mx:ComboBox id="variableType" dataProvider="{variableTypeArray}"
+ width="205" selectedIndex="{typeVariableIndex}"></mx:ComboBox>
+ </mx:FormItem>
+
+ <mx:FormItem label="Variable Type Name" width="336" >
+ <mx:TextInput id="variableTypeName" width="205" text="{nameTypeVariable}"
+ textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <mx:HBox>
+ <mx:Button click="createVariable();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/VariablePopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/WSDLPopUp.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/WSDLPopUp.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/WSDLPopUp.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Enter WSDL URL for parsing" creationComplete="doInit();" height="186">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+ import mx.controls.Alert;
+ import flash.net.FileReference;
+
+ public var fileReference:FileReference;
+
+ public var workflowName:String = null;
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ webServiceName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ }
+
+ private function retrieveWSDL():void {
+ // Check credentials (not shown) then remove pop up.
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.WSDLPopUPOKButtonHandler(this);
+ }
+
+ private function browseLocalFile():void{
+ Alert.show("Sorry, WSDL upload is temporarily unavailable");
+ /*
+ fileReference = new FileReference();
+ fileReference.browse();
+ fileReference.addEventListener(Event.SELECT, selectHandler);
+ */
+ }
+
+ private function selectHandler(event:Event):void {
+ var file:FileReference = FileReference(event.target);
+ wsdlURL.text = file.name;
+ //trace("selectHandler: name=" + file.name + " URL=" + uploadURL.url);
+
+ }
+
+ // Never USED ...May Need it Later
+ private function textInputHandler(e:TextEvent):void {
+ //trace(">> e.text: " + e.);
+ // Picks the character typed for workflow name
+ // Concanate it with Target Namespace
+ //targetNamespace.text = targetNamespace.text + e.text
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //trace(event.currentTarget.);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ webServiceName.text = webServiceName.text.substr(0,webServiceName.length -1);
+ }
+ }
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form height="107">
+ <mx:FormItem label="Web Service" width="310" >
+ <mx:TextInput id="webServiceName" width="211" textInput="textInputHandler(event)"/>
+ </mx:FormItem>
+
+ <mx:FormItem id="WSDLLocation" label="WSDL URL" width="310">
+ <mx:TextInput id="wsdlURL" width="212" text="http://"/>
+ </mx:FormItem>
+
+ <mx:FormItem width="312">
+ <mx:HBox width="100%">
+ <mx:FormItem label="Local File" width="101">
+ <mx:RadioButton id="FileRadio" groupName="FileAndURL"
+ click="browseLocalFile()" enabled="false"/>
+ </mx:FormItem>
+ <mx:FormItem label="WSDL URL">
+ <mx:RadioButton id="URLRadio" groupName="FileAndURL" selected="true"/>
+ </mx:FormItem>
+ </mx:HBox>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="retrieveWSDL();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/WSDLPopUp.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/WaitPopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/WaitPopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/WaitPopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();"
+ width="404" height="190" title="Add New Wait Activity in the BPEL Process">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+ import bpel.editor.gridcc.data.WaitDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+ import mx.events.ItemClickEvent;
+
+ [Bindable]
+ public var waitDO:WaitDO;
+
+ [Bindable]
+ private var nameWait:String = "";
+
+ [Bindable]
+ private var durationType:String = "";
+
+ [Bindable]
+ private var durationValue:String = "";
+
+ [Bindable]
+ private var forSelection:Boolean = false;
+
+ [Bindable]
+ private var untilSelection:Boolean = false;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ public function setWaitDO(waitDOValue:WaitDO):void {
+ waitDO = waitDOValue;
+ nameWait = waitDO.getName();
+ durationType = waitDO.waitType;
+ durationValue = waitDO.waitValue
+
+ selectIndex(durationType);
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ //nameWait = _waitDO.getName();
+ waitName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ if(modifyable)
+ waitName.enabled = false;
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ private function selectIndex(durationType:String):void{
+ if (durationType == "for"){
+ forSelection = true;
+ } else if (durationType == "until"){
+ untilSelection = true;
+ }
+ }
+
+ private function createWaitDO():void {
+ var tempArray:Array = new Array();
+ tempArray.push(["name",waitName.text]);
+ tempArray.push([paramTypeGroup.selectedValue, expressionValueInput.text]);
+
+ waitDO.attributesArray = tempArray;
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.WAIT);
+ }
+
+ private function handleType(event:ItemClickEvent):void {
+ durationType = event.currentTarget.selectedValue;
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="370" height="100" borderStyle="solid" horizontalScrollPolicy="off" verticalScrollPolicy="off">
+ <mx:FormItem label="Wait Name" width="336">
+ <mx:TextInput id="waitName" width="256" text="{nameWait}"/>
+ </mx:FormItem>
+
+ <mx:HBox horizontalAlign="center">
+ <mx:RadioButtonGroup id="paramTypeGroup" itemClick="handleType(event);" enabled="false"/>
+ <mx:RadioButton label="Wait Until Duration " groupName="paramTypeGroup" value="until" selected="{untilSelection}"/>
+ <mx:RadioButton label="Wait For Duration " groupName="paramTypeGroup"
+ value="for" selected="{forSelection}"/>
+ </mx:HBox>
+
+ <mx:FormItem label="Duration" width="336" >
+ <mx:TextInput id="expressionValueInput" width="256" text="{durationValue}"/>
+ </mx:FormItem>
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createWaitDO();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/WaitPopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/WhilePopup.mxml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/WhilePopup.mxml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/WhilePopup.mxml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();" width="386" height="170" title="Add New While in the BPEL Process">
+ <mx:Script>
+ <![CDATA[
+ import bpel.editor.gridcc.controller.WorkflowManager;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.WhileDO;
+ import mx.managers.PopUpManager;
+ import flash.events.*;
+
+ //[Bindable]
+ public var whileDO:WhileDO;
+
+ [Bindable]
+ private var nameWhile:String;
+
+ [Bindable]
+ private var conditionWhile:String;
+
+ [Bindable]
+ public var modifyable:Boolean = false;
+
+ public function setWhileDO(whileDOValue:WhileDO):void {
+ whileDO = whileDOValue;
+ nameWhile = whileDO.getName();
+ conditionWhile = whileDO.getCondtion();
+ }
+
+ private function doInit():void {
+ // Center the TitleWindow container
+ // over the control that created it.
+ PopUpManager.centerPopUp(this);
+ whileName.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
+ if(modifyable)
+ whileName.enabled = false;
+ }
+
+ private function createWhile():void {
+ var tempArray:Array = new Array();
+ tempArray.push(["name",whileName.text]);
+ tempArray.push(["condition",whileCondition.text]);
+
+ whileDO.attributesArray = tempArray;
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ PopUpManager.removePopUp(this);
+ workflowManager.popUPOKHandler(this, WorkflowActivities.WHILE);
+ }
+
+ private function keyHandler(event:KeyboardEvent):void {
+ //trace("keyUpHandler: " + event.keyCode);
+ //event.currentTarget
+ var textField:TextInput = TextInput(event.currentTarget);
+ // Key Code 65 - 90 for a - z
+ // Key Code 48 - 57 for 0 - 9
+ if(!(event.keyCode > 64 && event.keyCode < 91) && !(event.keyCode > 47 && event.keyCode < 58)){
+ // Key Code 16 for shift and // Key Code 17 for ctrl
+ if(event.keyCode != 16 && event.keyCode != 17){
+ // Key Code 37 - 40 for directional arrows
+ if(!(event.keyCode > 36 && event.keyCode < 41)){
+ textField.text = textField.text.substr(0,textField.length -1);
+ }
+ }
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Form width="352" height="82">
+ <mx:FormItem label="While Name" width="315" >
+ <mx:TextInput id="whileName" width="229" text="{nameWhile}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Condition " width="315" >
+ <mx:TextInput id="whileCondition" width="229" text="{conditionWhile}"/>
+ </mx:FormItem>
+ <!--
+ <mx:FormItem label="My Role" width="315">
+ <mx:TextInput id="myRole" width="179" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Partner Role" width="315" >
+ <mx:TextInput id="partnerRole" width="179" text=""/>
+ </mx:FormItem>
+ -->
+ </mx:Form>
+ <mx:HBox>
+ <mx:Button click="createWhile();" label="OK"/>
+ <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/>
+ </mx:HBox>
+</mx:TitleWindow>
+
+
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/WhilePopup.mxml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/AC_OETags.js
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/AC_OETags.js (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/AC_OETags.js 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,269 @@
+// Flash Player Version Detection - Rev 1.5
+// Detect Client Browser type
+// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
+var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
+var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
+var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
+
+function ControlVersion()
+{
+ var version;
+ var axo;
+ var e;
+
+ // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
+
+ try {
+ // version will be set for 7.X or greater players
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+ version = axo.GetVariable("$version");
+ } catch (e) {
+ }
+
+ if (!version)
+ {
+ try {
+ // version will be set for 6.X players only
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+
+ // installed player is some revision of 6.0
+ // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
+ // so we have to be careful.
+
+ // default to the first public version
+ version = "WIN 6,0,21,0";
+
+ // throws if AllowScripAccess does not exist (introduced in 6.0r47)
+ axo.AllowScriptAccess = "always";
+
+ // safe to call for 6.0r47 or greater
+ version = axo.GetVariable("$version");
+
+ } catch (e) {
+ }
+ }
+
+ if (!version)
+ {
+ try {
+ // version will be set for 4.X or 5.X player
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
+ version = axo.GetVariable("$version");
+ } catch (e) {
+ }
+ }
+
+ if (!version)
+ {
+ try {
+ // version will be set for 3.X player
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
+ version = "WIN 3,0,18,0";
+ } catch (e) {
+ }
+ }
+
+ if (!version)
+ {
+ try {
+ // version will be set for 2.X player
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
+ version = "WIN 2,0,0,11";
+ } catch (e) {
+ version = -1;
+ }
+ }
+
+ return version;
+}
+
+// JavaScript helper required to detect Flash Player PlugIn version information
+function GetSwfVer(){
+ // NS/Opera version >= 3 check for Flash plugin in plugin array
+ var flashVer = -1;
+
+ if (navigator.plugins != null && navigator.plugins.length > 0) {
+ if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
+ var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
+ var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
+ var descArray = flashDescription.split(" ");
+ var tempArrayMajor = descArray[2].split(".");
+ var versionMajor = tempArrayMajor[0];
+ var versionMinor = tempArrayMajor[1];
+ if ( descArray[3] != "" ) {
+ tempArrayMinor = descArray[3].split("r");
+ } else {
+ tempArrayMinor = descArray[4].split("r");
+ }
+ var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
+ var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
+ }
+ }
+ // MSN/WebTV 2.6 supports Flash 4
+ else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
+ // WebTV 2.5 supports Flash 3
+ else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
+ // older WebTV supports Flash 2
+ else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
+ else if ( isIE && isWin && !isOpera ) {
+ flashVer = ControlVersion();
+ }
+ return flashVer;
+}
+
+// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
+function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
+{
+ versionStr = GetSwfVer();
+ if (versionStr == -1 ) {
+ return false;
+ } else if (versionStr != 0) {
+ if(isIE && isWin && !isOpera) {
+ // Given "WIN 2,0,0,11"
+ tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
+ tempString = tempArray[1]; // "2,0,0,11"
+ versionArray = tempString.split(","); // ['2', '0', '0', '11']
+ } else {
+ versionArray = versionStr.split(".");
+ }
+ var versionMajor = versionArray[0];
+ var versionMinor = versionArray[1];
+ var versionRevision = versionArray[2];
+
+ // is the major.revision >= requested major.revision AND the minor version >= requested minor
+ if (versionMajor > parseFloat(reqMajorVer)) {
+ return true;
+ } else if (versionMajor == parseFloat(reqMajorVer)) {
+ if (versionMinor > parseFloat(reqMinorVer))
+ return true;
+ else if (versionMinor == parseFloat(reqMinorVer)) {
+ if (versionRevision >= parseFloat(reqRevision))
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+function AC_AddExtension(src, ext)
+{
+ if (src.indexOf('?') != -1)
+ return src.replace(/\?/, ext+'?');
+ else
+ return src + ext;
+}
+
+function AC_Generateobj(objAttrs, params, embedAttrs)
+{
+ var str = '';
+ if (isIE && isWin && !isOpera)
+ {
+ str += '<object ';
+ for (var i in objAttrs)
+ str += i + '="' + objAttrs[i] + '" ';
+ for (var i in params)
+ str += '><param name="' + i + '" value="' + params[i] + '" /> ';
+ str += '></object>';
+ } else {
+ str += '<embed ';
+ for (var i in embedAttrs)
+ str += i + '="' + embedAttrs[i] + '" ';
+ str += '> </embed>';
+ }
+
+ document.write(str);
+}
+
+function AC_FL_RunContent(){
+ var ret =
+ AC_GetArgs
+ ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
+ , "application/x-shockwave-flash"
+ );
+ AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
+}
+
+function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
+ var ret = new Object();
+ ret.embedAttrs = new Object();
+ ret.params = new Object();
+ ret.objAttrs = new Object();
+ for (var i=0; i < args.length; i=i+2){
+ var currArg = args[i].toLowerCase();
+
+ switch (currArg){
+ case "classid":
+ break;
+ case "pluginspage":
+ ret.embedAttrs[args[i]] = args[i+1];
+ break;
+ case "src":
+ case "movie":
+ args[i+1] = AC_AddExtension(args[i+1], ext);
+ ret.embedAttrs["src"] = args[i+1];
+ ret.params[srcParamName] = args[i+1];
+ break;
+ case "onafterupdate":
+ case "onbeforeupdate":
+ case "onblur":
+ case "oncellchange":
+ case "onclick":
+ case "ondblClick":
+ case "ondrag":
+ case "ondragend":
+ case "ondragenter":
+ case "ondragleave":
+ case "ondragover":
+ case "ondrop":
+ case "onfinish":
+ case "onfocus":
+ case "onhelp":
+ case "onmousedown":
+ case "onmouseup":
+ case "onmouseover":
+ case "onmousemove":
+ case "onmouseout":
+ case "onkeypress":
+ case "onkeydown":
+ case "onkeyup":
+ case "onload":
+ case "onlosecapture":
+ case "onpropertychange":
+ case "onreadystatechange":
+ case "onrowsdelete":
+ case "onrowenter":
+ case "onrowexit":
+ case "onrowsinserted":
+ case "onstart":
+ case "onscroll":
+ case "onbeforeeditfocus":
+ case "onactivate":
+ case "onbeforedeactivate":
+ case "ondeactivate":
+ case "type":
+ case "codebase":
+ case "id":
+ ret.objAttrs[args[i]] = args[i+1];
+ break;
+ case "width":
+ case "height":
+ case "align":
+ case "vspace":
+ case "hspace":
+ case "class":
+ case "title":
+ case "accesskey":
+ case "name":
+ case "tabindex":
+ ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
+ break;
+ default:
+ ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
+ }
+ }
+ ret.objAttrs["classid"] = classid;
+ if (mimeType) ret.embedAttrs["type"] = mimeType;
+ return ret;
+}
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/AC_OETags.js
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel-debug.html
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel-debug.html (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel-debug.html 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,117 @@
+<!-- saved from url=(0014)about:internet -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title></title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style>
+body { margin: 0px; overflow:hidden }
+</style>
+<script language="JavaScript" type="text/javascript">
+<!--
+// -----------------------------------------------------------------------------
+// Globals
+// Major version of Flash required
+var requiredMajorVersion = 9;
+// Minor version of Flash required
+var requiredMinorVersion = 0;
+// Minor version of Flash required
+var requiredRevision = 0;
+
+var myServletNameIs = "servletName"
+var myWorkflowNameIs = "workflowName"
+var myDirNameIs = "dirName"
+var myXXXNameIs = "XXXXName"
+// -----------------------------------------------------------------------------
+// -->
+</script>
+</head>
+
+<body scroll="no">
+<script language="JavaScript" type="text/javascript" src="history.js"></script>
+<script language="JavaScript" type="text/javascript">
+<!--
+// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
+var hasProductInstall = DetectFlashVer(6, 0, 65);
+
+
+// Version check based upon the values defined in globals
+var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
+
+
+// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
+if ( hasProductInstall && !hasRequestedVersion ) {
+ // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
+ // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
+ // DO NOT MODIFY THE FOLLOWING FOUR LINES
+ // Location visited after installation is complete if installation is required
+ var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
+ var MMredirectURL = window.location;
+ document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+ var MMdoctitle = document.title;
+
+ AC_FL_RunContent(
+ "src", "playerProductInstall",
+ "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "ActivityPanel",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "ActivityPanel",
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+} else if (hasRequestedVersion) {
+ // if we've detected an acceptable version
+ // embed the Flash Content SWF when all tests are passed
+ AC_FL_RunContent(
+ "src", "ActivityPanel-debug",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "ActivityPanel",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "ActivityPanel",
+ "flashvars",'myServletNameIs=' + myServletNameIs + '&myWorkflowNameIs=' + myWorkflowNameIs + '&myDirNameIs=' + myDirNameIs + '&historyUrl=history.htm%3F&lconid=' + lc_id + '',
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+ } else { // flash is too old or we can't detect the plugin
+ var alternateContent = 'Alternate HTML content should be placed here. '
+ + 'This content requires the Adobe Flash Player. '
+ + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
+ document.write(alternateContent); // insert non-flash content
+ }
+// -->
+</script>
+<noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ id="ActivityPanel" width="100%" height="100%"
+ codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
+ <param name="movie" value="ActivityPanel-debug.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#869ca7" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="FlashVars" value="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs />
+ <param name="FlashVars" value="one=1&two=2" />
+ <embed src="ActivityPanel-debug.swf" quality="high" bgcolor="#869ca7"
+ FlashVars="one=1&two=2"
+ width="100%" height="100%" name="ActivityPanel" align="middle"
+ play="true"
+ loop="false"
+ quality="high"
+ FlashVars="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs
+ allowScriptAccess="sameDomain"
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.adobe.com/go/getflashplayer">
+ </embed>
+ </object>
+</noscript>
+<iframe name="_history" src="history.htm" frameborder="0" scrolling="no" width="22" height="0"></iframe>
+</body>
+</html>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel-debug.html
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel-debug.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel-debug.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel.html
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel.html (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel.html 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,117 @@
+<!-- saved from url=(0014)about:internet -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title></title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style>
+body { margin: 0px; overflow:hidden }
+</style>
+<script language="JavaScript" type="text/javascript">
+<!--
+// -----------------------------------------------------------------------------
+// Globals
+// Major version of Flash required
+var requiredMajorVersion = 9;
+// Minor version of Flash required
+var requiredMinorVersion = 0;
+// Minor version of Flash required
+var requiredRevision = 0;
+
+var myServletNameIs = "servletName"
+var myWorkflowNameIs = "workflowName"
+var myDirNameIs = "dirName"
+var myXXXNameIs = "XXXXName"
+// -----------------------------------------------------------------------------
+// -->
+</script>
+</head>
+
+<body scroll="no">
+<script language="JavaScript" type="text/javascript" src="history.js"></script>
+<script language="JavaScript" type="text/javascript">
+<!--
+// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
+var hasProductInstall = DetectFlashVer(6, 0, 65);
+
+
+// Version check based upon the values defined in globals
+var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
+
+
+// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
+if ( hasProductInstall && !hasRequestedVersion ) {
+ // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
+ // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
+ // DO NOT MODIFY THE FOLLOWING FOUR LINES
+ // Location visited after installation is complete if installation is required
+ var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
+ var MMredirectURL = window.location;
+ document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+ var MMdoctitle = document.title;
+
+ AC_FL_RunContent(
+ "src", "playerProductInstall",
+ "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "ActivityPanel",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "ActivityPanel",
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+} else if (hasRequestedVersion) {
+ // if we've detected an acceptable version
+ // embed the Flash Content SWF when all tests are passed
+ AC_FL_RunContent(
+ "src", "ActivityPanel",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "ActivityPanel",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "ActivityPanel",
+ "flashvars",'myServletNameIs=' + myServletNameIs + '&myWorkflowNameIs=' + myWorkflowNameIs + '&myDirNameIs=' + myDirNameIs + '&historyUrl=history.htm%3F&lconid=' + lc_id + '',
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+ } else { // flash is too old or we can't detect the plugin
+ var alternateContent = 'Alternate HTML content should be placed here. '
+ + 'This content requires the Adobe Flash Player. '
+ + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
+ document.write(alternateContent); // insert non-flash content
+ }
+// -->
+</script>
+<noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ id="ActivityPanel" width="100%" height="100%"
+ codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
+ <param name="movie" value="ActivityPanel.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#869ca7" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="FlashVars" value="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs />
+ <param name="FlashVars" value="one=1&two=2" />
+ <embed src="ActivityPanel.swf" quality="high" bgcolor="#869ca7"
+ FlashVars="one=1&two=2"
+ width="100%" height="100%" name="ActivityPanel" align="middle"
+ play="true"
+ loop="false"
+ quality="high"
+ FlashVars="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs
+ allowScriptAccess="sameDomain"
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.adobe.com/go/getflashplayer">
+ </embed>
+ </object>
+</noscript>
+<iframe name="_history" src="history.htm" frameborder="0" scrolling="no" width="22" height="0"></iframe>
+</body>
+</html>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel.html
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/ActivityPanel.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor-debug.html
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor-debug.html (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor-debug.html 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,117 @@
+<!-- saved from url=(0014)about:internet -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title></title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style>
+body { margin: 0px; overflow:hidden }
+</style>
+<script language="JavaScript" type="text/javascript">
+<!--
+// -----------------------------------------------------------------------------
+// Globals
+// Major version of Flash required
+var requiredMajorVersion = 9;
+// Minor version of Flash required
+var requiredMinorVersion = 0;
+// Minor version of Flash required
+var requiredRevision = 0;
+
+var myServletNameIs = "servletName"
+var myWorkflowNameIs = "workflowName"
+var myDirNameIs = "dirName"
+var myXXXNameIs = "XXXXName"
+// -----------------------------------------------------------------------------
+// -->
+</script>
+</head>
+
+<body scroll="no">
+<script language="JavaScript" type="text/javascript" src="history.js"></script>
+<script language="JavaScript" type="text/javascript">
+<!--
+// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
+var hasProductInstall = DetectFlashVer(6, 0, 65);
+
+
+// Version check based upon the values defined in globals
+var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
+
+
+// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
+if ( hasProductInstall && !hasRequestedVersion ) {
+ // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
+ // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
+ // DO NOT MODIFY THE FOLLOWING FOUR LINES
+ // Location visited after installation is complete if installation is required
+ var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
+ var MMredirectURL = window.location;
+ document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+ var MMdoctitle = document.title;
+
+ AC_FL_RunContent(
+ "src", "playerProductInstall",
+ "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "BPELEditor",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "BPELEditor",
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+} else if (hasRequestedVersion) {
+ // if we've detected an acceptable version
+ // embed the Flash Content SWF when all tests are passed
+ AC_FL_RunContent(
+ "src", "BPELEditor-debug",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "BPELEditor",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "BPELEditor",
+ "flashvars",'myServletNameIs=' + myServletNameIs + '&myWorkflowNameIs=' + myWorkflowNameIs + '&myDirNameIs=' + myDirNameIs + '&historyUrl=history.htm%3F&lconid=' + lc_id + '',
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+ } else { // flash is too old or we can't detect the plugin
+ var alternateContent = 'Alternate HTML content should be placed here. '
+ + 'This content requires the Adobe Flash Player. '
+ + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
+ document.write(alternateContent); // insert non-flash content
+ }
+// -->
+</script>
+<noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ id="BPELEditor" width="100%" height="100%"
+ codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
+ <param name="movie" value="BPELEditor-debug.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#869ca7" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="FlashVars" value="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs />
+ <param name="FlashVars" value="one=1&two=2" />
+ <embed src="BPELEditor-debug.swf" quality="high" bgcolor="#869ca7"
+ FlashVars="one=1&two=2"
+ width="100%" height="100%" name="BPELEditor" align="middle"
+ play="true"
+ loop="false"
+ quality="high"
+ FlashVars="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs
+ allowScriptAccess="sameDomain"
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.adobe.com/go/getflashplayer">
+ </embed>
+ </object>
+</noscript>
+<iframe name="_history" src="history.htm" frameborder="0" scrolling="no" width="22" height="0"></iframe>
+</body>
+</html>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor-debug.html
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor-debug.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor-debug.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor.html
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor.html (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor.html 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,117 @@
+<!-- saved from url=(0014)about:internet -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title></title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style>
+body { margin: 0px; overflow:hidden }
+</style>
+<script language="JavaScript" type="text/javascript">
+<!--
+// -----------------------------------------------------------------------------
+// Globals
+// Major version of Flash required
+var requiredMajorVersion = 9;
+// Minor version of Flash required
+var requiredMinorVersion = 0;
+// Minor version of Flash required
+var requiredRevision = 124;
+
+var myServletNameIs = "servletName"
+var myWorkflowNameIs = "workflowName"
+var myDirNameIs = "dirName"
+var myXXXNameIs = "XXXXName"
+// -----------------------------------------------------------------------------
+// -->
+</script>
+</head>
+
+<body scroll="no">
+<script language="JavaScript" type="text/javascript" src="history.js"></script>
+<script language="JavaScript" type="text/javascript">
+<!--
+// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
+var hasProductInstall = DetectFlashVer(6, 0, 65);
+
+
+// Version check based upon the values defined in globals
+var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
+
+
+// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
+if ( hasProductInstall && !hasRequestedVersion ) {
+ // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
+ // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
+ // DO NOT MODIFY THE FOLLOWING FOUR LINES
+ // Location visited after installation is complete if installation is required
+ var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
+ var MMredirectURL = window.location;
+ document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+ var MMdoctitle = document.title;
+
+ AC_FL_RunContent(
+ "src", "playerProductInstall",
+ "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "BPELEditor",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "BPELEditor",
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+} else if (hasRequestedVersion) {
+ // if we've detected an acceptable version
+ // embed the Flash Content SWF when all tests are passed
+ AC_FL_RunContent(
+ "src", "BPELEditor",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "BPELEditor",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "BPELEditor",
+ "flashvars",'myServletNameIs=' + myServletNameIs + '&myWorkflowNameIs=' + myWorkflowNameIs + '&myDirNameIs=' + myDirNameIs + '&historyUrl=history.htm%3F&lconid=' + lc_id + '',
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+ } else { // flash is too old or we can't detect the plugin
+ var alternateContent = 'Alternate HTML content should be placed here. '
+ + 'This content requires the Adobe Flash Player. '
+ + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
+ document.write(alternateContent); // insert non-flash content
+ }
+// -->
+</script>
+<noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ id="BPELEditor" width="100%" height="100%"
+ codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
+ <param name="movie" value="BPELEditor.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#869ca7" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="FlashVars" value="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs />
+ <param name="FlashVars" value="one=1&two=2" />
+ <embed src="BPELEditor.swf" quality="high" bgcolor="#869ca7"
+ FlashVars="one=1&two=2"
+ width="100%" height="100%" name="BPELEditor" align="middle"
+ play="true"
+ loop="false"
+ quality="high"
+ FlashVars="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs
+ allowScriptAccess="sameDomain"
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.adobe.com/go/getflashplayer">
+ </embed>
+ </object>
+</noscript>
+<iframe name="_history" src="history.htm" frameborder="0" scrolling="no" width="22" height="0"></iframe>
+</body>
+</html>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor.html
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/BPELEditor.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iml (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iml 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="false" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.ipr
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.ipr (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.ipr 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,325 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project relativePaths="false" version="4">
+ <component name="AntConfiguration">
+ <defaultAnt bundledAnt="true" />
+ <buildFile url="file://$PROJECT_DIR$/build.xml">
+ <additionalClassPath />
+ <antReference projectDefault="true" />
+ <customJdkName value="" />
+ <maximumHeapSize value="128" />
+ <maximumStackSize value="32" />
+ <properties />
+ </buildFile>
+ </component>
+ <component name="BuildJarProjectSettings">
+ <option name="BUILD_JARS_ON_MAKE" value="false" />
+ </component>
+ <component name="CodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS" />
+ <option name="USE_PER_PROJECT_SETTINGS" value="false" />
+ </component>
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <option name="DEPLOY_AFTER_MAKE" value="0" />
+ <resourceExtensions>
+ <entry name=".+\.(properties|xml|html|dtd|tld)" />
+ <entry name=".+\.(gif|png|jpeg|jpg)" />
+ </resourceExtensions>
+ <wildcardResourcePatterns>
+ <entry name="?*.properties" />
+ <entry name="?*.xml" />
+ <entry name="?*.gif" />
+ <entry name="?*.png" />
+ <entry name="?*.jpeg" />
+ <entry name="?*.jpg" />
+ <entry name="?*.html" />
+ <entry name="?*.dtd" />
+ <entry name="?*.tld" />
+ <entry name="?*.ftl" />
+ </wildcardResourcePatterns>
+ </component>
+ <component name="CopyrightManager" default="">
+ <module2copyright />
+ </component>
+ <component name="DependencyValidationManager">
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </component>
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
+ <component name="IdProvider" IDEtalkID="6F6B4F568FA82EFAE0C90DA010FF1B40" />
+ <component name="InspectionProjectProfileManager">
+ <option name="PROJECT_PROFILE" value="Project Default" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ <scopes />
+ <profiles>
+ <profile version="1.0" is_locked="false">
+ <option name="myName" value="Project Default" />
+ <option name="myLocal" value="false" />
+ </profile>
+ </profiles>
+ <list size="0" />
+ </component>
+ <component name="JavadocGenerationManager">
+ <option name="OUTPUT_DIRECTORY" />
+ <option name="OPTION_SCOPE" value="protected" />
+ <option name="OPTION_HIERARCHY" value="true" />
+ <option name="OPTION_NAVIGATOR" value="true" />
+ <option name="OPTION_INDEX" value="true" />
+ <option name="OPTION_SEPARATE_INDEX" value="true" />
+ <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
+ <option name="OPTION_DEPRECATED_LIST" value="true" />
+ <option name="OTHER_OPTIONS" value="" />
+ <option name="HEAP_SIZE" />
+ <option name="LOCALE" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ </component>
+ <component name="Palette2">
+ <group name="Swing">
+ <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+ </item>
+ <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+ <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+ <initial-values>
+ <property name="text" value="Button" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="RadioButton" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="CheckBox" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="Label" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+ <preferred-size width="-1" height="20" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+ </item>
+ </group>
+ </component>
+ <component name="ProjectDetails">
+ <option name="projectName" value="NewBPELEditor" />
+ </component>
+ <component name="ProjectFileVersion" converted="true" />
+ <component name="ProjectKey">
+ <option name="state" value="project://C:\Users\Rikkkola\Desktop\Web Based Flex Editor\Codes\NewBPELEditor\NewBPELEditor.ipr" />
+ </component>
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/NewBPELEditor.iml" filepath="$PROJECT_DIR$/NewBPELEditor.iml" />
+ </modules>
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/out" />
+ </component>
+ <component name="ResourceManagerContainer">
+ <option name="myResourceBundles">
+ <value>
+ <list size="0" />
+ </value>
+ </option>
+ </component>
+ <component name="SvnBranchConfigurationManager">
+ <option name="mySupportsUserInfoFilter" value="true" />
+ </component>
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="" />
+ </component>
+ <component name="WebServicesPlugin" addRequiredLibraries="true" />
+ <component name="masterDetails">
+ <option name="states">
+ <map>
+ <entry key="Copyright.UI">
+ <value>
+ <UIState>
+ <option name="proportions">
+ <SplitterProportionsDataImpl />
+ </option>
+ </UIState>
+ </value>
+ </entry>
+ <entry key="Errors.UI">
+ <value>
+ <UIState>
+ <option name="proportions">
+ <SplitterProportionsDataImpl />
+ </option>
+ </UIState>
+ </value>
+ </entry>
+ <entry key="ProjectJDKs.UI">
+ <value>
+ <UIState>
+ <option name="proportions">
+ <SplitterProportionsDataImpl>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </SplitterProportionsDataImpl>
+ </option>
+ <option name="lastEditedConfigurable" value="1.6" />
+ </UIState>
+ </value>
+ </entry>
+ <entry key="ScopeChooserConfigurable.UI">
+ <value>
+ <UIState>
+ <option name="proportions">
+ <SplitterProportionsDataImpl />
+ </option>
+ </UIState>
+ </value>
+ </entry>
+ </map>
+ </option>
+ <option name="myStates">
+ <map>
+ <entry key="Copyright.UI">
+ <value>
+ <UIState>
+ <option name="proportions">
+ <SplitterProportionsDataImpl />
+ </option>
+ </UIState>
+ </value>
+ </entry>
+ <entry key="Errors.UI">
+ <value>
+ <UIState>
+ <option name="proportions">
+ <SplitterProportionsDataImpl />
+ </option>
+ </UIState>
+ </value>
+ </entry>
+ <entry key="ProjectJDKs.UI">
+ <value>
+ <UIState>
+ <option name="proportions">
+ <SplitterProportionsDataImpl>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </SplitterProportionsDataImpl>
+ </option>
+ <option name="lastEditedConfigurable" value="1.6" />
+ </UIState>
+ </value>
+ </entry>
+ <entry key="ScopeChooserConfigurable.UI">
+ <value>
+ <UIState>
+ <option name="proportions">
+ <SplitterProportionsDataImpl />
+ </option>
+ </UIState>
+ </value>
+ </entry>
+ </map>
+ </option>
+ </component>
+</project>
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.ipr
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iws
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iws (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iws 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,414 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project relativePaths="false" version="4">
+ <component name="CCaseConfig">
+ <option name="checkoutReserved" value="false" />
+ <option name="markExternalChangeAsUpToDate" value="true" />
+ <option name="checkInUseHijack" value="true" />
+ <option name="useUcmModel" value="true" />
+ <option name="isOffline" value="false" />
+ <option name="synchOutside" value="false" />
+ <option name="isHistoryResticted" value="true" />
+ <option name="useIdenticalSwitch" value="true" />
+ <option name="synchActivitiesOnRefresh" value="true" />
+ <option name="lastScr" value="" />
+ <option name="scrTextFileName" value="" />
+ <option name="historyRevisionsNumber" value="4" />
+ </component>
+ <component name="ChangeListManager">
+ <list default="true" name="Default" comment="" />
+ <ignored path="NewBPELEditor.iws" />
+ <ignored path=".idea/workspace.xml" />
+ </component>
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="Commander">
+ <leftPanel />
+ <rightPanel />
+ <splitter proportion="0.5" />
+ </component>
+ <component name="CreatePatchCommitExecutor">
+ <option name="PATCH_PATH" value="" />
+ <option name="REVERSE_PATCH" value="false" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="DebuggerManager">
+ <breakpoint_any>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ </breakpoint_any>
+ <breakpoint_rules />
+ <ui_properties />
+ </component>
+ <component name="FavoritesManager">
+ <favorites_list name="NewBPELEditor" />
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="build.xml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/build.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="flex-config.xml" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/flex-config.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="7" column="45" selection-start="209" selection-end="209" vertical-scroll-proportion="0.20623916">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="local.build.properties" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/local.build.properties">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="4" column="45" selection-start="283" selection-end="283" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="ModuleEditorState">
+ <option name="LAST_EDITED_MODULE_NAME" />
+ <option name="LAST_EDITED_TAB_NAME" />
+ </component>
+ <component name="ProjectLevelVcsManager">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <OptionsSetting value="true" id="Undo Check Out" />
+ <OptionsSetting value="true" id="Get Latest Version" />
+ <ConfirmationsSetting value="0" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="NewBPELEditor" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="NewBPELEditor" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="NewBPELEditor" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="NewBPELEditor" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="NewBPELEditor" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="0.5" version="1" splitterProportion="0.5">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <showStructure ProjectPane="false" />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="GoToFile.includeJavaFiles" value="false" />
+ <property name="GoToClass.toSaveIncludeLibraries" value="false" />
+ <property name="MemberChooser.sorted" value="false" />
+ <property name="MemberChooser.showClasses" value="true" />
+ <property name="GoToClass.includeLibraries" value="false" />
+ <property name="MemberChooser.copyJavadoc" value="false" />
+ </component>
+ <component name="RunManager">
+ <configuration default="true" type="Remote" factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
+ </configuration>
+ <configuration default="true" type="Applet" factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ </configuration>
+ <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false" runner="emma">
+ <option name="MAIN_CLASS_NAME" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <module name="" />
+ <envs />
+ </configuration>
+ <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false" runner="emma">
+ <module name="" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="PACKAGE_NAME" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="METHOD_NAME" />
+ <option name="TEST_OBJECT" value="class" />
+ <option name="VM_PARAMETERS" />
+ <option name="PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <option name="ADDITIONAL_CLASS_PATH" />
+ <option name="TEST_SEARCH_SCOPE">
+ <value defaultName="moduleWithDependencies" />
+ </option>
+ <envs />
+ </configuration>
+ <list size="0" />
+ <configuration name="<template>" type="WebApp" default="true" selected="false">
+ <Host>localhost</Host>
+ <Port>5050</Port>
+ </configuration>
+ </component>
+ <component name="ShelveChangesManager" show_recycled="false" />
+ <component name="StarteamConfiguration">
+ <option name="SERVER" value="" />
+ <option name="PORT" value="49201" />
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="PROJECT" value="" />
+ <option name="VIEW" value="" />
+ <option name="ALTERNATIVE_WORKING_PATH" value="" />
+ <option name="LOCK_ON_CHECKOUT" value="false" />
+ <option name="UNLOCK_ON_CHECKIN" value="false" />
+ </component>
+ <component name="StructureViewFactory">
+ <option name="AUTOSCROLL_MODE" value="true" />
+ <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
+ <option name="ACTIVE_ACTIONS" value="" />
+ </component>
+ <component name="SvnConfiguration">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="UPDATE_RUN_STATUS" value="false" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+ <configuration useDefault="true">C:\Users\Rikkkola\AppData\Roaming\Subversion</configuration>
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+ <supportedVersion>125</supportedVersion>
+ </component>
+ <component name="TodoView" selected-index="0">
+ <todo-panel id="selected-file">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="true" />
+ </todo-panel>
+ <todo-panel id="all">
+ <are-packages-shown value="true" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="true" />
+ </todo-panel>
+ <todo-panel id="default-changelist">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </todo-panel>
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="66" y="-8" width="1622" height="1066" extended-state="0" />
+ <editor active="false" />
+ <layout>
+ <window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" />
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" />
+ <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2496799" sideWeight="0.66263735" order="1" side_tool="false" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" />
+ <window_info id="Dataflow to this" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" />
+ <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" />
+ <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" />
+ <window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32967034" sideWeight="0.5" order="7" side_tool="false" />
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" />
+ <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2496799" sideWeight="0.66263735" order="0" side_tool="false" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" />
+ <window_info id="Web Preview" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32967034" sideWeight="0.5" order="7" side_tool="false" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" />
+ </layout>
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+ <option name="LAST_COMMIT_MESSAGE" />
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+ <option name="ACTIVE_VCS_NAME" />
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+ <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+ </component>
+ <component name="VssConfiguration">
+ <option name="CLIENT_PATH" value="" />
+ <option name="SRCSAFEINI_PATH" value="" />
+ <option name="USER_NAME" value="" />
+ <option name="PWD" value="" />
+ <CheckoutOptions>
+ <option name="COMMENT" value="" />
+ <option name="DO_NOT_GET_LATEST_VERSION" value="false" />
+ <option name="REPLACE_WRITABLE" value="false" />
+ <option name="RECURSIVE" value="false" />
+ </CheckoutOptions>
+ <CheckinOptions>
+ <option name="COMMENT" value="" />
+ <option name="KEEP_CHECKED_OUT" value="false" />
+ <option name="RECURSIVE" value="false" />
+ </CheckinOptions>
+ <AddOptions>
+ <option name="STORE_ONLY_LATEST_VERSION" value="false" />
+ <option name="CHECK_OUT_IMMEDIATELY" value="false" />
+ </AddOptions>
+ <UndocheckoutOptions>
+ <option name="MAKE_WRITABLE" value="false" />
+ <option name="REPLACE_LOCAL_COPY" value="2" />
+ <option name="RECURSIVE" value="false" />
+ </UndocheckoutOptions>
+ <GetOptions>
+ <option name="REPLACE_WRITABLE" value="0" />
+ <option name="MAKE_WRITABLE" value="false" />
+ <option name="ANSWER_NEGATIVELY" value="false" />
+ <option name="ANSWER_POSITIVELY" value="false" />
+ <option name="RECURSIVE" value="false" />
+ <option name="VERSION" />
+ </GetOptions>
+ </component>
+ <component name="XDebuggerManager">
+ <breakpoint-manager />
+ </component>
+ <component name="XPathView.XPathProjectComponent">
+ <history />
+ <find-history />
+ </component>
+ <component name="antWorkspaceConfiguration">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="FILTER_TARGETS" value="false" />
+ <buildFile url="file://$PROJECT_DIR$/build.xml">
+ <antCommandLine value="" />
+ <runInBackground value="true" />
+ <targetFilters />
+ <treeView value="true" />
+ <verbose value="true" />
+ <viewClosedWhenNoErrors value="false" />
+ </buildFile>
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/build.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/local.build.properties">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="4" column="45" selection-start="283" selection-end="283" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/flex-config.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="7" column="45" selection-start="209" selection-end="209" vertical-scroll-proportion="0.20623916">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/NewBPELEditor.iws
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload-debug.html
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload-debug.html (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload-debug.html 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,107 @@
+<!-- saved from url=(0014)about:internet -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title></title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style>
+body { margin: 0px; overflow:hidden }
+</style>
+<script language="JavaScript" type="text/javascript">
+<!--
+// -----------------------------------------------------------------------------
+// Globals
+// Major version of Flash required
+var requiredMajorVersion = 9;
+// Minor version of Flash required
+var requiredMinorVersion = 0;
+// Minor version of Flash required
+var requiredRevision = 0;
+// -----------------------------------------------------------------------------
+// -->
+</script>
+</head>
+
+<body scroll="no">
+<script language="JavaScript" type="text/javascript" src="history.js"></script>
+<script language="JavaScript" type="text/javascript">
+<!--
+// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
+var hasProductInstall = DetectFlashVer(6, 0, 65);
+
+// Version check based upon the values defined in globals
+var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
+
+
+// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
+if ( hasProductInstall && !hasRequestedVersion ) {
+ // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
+ // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
+ // DO NOT MODIFY THE FOLLOWING FOUR LINES
+ // Location visited after installation is complete if installation is required
+ var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
+ var MMredirectURL = window.location;
+ document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+ var MMdoctitle = document.title;
+
+ AC_FL_RunContent(
+ "src", "playerProductInstall",
+ "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "SharedObjectFileUpload",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "SharedObjectFileUpload",
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+} else if (hasRequestedVersion) {
+ // if we've detected an acceptable version
+ // embed the Flash Content SWF when all tests are passed
+ AC_FL_RunContent(
+ "src", "SharedObjectFileUpload-debug",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "SharedObjectFileUpload",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "SharedObjectFileUpload",
+ "flashvars",'historyUrl=history.htm%3F&lconid=' + lc_id + '',
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+ } else { // flash is too old or we can't detect the plugin
+ var alternateContent = 'Alternate HTML content should be placed here. '
+ + 'This content requires the Adobe Flash Player. '
+ + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
+ document.write(alternateContent); // insert non-flash content
+ }
+// -->
+</script>
+<noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ id="SharedObjectFileUpload" width="100%" height="100%"
+ codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
+ <param name="movie" value="SharedObjectFileUpload-debug.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#869ca7" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <embed src="SharedObjectFileUpload-debug.swf" quality="high" bgcolor="#869ca7"
+ width="100%" height="100%" name="SharedObjectFileUpload" align="middle"
+ play="true"
+ loop="false"
+ quality="high"
+ allowScriptAccess="sameDomain"
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.adobe.com/go/getflashplayer">
+ </embed>
+ </object>
+</noscript>
+<iframe name="_history" src="history.htm" frameborder="0" scrolling="no" width="22" height="0"></iframe>
+</body>
+</html>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload-debug.html
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload-debug.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload-debug.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload.html
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload.html (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload.html 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,107 @@
+<!-- saved from url=(0014)about:internet -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title></title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style>
+body { margin: 0px; overflow:hidden }
+</style>
+<script language="JavaScript" type="text/javascript">
+<!--
+// -----------------------------------------------------------------------------
+// Globals
+// Major version of Flash required
+var requiredMajorVersion = 9;
+// Minor version of Flash required
+var requiredMinorVersion = 0;
+// Minor version of Flash required
+var requiredRevision = 0;
+// -----------------------------------------------------------------------------
+// -->
+</script>
+</head>
+
+<body scroll="no">
+<script language="JavaScript" type="text/javascript" src="history.js"></script>
+<script language="JavaScript" type="text/javascript">
+<!--
+// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
+var hasProductInstall = DetectFlashVer(6, 0, 65);
+
+// Version check based upon the values defined in globals
+var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
+
+
+// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
+if ( hasProductInstall && !hasRequestedVersion ) {
+ // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
+ // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
+ // DO NOT MODIFY THE FOLLOWING FOUR LINES
+ // Location visited after installation is complete if installation is required
+ var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
+ var MMredirectURL = window.location;
+ document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+ var MMdoctitle = document.title;
+
+ AC_FL_RunContent(
+ "src", "playerProductInstall",
+ "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "SharedObjectFileUpload",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "SharedObjectFileUpload",
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+} else if (hasRequestedVersion) {
+ // if we've detected an acceptable version
+ // embed the Flash Content SWF when all tests are passed
+ AC_FL_RunContent(
+ "src", "SharedObjectFileUpload",
+ "width", "100%",
+ "height", "100%",
+ "align", "middle",
+ "id", "SharedObjectFileUpload",
+ "quality", "high",
+ "bgcolor", "#869ca7",
+ "name", "SharedObjectFileUpload",
+ "flashvars",'historyUrl=history.htm%3F&lconid=' + lc_id + '',
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+ } else { // flash is too old or we can't detect the plugin
+ var alternateContent = 'Alternate HTML content should be placed here. '
+ + 'This content requires the Adobe Flash Player. '
+ + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
+ document.write(alternateContent); // insert non-flash content
+ }
+// -->
+</script>
+<noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ id="SharedObjectFileUpload" width="100%" height="100%"
+ codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
+ <param name="movie" value="SharedObjectFileUpload.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#869ca7" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <embed src="SharedObjectFileUpload.swf" quality="high" bgcolor="#869ca7"
+ width="100%" height="100%" name="SharedObjectFileUpload" align="middle"
+ play="true"
+ loop="false"
+ quality="high"
+ allowScriptAccess="sameDomain"
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.adobe.com/go/getflashplayer">
+ </embed>
+ </object>
+</noscript>
+<iframe name="_history" src="history.htm" frameborder="0" scrolling="no" width="22" height="0"></iframe>
+</body>
+</html>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload.html
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/SharedObjectFileUpload.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,85 @@
+/*
+ private function loadWorkflowFromServer(fileType:String):void {
+
+ trace("loadWorkflowFromServer " + fileType);
+ tempURLRequest = new URLRequest(servletURL);
+ var operationString:String = "operation=retrieve&";
+ var fullPath:String = "fullPath="+dirName+"&";
+ //var fileNameTemp:String = "fileName="+ processCreator.BPELProcess. at name ;
+ var fileNameTemp:String = "fileName="+ fileName;
+
+ switch(fileType){
+ case "wsdl":
+ fileNameTemp = fileNameTemp+".wsdl";
+
+ var tempWSDLLoader:URLLoader = new URLLoader();
+ var tempVariables2:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp );
+ tempWSDLLoader.addEventListener(Event.COMPLETE, completeWSDLLoadHandler);
+ tempURLRequest.data = tempVariables2;
+ tempWSDLLoader.load(tempURLRequest);
+ break;
+
+ case "bpel":
+ fileNameTemp = fileNameTemp+".bpel";
+
+ var tempBPELLoader:URLLoader = new URLLoader();
+ var tempBPELVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp);
+ tempBPELLoader.addEventListener(Event.COMPLETE, completeBPELLoadHandler);
+
+ tempURLRequest.data = tempBPELVariables;
+ tempBPELLoader.load(tempURLRequest);
+
+ break;
+
+ case "pdd":
+ fileNameTemp = fileNameTemp+".pdd";
+
+ var tempPDDLoader:URLLoader = new URLLoader();
+ var tempPDDVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp);
+ tempPDDLoader.addEventListener(Event.COMPLETE, completePDDLoadHandler);
+
+ tempURLRequest.data = tempPDDVariables;
+ tempPDDLoader.load(tempURLRequest);
+
+ break;
+
+ case "QoS":
+ fileNameTemp = fileNameTemp+".qos";
+ // To BE Done
+ //fileContent = fileContent + QOS
+
+ break;
+ }
+ }
+
+ private function completeBPELLoadHandler(event:Event):void{
+ //trace("BBPPEELL");
+ //trace(event.target.data);
+ processCreator.BPELProcess = new XML (event.target.data);
+ createGUIFromBPELProcess();
+ loadWorkflowFromServer("pdd");
+ }
+
+ private function completeWSDLLoadHandler(event:Event):void{
+ //trace("WWSDDDDDDLLLLL");
+ //trace(event.target.data);
+ //processCreator.BPELWSDL = new XML (event.target.data);
+ WSDLCreator.getInstance().WorkflowWSDL = new XML (event.target.data);
+ loadWorkflowFromServer("bpel");
+ }
+
+ private function completePDDLoadHandler(event:Event):void{
+ //trace("PDD");
+ //trace(event.target.data);
+
+ // This part is only to avoid the complications
+ trace("WS Local Name passed to PDD Creator: " + fileName);
+ var pddCreator:PDDCreator = PDDCreator.createInstance(this.fileName,"Dummy/Namespace");
+ pddCreator.WorkflowPDD = null;
+
+ // This is acturally loading and assigning the PDD file
+ pddCreator.WorkflowPDD = new XML (event.target.data);
+ //loadWorkflowFromServer("QoS");
+ }
+
+ */
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,102 @@
+ /*
+ private function saveWorkflowOnServer(fileType:String):void {
+ trace("saveWorkflowOnServer " + fileType);
+ tempURLRequest = new URLRequest(servletURL);
+ tempURLRequest.method = URLRequestMethod.POST;
+
+ var operationString:String = "operation=save&";
+ var fullPath:String = "fullPath="+dirName+"&";
+ //var fileNameTemp:String = "fileName="+ processCreator.BPELProcess. at name ;
+ var fileNameTemp:String = "fileName="+ fileName;
+ var fileContent:String = "fileContent=";
+
+
+ switch(fileType){
+ case "wsdl":
+ fileNameTemp = fileNameTemp+".wsdl&";
+ fileContent = fileContent + WSDLCreator.getInstance().WorkflowWSDL;
+
+
+ var WSDLLoader:URLLoader = new URLLoader();
+ var tempVariables2:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp + fileContent);
+ WSDLLoader.addEventListener(Event.COMPLETE, completeWSDLHandler);
+ tempURLRequest.data = tempVariables2;
+ WSDLLoader.load(tempURLRequest);
+ break;
+
+ case "bpel":
+ fileNameTemp = fileNameTemp+".bpel&";
+ fileContent = fileContent + processCreator.BPELProcess;
+
+ var tempBPELLoader:URLLoader = new URLLoader();
+ var tempBPELVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp + fileContent);
+ tempBPELLoader.addEventListener(Event.COMPLETE, completeBPELHandler);
+ tempURLRequest.data = tempBPELVariables;
+ tempBPELLoader.load(tempURLRequest);
+
+ break;
+
+ case "QoS":
+ fileNameTemp = fileNameTemp+".qos";
+ // To BE Done
+ //fileContent = fileContent + QOS
+
+ break;
+
+ case "pdd":
+ fileNameTemp = fileNameTemp + ".pdd";
+
+ fileContent = fileContent + PDDCreator.getInstance().WorkflowPDD;
+
+ var tempPDDLoader:URLLoader = new URLLoader();
+ var tempPDDVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp + fileContent);
+ tempPDDLoader.addEventListener(Event.COMPLETE, completePDDHandler);
+ tempURLRequest.data = tempPDDVariables;
+ tempPDDLoader.load(tempURLRequest);
+
+ break;
+
+ case "catalog":
+ fileNameTemp = "wsdlCatalog.xml";
+
+ fileContent = fileContent + WSDLCatalogCreator.getInstance().WSDLCatalog;
+
+ // WC stands for WSDL Catalog
+
+ var tempWCLoader:URLLoader = new URLLoader();
+ var tempWCVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp + fileContent);
+ tempWCLoader.addEventListener(Event.COMPLETE, completeWCHandler);
+ tempURLRequest.data = tempWCVariables;
+ tempWCLoader.load(tempURLRequest);
+
+ break;
+
+ case "subDoc":
+ fileNameTemp = fileNameTemp + ".xml";
+ // To BE Done
+ //fileContent = fileContent + QOS
+
+ break;
+ }
+ }
+
+ private function completeBPELHandler(event:Event):void{
+ //saveWorkflowOnServer("pdd");
+ }
+
+ private function completeWSDLHandler(event:Event):void{
+ saveWorkflowOnServer("bpel");
+ }
+
+ private function completePDDHandler(event:Event):void{
+ //saveWorkflowOnServer("catalog");
+ }
+
+ private function completeWCHandler(event:Event):void{
+ //saveWorkflowOnServer("subDoc");
+ }
+
+ private function completeQoSHandler(event:Event):void{
+ //saveWorkflowOnServer("QoS");
+ }
+ */
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/gg.txt
===================================================================
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/gg.txt
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.htm
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.htm (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.htm 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,21 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<script type='text/javascript' language='JavaScript1.2' charset='utf-8'>
+var v = new top.Vars(top.getSearch(window));
+var fv = v.toString('$_');
+</script>
+</head>
+<body >
+<script type='text/javascript' language='JavaScript1.2' charset='utf-8'>
+document.writeln('<object id=\"utility\" name=\" \" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"" + activexDownloadURL + "#version=7,0,14,0\" width=\"100\" height=\"50\">');
+document.writeln('<param name=\"movie\" value=\"history.swf\" />');
+document.writeln('<param name=\"FlashVars\" value=\"'+fv+'&$_lconid='+top.lc_id+'\"/>');
+document.writeln('<param name=\"quality\" value=\"high\" />');
+document.writeln('<param name=\"bgcolor\" value=\"#FFFFFF\" />');
+document.writeln('<param name=\"profile\" value=\"false\" />');
+document.writeln('<embed id=\"utilityEmbed\" name=\"history.swf\" src=\"history.swf\" type=\"application/x-shockwave-flash\" flashvars=\"'+fv+'&$_lconid='+top.lc_id+'\" profile=\"false\" quality=\"high\" bgcolor=\"#FFFFFF\" width=\"100\" height=\"50\" align=\"\" pluginspage=\"" + pluginDownloadURL + "\"></embed>');
+document.writeln('</object>');
+</script>
+</body>
+</html>
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.htm
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.js
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.js (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.js 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,48 @@
+// $Revision: 1.49 $
+// Vars
+Vars = function(qStr) {
+ this.numVars = 0;
+ if(qStr != null) {
+ var nameValue, name;
+ var pairs = qStr.split('&');
+ var pairLen = pairs.length;
+ for(var i = 0; i < pairLen; i++) {
+ var pair = pairs[i];
+ if( (pair.indexOf('=')!= -1) && (pair.length > 3) ) {
+ var nameValue = pair.split('=');
+ var name = nameValue[0];
+ var value = nameValue[1];
+ if(this[name] == null && name.length > 0 && value.length > 0) {
+ this[name] = value;
+ this.numVars++;
+ }
+ }
+ }
+ }
+}
+Vars.prototype.toString = function(pre) {
+ var result = '';
+ if(pre == null) { pre = ''; }
+ for(var i in this) {
+ if(this[i] != null && typeof(this[i]) != 'object' && typeof(this[i]) != 'function' && i != 'numVars') {
+ result += pre + i + '=' + this[i] + '&';
+ }
+ }
+ if(result.length > 0) result = result.substr(0, result.length-1);
+ return result;
+}
+function getSearch(wRef) {
+ var searchStr = '';
+ if(wRef.location.search.length > 1) {
+ searchStr = new String(wRef.location.search);
+ searchStr = searchStr.substring(1, searchStr.length);
+ }
+ return searchStr;
+}
+var lc_id = Math.floor(Math.random() * 100000).toString(16);
+if (this != top)
+{
+ top.Vars = Vars;
+ top.getSearch = getSearch;
+ top.lc_id = lc_id;
+}
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.js
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/history.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/ArrowDown.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/ArrowDown.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/BPEL.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/BPEL.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/DownArrow.gif
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/DownArrow.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/QoS.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/QoS.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/QoSLarge.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/QoSLarge.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/WSDL.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/WSDL.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/process.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/images/process.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/playerProductInstall.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/playerProductInstall.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/test.txt
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/test.txt (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/test.txt 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1 @@
+gfgfgfgf
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/test.txt
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynch.wsdl
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynch.wsdl (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynch.wsdl 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="DUMMY_PROCESS"
+ targetNamespace="http://gridcc.ac.uk/DUMMY_PROCESS"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:client="http://gridcc.ac.uk/DUMMY_PROCESS"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
+
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://gridcc.ac.uk/DUMMY_PROCESS" schemaLocation="DUMMY_PROCESS.xsd" />
+ </schema>
+ </types>
+
+ <message name="DUMMY_PROCESSRequestMessage">
+ <part name="payload" element="client:DUMMY_PROCESSProcessRequest"/>
+ </message>
+
+ <message name="DUMMY_PROCESSResponseMessage">
+ <part name="payload" element="client:DUMMY_PROCESSProcessResponse"/>
+ </message>
+
+ <!-- portType implemented by the DUMMY_PROCESS BPEL process -->
+ <portType name="DUMMY_PROCESS">
+ <operation name="initiate">
+ <input message="client:DUMMY_PROCESSRequestMessage"/>
+ </operation>
+ </portType>
+
+ <!-- portType implemented by the requester of BPEL process
+ for asynchronous callback purposes
+ -->
+ <portType name="DUMMY_PROCESSCallback">
+ <operation name="onResult">
+ <input message="client:DUMMY_PROCESSResponseMessage"/>
+ </operation>
+ </portType>
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ the partnerLinkType binds the provider and
+ requester portType into an asynchronous conversation.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="DUMMY_PROCESS">
+ <plnk:role name="DUMMY_PROCESSProvider">
+ <plnk:portType name="client:DUMMY_PROCESS"/>
+ </plnk:role>
+ <plnk:role name="DUMMY_PROCESSRequester">
+ <plnk:portType name="client:DUMMY_PROCESSCallback"/>
+ </plnk:role>
+ </plnk:partnerLinkType>
+</definitions>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynch.wsdl
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynchronous.wsdl
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynchronous.wsdl (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynchronous.wsdl 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="DUMMY_PROCESS"
+ targetNamespace="http://gridcc.ac.uk/DUMMY_PROCESS"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:client="http://gridcc.ac.uk/DUMMY_PROCESS"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
+
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <!--
+ <import namespace="http://gridcc.ac.uk/DUMMY_PROCESS" schemaLocation="DUMMY_PROCESS.xsd" />
+ -->
+ </schema>
+ </types>
+
+ <message name="DUMMY_PROCESSRequestMessage">
+ <part name="payload" element="type="xsd:string"/>
+ </message>
+
+ <message name="DUMMY_PROCESSResponseMessage">
+ <part name="payload" element="type="xsd:string"/>
+ </message>
+
+ <!-- portType implemented by the DUMMY_PROCESS BPEL process -->
+ <portType name="DUMMY_PROCESS_PT">
+ <operation name="initiate">
+ <input message="client:DUMMY_PROCESSRequestMessage"/>
+ </operation>
+ </portType>
+
+ <!-- portType implemented by the requester of BPEL process
+ for asynchronous callback purposes -->
+ <portType name="DUMMY_PROCESSCallback">
+ <operation name="onResult">
+ <input message="client:DUMMY_PROCESSResponseMessage"/>
+ </operation>
+ </portType>
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ the partnerLinkType binds the provider and
+ requester portType into an asynchronous conversation.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="DUMMY_PROCESS_PLT">
+ <plnk:role name="DUMMY_PROCESSProvider_PT">
+ <plnk:portType name="client:DUMMY_PROCESS"/>
+ </plnk:role>
+ <plnk:role name="DUMMY_PROCESSRequester">
+ <plnk:portType name="client:DUMMY_PROCESSCallback"/>
+ </plnk:role>
+ </plnk:partnerLinkType>
+</definitions>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Asynchronous.wsdl
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Synchronous.wsdl
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Synchronous.wsdl (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Synchronous.wsdl 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="DUMMY_PROCESS"
+ targetNamespace="http://gridcc.org/workflows/DUMMY_PROCESS"
+ xmlns:client="http://gridcc.org/workflows/DUMMY_PROCESS"
+ xmlns:hdtns="http://gridcc.org/wsdl/workflows/headerTypes"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
+
+ <types>
+ <!--
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://gridcc.ac.uk/DUMMY_PROCESS" schemaLocation="DUMMY_PROCESS.xsd" />
+ </schema>
+ -->
+ <xsd:schema targetNamespace="http://gridcc.org/wsdl/workflows/headerTypes"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:element name="TriggerID">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="part1" type="xs:string"/>
+ <xsd:element name="part2" type="xs:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SimpleTriggerID" type="xs:string"/>
+ </xsd:schema>
+ </types>
+
+ <message name="DUMMY_PROCESSRequestMessage">
+ <part name="FreePart" type="xs:string"/>
+
+ <!--
+ <part name="IE_URL" type="xs:string"/>
+ <part name="username" type="xs:string"/>
+ <part name="password" type="xs:string"/>
+ -->
+ <!-- For Workflow Specific Elements Start -->
+
+ <!-- For Workflow Specific Elements End -->
+
+ <part name="LoopCount" type="xs:integer"/>
+
+ <!-- For Testing Only -->
+ <part name="payload" type="xs:string"/>
+ </message>
+
+ <message name="DUMMY_PROCESSResponseMessage">
+ <part name="payload" type="xs:string"/>
+ </message>
+
+ <!-- portType implemented by the BPEL process -->
+ <portType name="DUMMY_PROCESS_PT">
+ <operation name="process">
+ <input message="client:DUMMY_PROCESSRequestMessage" />
+ <output message="client:DUMMY_PROCESSResponseMessage"/>
+ </operation>
+ </portType>
+
+ <plnk:partnerLinkType name="DUMMY_PROCESS_PLT" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
+ <plnk:role name="DUMMY_PROCESSProvider">
+ <plnk:portType name="client:DUMMY_PROCESS_PT"/>
+ </plnk:role>
+ </plnk:partnerLinkType>
+</definitions>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bin/wsdl/Synchronous.wsdl
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/VisualCoordinateConstant.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/VisualCoordinateConstant.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/VisualCoordinateConstant.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,14 @@
+package bpel.editor.gridcc.constant
+{
+ public class VisualCoordinateConstant
+ {
+ public static const buttonHeight:Number = 65;
+ public static const buttonWidth:Number = 115;
+
+ public static const nextActivityYPositionIncrement:Number = buttonHeight + verticalGapBetweenActivities;
+
+ public static const verticalGapBetweenActivities:Number = 15;
+
+ public static const parentHightResize:Number = verticalGapBetweenActivities + 35;
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/VisualCoordinateConstant.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/WorkflowActivities.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/WorkflowActivities.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/WorkflowActivities.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,63 @@
+package bpel.editor.gridcc.constant
+{
+ public class WorkflowActivities
+ {
+ public function WorkflowActivities(){
+ }
+
+ public static const PROCESS:String = "process";
+
+ public static const PARTNERLINKS:String = "partnerLinks";
+ public static const PARTNERLINK:String = "partnerLink";
+
+ public static const VARIABLES:String = "variables";
+ public static const VARIABLE:String = "variable";
+
+ public static const PARTNERS:String = "partners";
+ public static const PARTNER:String = "partner";
+
+ public static const CORRELATIONSETS:String = "correlationSets";
+ public static const CORRELATIONSET:String = "correlationSet";
+
+ public static const FAULTHANDLERS:String = "faultHandlers";
+ public static const CATCH:String = "catch";
+ public static const CATCHALL:String = "catchAll";
+
+ public static const COMPENSATIONHANDLER:String = "compensationHandler";
+
+ public static const EVENTHANDLERS:String = "eventHandlers";
+ public static const ONMESSAGE:String = "onMessage";
+ public static const ONALARM:String = "onAlarm";
+
+ public static const ASSIGN:String = "assign";
+ public static const COPY:String = "copy";
+ public static const FROM:String = "from";
+ public static const TO:String = "to";
+
+ public static const SWITCH:String = "switch";
+ public static const CASE:String = "case";
+ public static const OTHERWISE:String = "otherwise";
+
+ public static const SEQUENCE:String = "sequence";
+ public static const SCOPE:String = "scope";
+ public static const FLOW:String = "flow";
+
+ public static const PICK:String = "pick";
+ public static const WHILE:String = "while";
+
+ public static const CORRELATIONS:String = "correlations";
+ public static const CORRELATION:String = "correlation";
+
+ public static const INVOKE:String = "invoke";
+ public static const REPLY:String = "reply";
+ public static const RECEIVE:String = "receive";
+ public static const EMPTY:String = "empty";
+ public static const WAIT:String = "wait";
+ public static const TERMINATE:String = "terminate";
+ public static const THROW:String = "throw";
+
+ public static const TARGET:String = "target";
+ public static const SOURCE:String = "source";
+
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/constant/WorkflowActivities.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/BPELLoader.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/BPELLoader.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/BPELLoader.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,501 @@
+package bpel.editor.gridcc.controller
+{
+ import bpel.editor.gridcc.data.*;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.utility.ActivityDOSearch;
+
+ public class BPELLoader
+ {
+ /**
+ * The Singleton instance of BPELLoader
+ */
+ protected static var instance:BPELLoader;
+
+ public var processDO:ProcessDO;
+ public var partnerLinks:PartnerLinksDO;
+ public var variables:VariablesDO;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of BPELLoader
+ */
+ public function BPELLoader()
+ {
+ if (BPELLoader.instance == null)
+ {
+ BPELLoader.instance = this;
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of BPELLoader
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of BPELLoader
+ */
+ public static function getInstance():BPELLoader
+ {
+ if (instance == null)
+ {
+ instance = new BPELLoader();
+ }
+ return instance;
+ }
+
+ public function parseWorkflow(workflowInstance:XML):void{
+ //var processArray:Array = new Array();
+
+ var attNamesList:XMLList = workflowInstance.@*;
+ var nsArray:Array = workflowInstance.namespaceDeclarations();
+
+ createProcessDO(attNamesList, nsArray);
+ parseElements(workflowInstance, processDO);
+ }
+
+
+ private function createProcessDO(attributesList:XMLList, nsArray:Array):void{
+ processDO = ProcessDO.getInstance();
+ var porceessName:String = processDO.populateAttributes(attributesList);
+ processDO.populateNS(nsArray);
+ }
+
+ private function parseElements(node:XML, parentDO:DOInterface):void{
+
+ for each( var element:XML in node.elements() ){
+ //trace("element.localName(): " + element.localName());
+ switch(element.localName()){
+
+ case WorkflowActivities.PARTNERLINKS:
+ partnerLinks = PartnerLinksDO.getInstance();
+ processDO.updateSubActivitiesArray(WorkflowActivities.PARTNERLINKS, partnerLinks);
+ if(element.children().length() > 0){
+ parseElements(element, partnerLinks);
+ }
+ break;
+
+ case WorkflowActivities.PARTNERLINK:
+ var partnerLinkDO:PartnerLinkDO = new PartnerLinkDO();
+ var partnerLinkAttributesList:XMLList = element.@*;
+ partnerLinkDO.populateAttributes(partnerLinkAttributesList);
+ partnerLinks.updateSubActivitiesArray(WorkflowActivities.PARTNERLINK, partnerLinkDO);
+ break;
+
+ case WorkflowActivities.VARIABLES:
+ variables = VariablesDO.getInstance();
+ processDO.updateSubActivitiesArray(WorkflowActivities.VARIABLES, variables);
+ if(element.children().length() > 0){
+ parseElements(element, variables);
+ }
+ break;
+
+ case WorkflowActivities.VARIABLE:
+ var variableDO:VariableDO = new VariableDO();
+ var variableAttributesList:XMLList = element.@*;
+ variableDO.populateAttributes(variableAttributesList);
+ parentDO.updateSubActivitiesArray(WorkflowActivities.VARIABLE, variableDO);
+ break;
+
+ case WorkflowActivities.EMPTY:
+ var emptyDO:EmptyDO = new EmptyDO();
+ var emptyAttributesList:XMLList = element.@*;
+ emptyDO.populateAttributes(emptyAttributesList);
+ parentDO.updateSubActivitiesArray(WorkflowActivities.EMPTY, emptyDO);
+ break;
+
+ case WorkflowActivities.TERMINATE:
+ var terminateDO:TerminateDO = new TerminateDO();
+ var terminateAttributesList:XMLList = element.@*;
+ terminateDO.populateAttributes(terminateAttributesList);
+ parentDO.updateSubActivitiesArray(WorkflowActivities.TERMINATE, terminateDO);
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ var sequenceDO:SequenceDO = new SequenceDO();
+ var sequenceAttributesList:XMLList = element.@*;
+ sequenceDO.populateAttributes(sequenceAttributesList);
+ //sequenceDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.SEQUENCE, sequenceDO);
+ if(element.children().length() > 0){
+ parseElements(element, sequenceDO);
+ }
+ break;
+
+ case WorkflowActivities.SCOPE:
+ var scopeDO:ScopeDO = new ScopeDO();
+ var scopeAttributesList:XMLList = element.@*;
+ scopeDO.populateAttributes(scopeAttributesList);
+ //sequenceDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.SCOPE, scopeDO);
+ if(element.children().length() > 0){
+ parseElements(element, scopeDO);
+ }
+ break;
+
+ case WorkflowActivities.SWITCH:
+ var switchDO:SwitchDO = new SwitchDO();
+ var switchAttributesList:XMLList = element.@*;
+ switchDO.populateAttributes(switchAttributesList);
+ //sequenceDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.SWITCH, switchDO);
+ if(element.children().length() > 0){
+ parseElements(element, switchDO);
+ }
+ break;
+
+ case WorkflowActivities.CASE:
+ var caseDO:CaseDO = new CaseDO();
+ var caseAttributesList:XMLList = element.@*;
+ caseDO.populateAttributes(caseAttributesList);
+ //sequenceDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.CASE, caseDO);
+ if(element.children().length() > 0){
+ parseElements(element, caseDO);
+ }
+ break;
+
+ case WorkflowActivities.OTHERWISE:
+ var otherwiseDO:OtherwiseDO = new OtherwiseDO();
+ var otherwiseAttributesList:XMLList = element.@*;
+ otherwiseDO.populateAttributes(otherwiseAttributesList);
+ //sequenceDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.OTHERWISE, otherwiseDO);
+ if(element.children().length() > 0){
+ parseElements(element, otherwiseDO);
+ }
+ break;
+
+ case WorkflowActivities.FAULTHANDLERS:
+ var faultHandlersDO:FaultHandlersDO = new FaultHandlersDO();
+ var faultHandlersAttributesList:XMLList = element.@*;
+ faultHandlersDO.populateAttributes(faultHandlersAttributesList);
+ //sequenceDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.FAULTHANDLERS, faultHandlersDO);
+ if(element.children().length() > 0){
+ parseElements(element, faultHandlersDO);
+ }
+ break;
+
+ case WorkflowActivities.CATCH:
+ var catchDO:CatchDO = new CatchDO();
+ var catchAttributesList:XMLList = element.@*;
+ catchDO.populateAttributes(catchAttributesList);
+ //sequenceDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.CATCH, catchDO);
+ if(element.children().length() > 0){
+ parseElements(element, catchDO);
+ }
+ break;
+
+ case WorkflowActivities.CATCHALL:
+ var catchAllDO:CatchAllDO = new CatchAllDO();
+ var catchAllAttributesList:XMLList = element.@*;
+ catchAllDO.populateAttributes(catchAllAttributesList);
+ //sequenceDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.CATCHALL, catchAllDO);
+ if(element.children().length() > 0){
+ parseElements(element, catchAllDO);
+ }
+ break;
+
+ case WorkflowActivities.WHILE:
+ //trace("BPELLoader while parseElements");
+ var whileDO:WhileDO = new WhileDO();
+ var whileAttributesList:XMLList = element.@*;
+ whileDO.populateAttributes(whileAttributesList);
+ //whileDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.WHILE, whileDO);
+ if(element.children().length() > 0){
+ parseElements(element, whileDO);
+ }
+ break;
+
+ case WorkflowActivities.RECEIVE:
+ var receiveDO:ReceiveDO = new ReceiveDO();
+ var receiveAttributesList:XMLList = element.@*;
+ receiveDO.populateAttributes(receiveAttributesList);
+ parentDO.updateSubActivitiesArray(WorkflowActivities.RECEIVE, receiveDO);
+ break;
+
+ case WorkflowActivities.REPLY:
+ var replyDO:ReplyDO = new ReplyDO();
+ var replyAttributesList:XMLList = element.@*;
+ replyDO.populateAttributes(replyAttributesList);
+ parentDO.updateSubActivitiesArray(WorkflowActivities.REPLY, replyDO);
+ break;
+
+ case WorkflowActivities.INVOKE:
+ var invokeDO:InvokeDO = new InvokeDO();
+ var invokeAttributesList:XMLList = element.@*;
+ for each(var item:XML in invokeAttributesList){
+ //trace( item.name() + " : " + item);
+ }
+ invokeDO.populateAttributes(invokeAttributesList);
+ //invokeDO.printArray();
+ parentDO.updateSubActivitiesArray(WorkflowActivities.INVOKE, invokeDO);
+ break;
+
+ case WorkflowActivities.WAIT:
+ var waitDO:WaitDO = new WaitDO();
+ var waitAttributesList:XMLList = element.@*;
+ waitDO.populateAttributes(waitAttributesList);
+ parentDO.updateSubActivitiesArray(WorkflowActivities.WAIT, waitDO);
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ var assignDO:AssignDO = new AssignDO();
+ var assignAttributesList:XMLList = element.@*;
+ // assignDO.
+ //trace("Assign DO from BPEL Loader" + element)
+ if(element. at name){
+ //trace("Assign Name " + element. at name)
+ if(assignAttributesList){
+ //trace("Assign Attributes Length " + assignAttributesList.length())
+ assignDO.populateAttributes(assignAttributesList);
+ }
+ }
+ // To get Child Copy Elements
+ if(element.children().length() > 0){
+ parseElements(element, assignDO);
+ }
+
+ // Populate the
+ parentDO.updateSubActivitiesArray(WorkflowActivities.ASSIGN, assignDO);
+ break;
+
+ case WorkflowActivities.COPY:
+ var copyDO:CopyDO = new CopyDO();
+
+ // To get Child From and To Elements
+ if(element.children().length() > 0){
+ parseElements(element, copyDO);
+ }
+ parentDO.updateSubActivitiesArray(WorkflowActivities.COPY, copyDO);
+ break;
+
+ case WorkflowActivities.FROM:
+ var fromDO:FromDO = new FromDO();
+ var fromAttributesList:XMLList = element.@*;
+
+ // Element is never NULL in From but can be empty
+ if(element){
+ //trace("From Element: " + element);
+
+ // Attribute List Length can be from Zero to Two
+ //trace("From Element Attribute List: " + fromAttributesList.length());
+ if(fromAttributesList.length() > 0){
+ fromDO.populateAttributes(fromAttributesList);
+ } else {
+ fromDO.queryType = "empty";
+ fromDO.fromValue = element.toString();
+ //trace("Element Text Value: " + element.toString());
+
+ // only to fill the attribute array with updated values
+ fromDO.updateAttributesArray("","");
+ }
+ }
+ //fromDO.populateAttributes(fromAttributesList);
+ parentDO.updateSubActivitiesArray(WorkflowActivities.FROM, fromDO);
+
+ break;
+
+ case WorkflowActivities.TO:
+ var toDO:ToDO = new ToDO();
+ var toAttributesList:XMLList = element.@*;
+
+ // Element is never NULL in To but can be empty
+ if(element){
+ //trace("To Element: " + element);
+
+ // Attribute List Length can be from Zero to Two
+ //trace("To Element Attribute List: " + toAttributesList.length());
+ if(toAttributesList.length() > 0){
+ toDO.populateAttributes(toAttributesList);
+ } else {
+ toDO.queryType = "empty";
+ toDO.toValue = element.toString();
+ //trace("Element Text Value: " + element.toString());
+
+ // only to fill the attribute array with updated values
+ toDO.updateAttributesArray("","");
+ }
+ }
+ //fromDO.populateAttributes(fromAttributesList);
+ parentDO.updateSubActivitiesArray(WorkflowActivities.TO, toDO);
+
+ break;
+
+ default:
+ trace("Not yet implemented");
+
+ }
+ }
+ }
+
+ public function addNewActivity(parentType:String, parentName:String, childType:String, dataObject:Object):Boolean{
+ //trace(parentType + " " + parentName + " " + childType)
+ var processDO:ProcessDO = ProcessDO.getInstance();
+
+ var sequenceDO:SequenceDO;
+ var whileDO:WhileDO;
+ var scopeDO:ScopeDO;
+ var switchDO:SwitchDO;
+ var caseDO:CaseDO;
+ var otherwiseDO:OtherwiseDO;
+
+ var booleanResult:Boolean = true;
+ //for(var index:int = 0; index < processDO.subActivitiesArray.length; index++){
+ //if
+ switch(childType){
+
+ case WorkflowActivities.PARTNERLINK:
+ if (processDO.subActivitiesArray[0][0] == parentType){
+ PartnerLinksDO(processDO.subActivitiesArray[0][1]).updateSubActivitiesArray(WorkflowActivities.PARTNERLINK, PartnerLinkDO(dataObject));
+ }
+ break;
+
+ case WorkflowActivities.VARIABLE:
+ if (processDO.subActivitiesArray[1][0] == parentType){
+ VariablesDO(processDO.subActivitiesArray[1][1]).updateSubActivitiesArray(WorkflowActivities.VARIABLE, VariableDO(dataObject));
+ }
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ if(parentType == WorkflowActivities.PROCESS){
+ processDO.updateSubActivitiesArray(WorkflowActivities.SEQUENCE, dataObject);
+ } else if(parentType == WorkflowActivities.SEQUENCE){
+ sequenceDO = SequenceDO (ActivityDOSearch.searchProcess(parentType, parentName)as SequenceDO);
+ sequenceDO.updateSubActivitiesArray(WorkflowActivities.SEQUENCE, dataObject);
+ } else if(parentType == WorkflowActivities.WHILE){
+ //trace("Sequence: " + parentType)
+ whileDO = WhileDO (ActivityDOSearch.searchProcess(parentType, parentName) as WhileDO);
+ if(whileDO){
+ // whileDO.subActivitiesArray should be null for first activity
+ // while can have only one activity
+ if(!whileDO.subActivitiesArray){
+ whileDO.updateSubActivitiesArray(WorkflowActivities.SEQUENCE, dataObject);
+ } else {
+ return false;
+ }
+ }
+ }
+ break;
+
+ case WorkflowActivities.WHILE:
+ if(parentType == WorkflowActivities.PROCESS){
+ processDO.updateSubActivitiesArray(WorkflowActivities.WHILE, dataObject);
+ } else if(parentType == WorkflowActivities.SEQUENCE){
+ sequenceDO = SequenceDO(ActivityDOSearch.searchProcess(parentType, parentName) as SequenceDO);
+ sequenceDO.updateSubActivitiesArray(WorkflowActivities.WHILE, dataObject);
+ } else if(parentType == WorkflowActivities.WHILE) {
+ whileDO = WhileDO(ActivityDOSearch.searchProcess(parentType, parentName)as WhileDO);
+ if(whileDO){
+ // whileDO.subActivitiesArray should be null for first activity
+ // while can have only one activity
+ if(!whileDO.subActivitiesArray){
+ whileDO.updateSubActivitiesArray(WorkflowActivities.WHILE, dataObject);
+ } else {
+ return false;
+ }
+ }
+ }
+ break;
+
+ case WorkflowActivities.RECEIVE:
+ if(parentType == WorkflowActivities.PROCESS){
+ processDO.updateSubActivitiesArray(WorkflowActivities.RECEIVE, dataObject);
+ } else if(parentType == WorkflowActivities.SEQUENCE){
+ sequenceDO = SequenceDO(ActivityDOSearch.searchProcess(parentType, parentName) as SequenceDO);
+ sequenceDO.updateSubActivitiesArray(WorkflowActivities.RECEIVE, dataObject);
+ } else if(parentType == WorkflowActivities.WHILE){
+ whileDO = WhileDO(ActivityDOSearch.searchProcess(parentType, parentName) as WhileDO);
+ if(whileDO){
+ // whileDO.subActivitiesArray should be null for first activity
+ // while can have only one activity
+ if(!whileDO.subActivitiesArray){
+ whileDO.updateSubActivitiesArray(WorkflowActivities.RECEIVE, dataObject);
+ } else {
+ return false;
+ }
+ }
+ }
+ break;
+
+ case WorkflowActivities.REPLY:
+ if(parentType == WorkflowActivities.PROCESS){
+ processDO.updateSubActivitiesArray(WorkflowActivities.REPLY, dataObject);
+ } else if(parentType == WorkflowActivities.SEQUENCE){
+ sequenceDO = SequenceDO(ActivityDOSearch.searchProcess(parentType, parentName)as SequenceDO);
+ sequenceDO.updateSubActivitiesArray(WorkflowActivities.REPLY, dataObject);
+ } else if(parentType == WorkflowActivities.WHILE){
+ whileDO = WhileDO(ActivityDOSearch.searchProcess(parentType, parentName) as WhileDO);
+ if(whileDO){
+ // whileDO.subActivitiesArray should be null for first activity
+ // while can have only one activity
+ if(!whileDO.subActivitiesArray){
+ whileDO.updateSubActivitiesArray(WorkflowActivities.REPLY, dataObject);
+ } else {
+ return false;
+ }
+ }
+ }
+ break;
+
+ case WorkflowActivities.INVOKE:
+ if(parentType == WorkflowActivities.PROCESS){
+ processDO.updateSubActivitiesArray(WorkflowActivities.INVOKE, dataObject);
+ } else if(parentType == WorkflowActivities.SEQUENCE){
+ sequenceDO = SequenceDO(ActivityDOSearch.searchProcess(parentType, parentName) as SequenceDO);
+ if(sequenceDO){
+ sequenceDO.updateSubActivitiesArray(WorkflowActivities.INVOKE, dataObject);
+ }
+ } else if(parentType == WorkflowActivities.WHILE){
+ whileDO = WhileDO(ActivityDOSearch.searchProcess(parentType, parentName)as WhileDO);
+ if(whileDO){
+ // whileDO.subActivitiesArray should be null for first activity
+ // while can have only one activity
+ if(!whileDO.subActivitiesArray){
+ whileDO.updateSubActivitiesArray(WorkflowActivities.INVOKE, dataObject);
+ } else {
+ return false;
+ }
+ }
+ }
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ /*
+
+ */
+ break;
+
+ case WorkflowActivities.WAIT:
+ if(parentType == WorkflowActivities.PROCESS){
+ processDO.updateSubActivitiesArray(WorkflowActivities.WAIT, dataObject);
+ } else if(parentType == WorkflowActivities.SEQUENCE){
+ sequenceDO = SequenceDO(ActivityDOSearch.searchProcess(parentType, parentName) as SequenceDO);
+ sequenceDO.updateSubActivitiesArray(WorkflowActivities.WAIT, dataObject);
+ } else if(parentType == WorkflowActivities.WHILE){
+ whileDO = WhileDO(ActivityDOSearch.searchProcess(parentType, parentName) as WhileDO);
+ if(whileDO){
+ // whileDO.subActivitiesArray should be null for first activity
+ // while can have only one activity
+ if(!whileDO.subActivitiesArray){
+ whileDO.updateSubActivitiesArray(WorkflowActivities.WAIT, dataObject);
+ } else {
+ return false;
+ }
+ }
+ }
+ break;
+ default:
+ trace("Not yet implemented");
+
+ }
+ return booleanResult;
+ //}
+ }
+
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/BPELLoader.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/MonitoringWorkflow.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/MonitoringWorkflow.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/MonitoringWorkflow.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,162 @@
+package bpel.editor.gridcc.controller {
+
+ import flash.events.EventDispatcher;
+ import flash.events.Event;
+ import bpel.editor.gridcc.events.MonitoringArrayUpdate;
+
+ public class MonitoringWorkflow extends EventDispatcher {
+ /**
+ * The Singleton instance of ProcessCreator
+ */
+ protected static var instance:MonitoringWorkflow;
+
+
+ [Bindable]
+ private var monitoringBPEL:XML;
+
+ [Bindable]
+ private var monitoringBPELArray:Array;
+
+ private var localWorkflowID:String;
+
+ // to wait while update is in process ......
+ public var update:Boolean = false;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of MonitoringWorkflow
+ */
+ public function MonitoringWorkflow()
+ {
+ if (MonitoringWorkflow.instance == null)
+ {
+ MonitoringWorkflow.instance = this;
+ }
+ //this.addEventListener(MonitoringArrayUpdate.MONITORING_ARRAY_UPDATE_EVENT, arrayUpdatedEventHandler);
+ }
+
+ public function arrayUpdatedEventHandler(event:Event):void {
+ trace("arrayUpdatedEventHandler");
+ }
+ /**
+ * Determines if the singleton instance of MonitoringWorkflow
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of MonitoringWorkflow
+ */
+
+ public static function getInstance(workflow_ID:String):MonitoringWorkflow
+ {
+ // This function to be called only from Process Creator
+ if (instance == null)
+ {
+ instance = new MonitoringWorkflow();
+ }
+
+ if(workflow_ID)
+ instance.localWorkflowID = workflow_ID;
+
+ return instance;
+ }
+
+ public function getMonitoringWorkflow():XML {
+ //trace("getMonitoringWorkflow");
+ if(localWorkflowID ){
+
+ // Even if I have the Monitoring BPEL
+ // It may not be the updated one ...
+ // always better to get the latest one ....
+ if(monitoringBPEL){
+ return monitoringBPEL;
+ } else {
+ // get the Monitoring BPEL form the server
+ }
+ } else {
+ workflowFiltering();
+ populateArray();
+ }
+ return monitoringBPEL;
+ }
+
+ public function getMonitoringArray():Array {
+ //trace("******************** getMonitoringArray");
+ /*
+ while(update){
+ trace("waiting for update");
+ }*/
+ populateArray();
+ //printArray();
+ return monitoringBPELArray;
+ }
+
+ public function setMonitoringWorkflow(tempWorkflow:XML):void {
+ //trace("******************** setMonitoringWorkflow");
+ //trace(tempWorkflow)
+ monitoringBPEL = tempWorkflow;
+ populateArray();
+ var arrayUpdateEvent:MonitoringArrayUpdate = new MonitoringArrayUpdate("monitoringArrayUpdateEvent");
+ dispatchEvent(arrayUpdateEvent);
+
+ }
+
+ private function workflowFiltering():void {
+
+ var ActualBPEL:XML = ProcessCreator.getInstance().BPELProcess;
+ monitoringBPEL = new XML("<monitor/>");
+ if(ActualBPEL) {
+ // Filter all Activities
+ var fileteredAllBPEL:XMLList = ActualBPEL..*;
+
+ // Filter all activities with name attribute
+ var fileteredNameBPEL:XMLList = ActualBPEL..*.(hasOwnProperty("@name"));
+
+ // Filter all activities where name contains "_monitor"
+ var fileteredNameWithMonitoringBPEL:XMLList =
+ ActualBPEL..*.(hasOwnProperty("@name") && (@name.indexOf("_monitor") != -1));
+
+ //trace(fileteredNameWithMonitoringBPEL);
+
+ var item:XML;
+ var tempActivity:XML = null;
+ for each(item in fileteredNameWithMonitoringBPEL) {
+ //trace("item: " + item.toXMLString());
+ tempActivity = new XML ("<" + item.localName() + "/>");
+ tempActivity. at name = item. at name;
+ tempActivity. at status = "unknown";
+ monitoringBPEL.appendChild(tempActivity);
+ }
+ }
+ // For testing purposes ....!
+ trace(monitoringBPEL.toXMLString());
+ }
+
+ private function populateArray():void {
+ //trace("******************** populateArray");
+ if(!localWorkflowID){
+ workflowFiltering();
+ }
+ //push(["partnerLink", partnerLink, "mandatory"]);
+ //if(!monitoringBPELArray){
+ monitoringBPELArray = new Array();
+ monitoringBPELArray.push(["start", "Started", "XXX"]);
+ //}
+ //if()
+ var monitoringActivitiesList:XMLList = monitoringBPEL.children();
+ var item:XML;
+ for each(item in monitoringActivitiesList) {
+ monitoringBPELArray.push([item.localName(), item. at name, item. at status]);
+ }
+ monitoringBPELArray.push(["finish", "Finished", "XXX"]);
+ }
+
+ private function printArray():void {
+ if(monitoringBPELArray){
+ for(var i:int = 0; i < monitoringBPELArray.length; i++){
+ trace(monitoringBPELArray[i][0] + " " + monitoringBPELArray[i][1] + " " + monitoringBPELArray[i][2]);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/MonitoringWorkflow.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PDDCreator.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PDDCreator.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PDDCreator.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,203 @@
+package bpel.editor.gridcc.controller
+{
+ public class PDDCreator
+ {
+ /**
+ * The Singleton instance of ProcessCreator
+ */
+ protected static var instance:PDDCreator;
+
+ [Bindable]
+ public var WorkflowPDD:XML;
+
+ private var namespaceArray:Array;
+ private var localWSName:String;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of ProcessCreator
+ */
+ public function PDDCreator()
+ {
+ if (PDDCreator.instance == null)
+ {
+ PDDCreator.instance = this;
+ }
+ }
+ /**
+ * Determines if the singleton instance of ProcessCreator
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of ProcessCreator
+ */
+ public static function createInstance(workflowName:String, workflowNamespace:String):PDDCreator
+ {
+ // This function to be called only from Process Creator
+ if (instance == null)
+ {
+ instance = new PDDCreator();
+ }
+
+ instance.localWSName = workflowName;
+ instance.createInitialPDD(workflowName, workflowNamespace);
+
+ return instance;
+ }
+
+ public static function getInstance():PDDCreator
+ {
+ // This function to be called from all classes except Process Creator
+ if (instance == null)
+ {
+ // Do Nothing
+
+ }
+ return instance;
+ }
+
+ private function createInitialPDD(workflowName:String, workflowNamespace:String):void {
+
+ WorkflowPDD = new XML("<process/>");
+ WorkflowPDD. at name="bpelns:"+workflowName;
+ WorkflowPDD. at location="bpel/" + workflowName + "/" + workflowName + ".bpel";
+ instance.fillNamespaceArray(workflowNamespace);
+ instance.addPDDNamespaces();
+ instance.createPartnerLinks();
+ instance.createPartnerLink(workflowName, true, true);
+ instance.createWSDLReferences();
+ instance.createWSDL(workflowName, workflowNamespace);
+
+ }
+
+ private function fillNamespaceArray(workflowNamespace:String):void {
+ namespaceArray = new Array();
+ var tempNamespace:Namespace;
+
+ tempNamespace = new Namespace("wsa","http://schemas.xmlsoap.org/ws/2003/03/addressing");
+ namespaceArray.push(tempNamespace);
+
+ tempNamespace = new Namespace("bpelns",workflowNamespace);
+ namespaceArray.push(tempNamespace);
+ }
+
+ private function addPDDNamespaces():void {
+ for(var i:Number = 0; i < namespaceArray.length; i++){
+ WorkflowPDD.addNamespace(Namespace(namespaceArray[i]));
+ }
+ // Hard Coded default Namespace
+ WorkflowPDD. at xmlns="http://schemas.active-endpoints.com/pdd/2005/09/pdd.xsd";
+ }
+
+ private function createPartnerLinks():void {
+ var tempChildElement:String = "<partnerLinks/>"
+ var tempChildXML:XML = new XML(tempChildElement);
+ findParentElement("process",tempChildXML);
+ }
+
+ public function createPartnerLink(workflowName:String, myRole:Boolean,
+ staticPartnerLink:Boolean):void {
+ var tempChildElement:String = "<partnerLink/>";
+ var tempChildXML:XML = new XML(tempChildElement);
+ tempChildXML. at name = workflowName + "_PL";
+ if(myRole) {
+ createMyRole(workflowName, tempChildXML);
+ } else {
+ if(staticPartnerLink){
+ createStaticPartnerRole();
+ } else {
+ createDynamicPartnerRole(workflowName, tempChildXML)
+ }
+
+ }
+ findParentElement("partnerLinks",tempChildXML);
+ }
+
+ private function createMyRole(workflowName:String, parent:XML):void {
+ var tempChildElement:String = "<myRole/>";
+ var tempChildXML:XML = new XML(tempChildElement);
+ tempChildXML. at allowedRoles = "";
+ tempChildXML. at binding = "RPC";
+ tempChildXML. at service = workflowName + "Service";
+ parent.appendChild(tempChildXML);
+ }
+
+ private function createStaticPartnerRole():void{
+ // Not Yet Done ...!
+ }
+
+ private function createDynamicPartnerRole(workflowName:String, parent:XML):void {
+ var tempChildElement:String = "<partnerRole/>";
+ var tempChildXML:XML = new XML(tempChildElement);
+ tempChildXML. at endpointReference = "dynamic";
+ tempChildXML. at invokeHandler = "default:Address";
+ parent.appendChild(tempChildXML);
+ }
+
+ private function createWSDLReferences():void {
+ var tempChildElement:String = "<wsdlReferences/>"
+ var tempChildXML:XML = new XML(tempChildElement);
+ findParentElement("process",tempChildXML);
+ }
+
+ public function createWSDL(workflowName:String, workflowNamespace:String):void {
+ var tempChildElement:String = "<wsdl/>"
+ var tempChildXML:XML = new XML(tempChildElement);
+ tempChildXML. at location = "project:/" + localWSName + "/wsdl/" + workflowName + ".wsdl";
+ tempChildXML. at namespace = workflowNamespace;
+ findParentElement("wsdlReferences",tempChildXML);
+ }
+
+ public function createNewActivity(parentType:String, parentName:String,
+ newActivityType:String, attributeArray:Array):void {
+
+ //var childXML:XML = createChild(newActivityType, attributeArray);
+ //this.findParentElement(parentType, parentName, childXML);
+ }
+
+ private function findParentElement(parentType:String, childXML:XML ):void {
+ //trace("ProcessCreator findParentElement");
+ //trace( parentType + " " + parentName);
+
+ var tempXMLList:XMLList;
+ var item:XML;
+
+ switch(parentType) {
+
+ case "process":
+ //trace("process");
+ WorkflowPDD.appendChild(childXML);
+ break;
+
+ case "partnerLinks":
+ //trace("partnerLinks");
+ tempXMLList = WorkflowPDD..partnerLinks;
+
+ // There can be only one partnerLinks sub element of process
+ item = tempXMLList[0];
+ if(item)
+ item.appendChild(childXML);
+ break;
+
+ case "wsdlReferences":
+ //trace("variables");
+ tempXMLList= WorkflowPDD..wsdlReferences;
+
+ // There can be only one wsdlReferences sub element of process
+ // Similar to PartnerLinks but in different format
+ for each (item in tempXMLList) {
+ item.appendChild(childXML);
+ }
+ break;
+
+ case "MayBEUsedLater":
+
+ break;
+
+ default:
+ trace("PDDCreator.findParentElement(" + parentType + "): Not Yet Implemented");
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PDDCreator.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PLPortMapping.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PLPortMapping.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PLPortMapping.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,109 @@
+package bpel.editor.gridcc.controller
+{
+ public class PLPortMapping
+ {
+
+ /**
+ * The Singleton instance of PLPortMapping
+ */
+ protected static var instance:PLPortMapping;
+
+ private var _plPortMapping:Array;
+
+ private var _operationMessageMapping:Array;
+
+ private var arrayCounter:Number = 0;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of PLPortMapping
+ */
+ public function PLPortMapping()
+ {
+ if (PLPortMapping.instance == null)
+ {
+ PLPortMapping.instance = this;
+ }
+ _plPortMapping = new Array();
+ _operationMessageMapping = new Array();
+ }
+
+ /**
+ * Determines if the singleton instance of BPELLoader
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of BPELLoader
+ */
+ public static function getInstance():PLPortMapping
+ {
+ if (instance == null)
+ {
+ instance = new PLPortMapping();
+ }
+ return instance;
+ }
+
+ public function addNewMapping(partnerLink:String, portType:String,
+ operations:Array):void{
+
+ var tempCounter:Number = _plPortMapping.push([partnerLink, portType]);
+ //trace("tempCounter in PL-PT mapping: " + tempCounter);
+
+ if(operations){
+ for(var i:Number = 0; i < operations.length; i++){
+ _plPortMapping[tempCounter -1][2+i] = String (operations[i]);
+ _operationMessageMapping.push([String (operations[i]), " - - - - - - - ",
+ " - - - - - - - ", " - - - - - - - "]);
+
+ }
+ }
+ }
+
+ public function getPort(partnerLink:String):String {
+ for(var i:Number= 0; i < _plPortMapping.length; i++){
+ var tempPL:String = _plPortMapping[i][0];
+
+ if(tempPL == partnerLink){
+ return _plPortMapping[i][1];
+ }
+ }
+ return "No_portType_Found";
+ }
+
+ public function getOperations(partnerLink:String, portType:String):Array {
+ //trace("partnerLink: " + partnerLink + "portType: " + portType);
+ var tempOperationArray:Array = new Array();
+ tempOperationArray.push("No_Operation_Selected");
+
+ for(var i:Number = 0; i < _plPortMapping.length; i++){
+ var tempPL:String = _plPortMapping[i][0];
+ var tempPT:String = _plPortMapping[i][1];
+
+ if(tempPL == partnerLink && tempPT == portType){
+ //trace("partnerLink: " + "portType: " + "found: "+ _plPortMapping[i].length);
+ for(var j:int = 2; j < _plPortMapping[i].length; j++)
+ tempOperationArray.push(_plPortMapping[i][j]);
+ }
+ }
+ return tempOperationArray;
+ }
+
+ public function addOperationMessage(operation:String, input:String, output:String,
+ fault:String):Boolean {
+ for(var counter:Number = 0 ; counter < _operationMessageMapping.length; counter++){
+ var tempOperationName:String = String (_operationMessageMapping[counter][0]);
+ if(tempOperationName == operation){
+ _operationMessageMapping[counter][1] = input;
+ _operationMessageMapping[counter][2] = output;
+ _operationMessageMapping[counter][3] = output;
+
+ return true;
+ }
+ }
+ return false;
+ }
+
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/PLPortMapping.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/ProcessCreator.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/ProcessCreator.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/ProcessCreator.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,689 @@
+package bpel.editor.gridcc.controller
+{
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.*;
+ import bpel.editor.gridcc.utility.*;
+
+ import flash.net.URLLoader;
+ import flash.events.Event;
+ import flash.net.URLLoaderDataFormat;
+ import flash.net.URLRequest;
+ import mx.controls.Alert;
+
+ //import mx.charts.chartClasses.StackedSeries;
+
+ public class ProcessCreator {
+ /**
+ * The Singleton instance of ProcessCreator
+ */
+ protected static var instance:ProcessCreator;
+
+ [Bindable]
+ public var BPELProcess:XML;
+
+ [Bindable]
+ public var BPELPDD:XML;
+
+ [Bindable]
+ public var BPELWSDL:XML;
+
+ private var process:ProcessDO;
+
+ private var localWorkflowName:String;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of ProcessCreator
+ */
+ public function ProcessCreator()
+ {
+ if (ProcessCreator.instance == null)
+ {
+ ProcessCreator.instance = this;
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of ProcessCreator
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of ProcessCreator
+ */
+ public static function getInstance():ProcessCreator
+ {
+ if (instance == null)
+ {
+ instance = new ProcessCreator();
+ }
+ return instance;
+ }
+
+ public function creatProcess(workflowName:String, targetNamespace:String, type:String):XML {
+ localWorkflowName = workflowName;
+ var tempAttributeArray:Array;
+ var childXML:XML;
+ loadWSDL(type, workflowName);
+ switch(type){
+
+ case "synchronous":
+ createProcess(workflowName,targetNamespace);
+
+ createPartnerLinks();
+ createPartnerLink(workflowName, true);
+
+ createVariables();
+ createInputVariable(workflowName);
+ createOutputVariable(workflowName);
+
+ createSequence("default", true);
+ createReceive(WorkflowActivities.SEQUENCE, "default", workflowName);
+
+ createSequence("main", false);
+ createAssign(WorkflowActivities.SEQUENCE, "main", workflowName);
+
+ createReply(WorkflowActivities.SEQUENCE, "default", workflowName);
+
+ break;
+
+ case "asynchronous":
+ createProcess(workflowName,targetNamespace);
+
+ createPartnerLinks();
+ createPartnerLink(workflowName, false);
+
+ createVariables();
+ createInputVariable(workflowName);
+ createOutputVariable(workflowName);
+
+ createSequence("default", true);
+ createReceive(WorkflowActivities.SEQUENCE, "default", workflowName);
+
+ // It should not be receive .. should be reply
+ createReply(WorkflowActivities.SEQUENCE, "default", workflowName);
+ break;
+
+ case "empty":
+ createProcess(workflowName,targetNamespace);
+
+ createPartnerLinks();
+ createPartnerLink(workflowName, true);
+
+ createVariables();
+ createInputVariable(workflowName);
+ createOutputVariable(workflowName);
+ break;
+ }
+ PDDCreator.createInstance(workflowName,targetNamespace);
+ WSDLCatalogCreator.createInstance(workflowName);
+ SubmissionDocumentCreator.createInstance(workflowName,targetNamespace);
+
+ var plPortMapping:PLPortMapping = PLPortMapping.getInstance();
+ var tempOperationsArray:Array = new Array();
+ tempOperationsArray.push("process");
+ plPortMapping.addNewMapping(workflowName + "_PL", "client:" + workflowName + "_PT", tempOperationsArray);
+
+ trace(plPortMapping.addOperationMessage("process",
+ "client:" + workflowName + "RequestMessage","client:" + workflowName + "ResponseMessage",""));
+
+ return BPELProcess;
+ }
+
+ private function loadWSDL(processType:String, workflowName:String):void {
+ var wsdlCreator:WSDLCreator = WSDLCreator.getInstance();
+ wsdlCreator.loadWSDL(processType,workflowName);
+ //trace(wsdlCreator.WorkflowWSDL);
+ }
+
+ private function handleComplete(event:Event):void{
+ try{
+ //trace("File Loaded");
+ BPELWSDL = new XML(event.target.data);
+ //trace(BPELWSDL.toXMLString().replace(/DUMMY_PROCESS/g,localWorkflowName));
+ BPELWSDL = new XML(BPELWSDL.toXMLString().replace(/DUMMY_PROCESS/g,localWorkflowName));
+ //trace(BPELWSDL);
+ }catch (e:TypeError){
+ trace(e.message);
+ }
+ }
+
+ private function createProcess(workflowName:String, targetNamespace:String):void {
+ process = ProcessDO.getInstance();
+ process.fillNamespaceArray("http://gridcc.org/workflows/" + workflowName);
+
+ //var bpws:Namespace = new Namespace("http://schemas.xmlsoap.org/ws/2003/03/business-process/");
+ //default xml namespace = bpws;
+ BPELProcess = new XML("<process/>");
+ BPELProcess. at name=workflowName;
+ BPELProcess. at targetNamespace=targetNamespace;
+ //BPELProcess.
+ addProcessNamespaces(process.namespaceArray);
+ }
+
+ private function createPartnerLinks():void {
+ var tempPartnerLinks:XML = this.createChild(WorkflowActivities.PARTNERLINKS, null);
+ this.findParentElement(WorkflowActivities.PROCESS, null, tempPartnerLinks);
+
+ }
+
+ private function createPartnerLink(workflowName:String, synchronous:Boolean):void {
+ var tempOperationNameArray:Array = new Array();
+ tempOperationNameArray.push("process");
+ this.createPartnerLinkType(workflowName,workflowName,"client",tempOperationNameArray,workflowName+"Provider");
+ var tempAttributeArray:Array = new Array();
+ tempAttributeArray.push(["name", workflowName + "_PL"]);
+ tempAttributeArray.push(["partnerLinkType","client:" + workflowName + "_PLT"]);
+ tempAttributeArray.push(["myRole",workflowName + "Provider"]);
+
+ if(!synchronous)
+ tempAttributeArray.push(["partnerRole", workflowName + "Requester"]);
+ var childXML:XML = createChild(WorkflowActivities.PARTNERLINK, tempAttributeArray);
+
+ this.findParentElement(WorkflowActivities.PARTNERLINKS, null, childXML);
+ }
+
+
+ private function createVariables():void {
+ var tempVariables:XML = this.createChild(WorkflowActivities.VARIABLES, null);
+ this.findParentElement(WorkflowActivities.PROCESS, null, tempVariables);
+ }
+
+ private function createInputVariable(workflowName:String):void {
+ var tempAttributeArray:Array = new Array();
+
+ tempAttributeArray.push(["name", "inputVariable"]);
+ tempAttributeArray.push(["messageType","client:" + workflowName + "RequestMessage"]);
+ var childXML:XML = createChild(WorkflowActivities.VARIABLE, tempAttributeArray);
+
+ this.findParentElement(WorkflowActivities.VARIABLES, null, childXML);
+ }
+
+ private function createOutputVariable(workflowName:String):void {
+ var tempAttributeArray:Array = new Array();
+
+ tempAttributeArray.push(["name", "outputVariable"]);
+ tempAttributeArray.push(["messageType","client:" + workflowName + "ResponseMessage"]);
+ var childXML:XML = createChild(WorkflowActivities.VARIABLE, tempAttributeArray);
+
+ this.findParentElement(WorkflowActivities.VARIABLES, null, childXML);
+ }
+
+ private function createSequence(name:String, process:Boolean):void {
+ var tempAttributeArray:Array = new Array();
+
+ tempAttributeArray.push(["name", name]);
+ var childXML:XML = createChild(WorkflowActivities.SEQUENCE, tempAttributeArray);
+ if(process){
+ this.findParentElement(WorkflowActivities.PROCESS, null, childXML);
+ } else {
+ this.findParentElement(WorkflowActivities.SEQUENCE, "default", childXML);
+ }
+ }
+
+ private function createReply(parentType:String, parentName:String, workflowName:String):void {
+ var tempAttributeArray:Array = new Array();
+ tempAttributeArray.push(["name", "replyOutput"]);
+ tempAttributeArray.push(["partnerLink", workflowName + "_PL"]);
+ tempAttributeArray.push(["portType", "client:" + workflowName + "_PT"]);
+ tempAttributeArray.push(["operation","process"]);
+ tempAttributeArray.push(["variable","outputVariable"]);
+
+ var childXML:XML = createChild(WorkflowActivities.REPLY, tempAttributeArray);
+
+ this.findParentElement(parentType, parentName, childXML);
+ }
+
+ private function createReceive(parentType:String, parentName:String, workflowName:String):void {
+ var tempAttributeArray:Array = new Array();
+ tempAttributeArray.push(["name", "receiveInput"]);
+ tempAttributeArray.push(["partnerLink", workflowName + "_PL"]);
+ tempAttributeArray.push(["portType", "client:" + workflowName + "_PT"]);
+ tempAttributeArray.push(["operation","process"]);
+ tempAttributeArray.push(["variable","inputVariable"]);
+ tempAttributeArray.push(["createInstance", "yes"]);
+
+ var childXML:XML = createChild(WorkflowActivities.RECEIVE, tempAttributeArray);
+
+ this.findParentElement(parentType, parentName, childXML);
+ }
+
+ private function createAssign(parentType:String, parentName:String, workflowName:String):void {
+ var tempAttributeArray:Array = new Array();
+ tempAttributeArray.push(["name", "defaultAssign"]);
+
+ var childXML:XML = createChild(WorkflowActivities.ASSIGN, tempAttributeArray);
+ this.findParentElement(parentType, parentName, childXML);
+ this.createCopy(WorkflowActivities.ASSIGN, "defaultAssign", workflowName);
+ }
+
+ private function createCopy(parentType:String, parentName:String, workflowName:String):void {
+ var tempAttributeArray:Array = new Array();
+ //tempAttributeArray.push(["name", "defaultAssign"]);
+
+ var childXML:XML = createChild(WorkflowActivities.COPY, tempAttributeArray);
+
+ tempAttributeArray = new Array();
+ tempAttributeArray.push(["part", "payload"]);
+ tempAttributeArray.push(["variable", "inputVariable"]);
+ var fromXML:XML = createChild(WorkflowActivities.FROM, tempAttributeArray);
+ childXML.appendChild(fromXML);
+
+ tempAttributeArray = new Array();
+ tempAttributeArray.push(["part", "payload"]);
+ tempAttributeArray.push(["variable", "outputVariable"]);
+ var toXML:XML = createChild(WorkflowActivities.TO, tempAttributeArray);
+ childXML.appendChild(toXML);
+
+ this.findParentElement(parentType, parentName, childXML);
+ }
+ // This will not be used and should not be used
+ // unless I change the format of initial BPEL workflow
+ // Should Be used for Asynch BPEL Process ...!
+ private function createInvoke(name:String, parent:XML):void {
+ //var bpws:Namespace = new Namespace("http://schemas.xmlsoap.org/ws/2003/03/business-process/");
+ //default xml namespace = bpws;
+ parent.newElement = <invoke/>;
+ parent.invoke. at name=name;
+ /*
+ var tempAttributeArray:Array = new Array();
+ tempAttributeArray.push(["name", "receiveInput"]);
+ tempAttributeArray.push(["partnerLink", "client"]);
+ tempAttributeArray.push(["portType", "client:" +workflowName]);
+ tempAttributeArray.push(["operation","initiate"]);
+ tempAttributeArray.push(["variable","inputVariable"]);
+ tempAttributeArray.push(["createInstance", "yes"]);
+
+ var childXML:XML = createChild(WorkflowActivities.RECEIVE, tempAttributeArray);
+
+ this.findParentElement(parentType, parentName, childXML);
+ */
+ }
+
+ private function addProcessNamespaces(namespacesArray:Array):void{
+ //trace("ProcessCreator addProcessNamespaces");
+ for(var i:Number = 0; i < namespacesArray.length; i++){
+ BPELProcess.addNamespace(Namespace(namespacesArray[i]));
+ }
+
+ // Hard Coded default Namespace
+ BPELProcess. at xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/";
+ }
+
+ public function printNameSpaceArray():void {
+ var tempNamespace:Array = BPELProcess.namespaceDeclarations();
+ for(var i:int = 0; i < tempNamespace.length; i++){
+ if( tempNamespace[i] is Namespace){
+ trace(tempNamespace[i].prefix + " " + tempNamespace[i].toString());
+ }
+ }
+ }
+
+ public function getTargetNamespace():String{
+ var attList:XMLList = BPELProcess.attributes();
+ //trace(BPELProcess. at targetNamespace);
+ for (var i:int = 0; i < attList.length(); i++) {
+ if(attList[i].name() == "targetNamespace"){
+ //trace (attList[i].name() + " " + attList[i]);
+ return attList[i];
+ }
+
+ }
+ return null;
+ }
+
+ private function findParentElement(parentType:String, parentName:String, childXML:XML ):Boolean {
+ //trace("ProcessCreator findParentElement");
+ //trace( parentType + " " + parentName);
+ //trace( childXML);
+ //trace("Target Namespace" + BPELProcess. at targetNamespace)
+
+ var bpws:Namespace = new Namespace("http://schemas.xmlsoap.org/ws/2003/03/business-process/");
+
+ var tempParentXML:XML;
+ var tempXMLList:XMLList;
+ var item:XML;
+ var tempString:String;
+ var returnBoolean:Boolean = true;
+
+ switch(parentType) {
+
+ case WorkflowActivities.PROCESS:
+ //trace("process");
+ BPELProcess.appendChild(childXML);
+ break;
+
+ case WorkflowActivities.PARTNERLINKS:
+ //trace("partnerLinks");
+ tempXMLList = BPELProcess..bpws::partnerLinks;
+
+ // There can be only one PartnerLinks sub element of Process
+ item = tempXMLList[0];
+ item.appendChild(childXML);
+ break;
+
+ case WorkflowActivities.VARIABLES:
+ //trace("variables");
+ tempXMLList= BPELProcess..bpws::variables;
+ // There can be only one Variables sub element of Process
+ // Similar to PartnerLinks but in different format
+ for each (item in tempXMLList){
+ item.appendChild(childXML);
+ }
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ //trace("sequence");
+ tempXMLList = BPELProcess..bpws::sequence;
+ //trace("tempXMLList.length(): " + tempXMLList.length())
+ for each (item in tempXMLList){
+ tempString = item. at name;
+
+ // There can be multiple Sequence and can be anywhere
+ if(tempString == parentName){
+ //trace("Sequence item. at name: " + item.toXMLString());
+ item.appendChild(childXML);
+ break;
+ }
+ }
+ break;
+
+ case WorkflowActivities.WHILE:
+ //trace("while");
+
+ // Can't use ..bpws::while; because while is keyWord
+ //BPELProcess.
+ tempXMLList = BPELProcess.descendants();
+ //trace("tempXMLList.length(): " + tempXMLList.length())
+ for each (item in tempXMLList){
+ //trace("Local Names Proces Creator: " + item.localName());
+ if(item.localName() == "while"){
+ tempString = item. at name;
+
+ // There can be multiple Sequence and can be anywhere
+ if(tempString == parentName){
+ //trace("Sequence item. at name: " + item.toXMLString());
+ //trace("item.length(): " + item.children().length());
+ if(item.children().length() < 1)
+ item.appendChild(childXML);
+ else return false;
+ break;
+ }
+ }
+ }
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ //trace("sequence");
+ tempXMLList = BPELProcess..bpws::assign;
+
+ for each (item in tempXMLList){
+ tempString = item. at name;
+
+ if(tempString == parentName){
+
+ item.appendChild(childXML);
+ break;
+ }
+ }
+ break;
+ default:
+ trace("ProcessCreator.findParentElement: Not Yet Implemented: " + parentType);
+ }
+
+ return returnBoolean;
+ }
+
+ private function isUnique(activityType:String, activityName:String):Boolean {
+
+ var bpws:Namespace = new Namespace("http://schemas.xmlsoap.org/ws/2003/03/business-process/");
+
+ var tempParentXML:XML;
+ var tempXMLList:XMLList;
+ var item:XML;
+ var tempString:String;
+ var returnBoolean:Boolean = true;
+
+ switch(activityType) {
+
+ case WorkflowActivities.PARTNERLINK:
+ //trace("partnerLink");
+ tempXMLList = BPELProcess..bpws::partnerLink;
+
+ for each (item in tempXMLList){
+ if(item. at name == activityName)
+ return false;
+ }
+ break;
+
+ case WorkflowActivities.VARIABLE:
+ //trace("variable");
+ tempXMLList= BPELProcess..bpws::variable;
+
+ for each (item in tempXMLList){
+ if(item. at name == activityName)
+ return false;
+ }
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ //trace("sequence");
+ tempXMLList = BPELProcess..bpws::sequence;
+ //trace("tempXMLList.length(): " + tempXMLList.length())
+ for each (item in tempXMLList){
+ tempString = item. at name;
+
+ // There can be multiple Sequence and can be anywhere
+ if(tempString == activityName){
+ return false;
+ }
+ }
+ break;
+
+ case WorkflowActivities.WHILE:
+ //trace("while");
+
+ // Can't use ..bpws::while; because while is keyWord
+ tempXMLList = BPELProcess.descendants();
+ //trace("tempXMLList.length(): " + tempXMLList.length())
+ for each (item in tempXMLList){
+ //trace("Local Names Proces Creator: " + item.localName());
+ if(item.localName() == "while"){
+ tempString = item. at name;
+ if(tempString == activityName){
+ return false;
+ }
+ }
+ }
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ //trace("sequence");
+ tempXMLList = BPELProcess..bpws::assign;
+
+ for each (item in tempXMLList){
+ tempString = item. at name;
+
+ if(tempString == activityName){
+ return false;
+ }
+ }
+ break;
+ default:
+ trace("ProcessCreator.isUnique: Not Yet Implemented: " + activityType);
+ }
+
+ return returnBoolean;
+ }
+
+ private function createChild(childType:String, attributesArray:Array):XML{
+ //trace("ProcessCreator createChild " + childType);
+
+ var bpws:Namespace = new Namespace("http://schemas.xmlsoap.org/ws/2003/03/business-process/");
+ default xml namespace = bpws;
+ var tempChildElement:String = "<" + childType + "/>"
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ //trace("tempChildXML without Attribute: " + tempChildXML.toXMLString())
+ //trace("tempChildXML without Attribute: " + tempChildXML.toString())
+ if(attributesArray){
+ for(var i:Number = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] != ""){
+ if(attributesArray[i][0] != undefined){
+ if(attributesArray[i][0] != "empty"){
+ //trace(attributesArray[i][1] + " " + attributesArray[i][0])
+ tempChildXML.@[attributesArray[i][0]] = attributesArray[i][1];
+ } else {
+ tempChildXML.appendChild(attributesArray[i][1]);
+ }
+ }
+ }
+ //trace("tempChildXML adding Attribute: " + tempChildXML.toXMLString())
+ }
+ }
+ return tempChildXML;
+ }
+ // Function creates new activity only if it is unique otherwise it assumes that
+ // it is same activity
+ public function createNewActivity(parentType:String, parentName:String, newActivityType:String,
+ attributeArray:Array):Boolean {
+ if(attributeArray){
+ for(var i:Number = 0; i < attributeArray.length; i++){
+ if(attributeArray[i][0] == "name"){
+ if(isUnique(newActivityType, attributeArray[i][1])){
+ var childXML:XML = createChild(newActivityType, attributeArray);
+ return this.findParentElement(parentType, parentName, childXML);
+ }
+ }
+ }
+ }
+
+ //
+ //var childXML:XML = createChild(newActivityType, attributeArray);
+ //return this.findParentElement(parentType, parentName, childXML);
+ return false;
+ }
+
+ public function modifyNameForMonitoring(activityType:String, activityOldName:String, activityNewName:String):Boolean{
+ var bpws:Namespace = new Namespace("http://schemas.xmlsoap.org/ws/2003/03/business-process/");
+
+ var tempXMLList:XMLList;
+ var item:XML;
+
+ var returnBoolean:Boolean = false;
+
+ switch(activityType) {
+
+ case WorkflowActivities.RECEIVE:
+ //trace("receive");
+ tempXMLList = BPELProcess..bpws::receive;
+
+ for each (item in tempXMLList){
+ if(item. at name == activityOldName){
+ item. at name = activityNewName;
+ return true;
+ }
+ }
+ break;
+
+ case WorkflowActivities.REPLY:
+ //trace("reply");
+ tempXMLList= BPELProcess..bpws::reply;
+
+ for each (item in tempXMLList){
+ if(item. at name == activityOldName){
+ item. at name = activityNewName;
+ return true;
+ }
+ }
+ break;
+
+ case WorkflowActivities.INVOKE:
+ //trace("invoke");
+ tempXMLList = BPELProcess..bpws::invoke;
+
+ for each (item in tempXMLList){
+ if(item. at name == activityOldName){
+ item. at name = activityNewName;
+ return true;
+ }
+ }
+ break;
+
+
+ default:
+ trace("ProcessCreator.modifyNameForMonitoring: Not Yet Implemented: " + activityType);
+ }
+
+ return returnBoolean;
+ }
+
+ //private function updateName()
+ public function createNewCopy(parentType:String, parentName:String, copyDOValue:CopyDO):void {
+ var tempAttributeArray:Array = new Array();
+ //tempAttributeArray.push(["name", "defaultAssign"]);
+
+ var childXML:XML = createChild(WorkflowActivities.COPY, tempAttributeArray);
+
+ var fromXML:XML = createChild(WorkflowActivities.FROM, copyDOValue.fromDO.attributesArray);
+ childXML.appendChild(fromXML);
+
+ var toXML:XML = createChild(WorkflowActivities.TO, copyDOValue.toDO.attributesArray);
+ childXML.appendChild(toXML);
+
+ this.findParentElement(parentType, parentName, childXML);
+ }
+
+ public function createPartnerLinkType(name:String, portType:String,
+ namespacePrefix:String, operationNames:Array,
+ role:String):void {
+ PartnerLinkTypeWrapperDO.getInstance().createPartnerLinkType(name, portType,
+ namespacePrefix, operationNames, role);
+ }
+
+ // This operation used only for Testing ....!
+ public function sequenceCreation(parentType:String, parentName:String, name:String):void{
+ //trace(parentType + " " + parentName + " "+ name);
+ var tempAttributeArray:Array = new Array();
+
+ tempAttributeArray.push(["name", name]);
+ var childXML:XML = createChild(WorkflowActivities.SEQUENCE, tempAttributeArray);
+
+ this.findParentElement(parentType, parentName, childXML);
+ }
+
+ public function addNewNamespace(WSName:String, WSNamespace:String):void {
+ var tempNamespace:Namespace = new Namespace(WSName, WSNamespace);
+ BPELProcess.addNamespace(tempNamespace);
+ if(process)
+ if(process.namespaceArray)
+ process.namespaceArray.push(tempNamespace);
+ }
+
+ // This should not be used directly ... made it PRIVATE
+ private function addNewPartnerLink(WSName:String):void {
+
+ // Retrieve the "bpws" namespace from the Process
+ //var bpws:Namespace = BPELProcess.namespace("bpws");
+
+ var tempChildElement:String = "<partnerLink/>"
+
+ // Make the wsdl namespace as default namespace before
+ // creating XML node
+ //default xml namespace = bpws;
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ tempChildXML. at name = WSName + "_PL";
+ tempChildXML. at partnerLinkType = "clinet:" + WSName + "_PLT";
+ tempChildXML. at partnerRole = WSName + "_role";
+
+ // searching element with qualified name
+ // will return two messages
+ var tempPartnerLinksList:XMLList = BPELProcess..partnerLinks
+
+ var itemPartnerLinks:XML = tempPartnerLinksList[0];
+
+ itemPartnerLinks.appendChild(tempChildXML);
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/ProcessCreator.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/QoSCreator.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/QoSCreator.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/QoSCreator.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,230 @@
+package bpel.editor.gridcc.controller
+{
+ public class QoSCreator {
+
+ /**
+ * The Singleton instance of SubmissionDocumentCreator
+ */
+ protected static var instance:QoSCreator;
+
+ [Bindable]
+ public var QoSDocument:XML;
+
+ private var namespaceArray:Array;
+ private var localParameterArray:Array;
+ private var localAttributesArray:Array;
+
+ private var localWSName:String;
+ private var localType:String;
+
+ // Not Used Any More
+ //private static const QoS_BASIC_NAMESPACE:String = "http://www.gridcc.org/qos/20070730/QoS";
+ private static const QoS_NAMESPACE:String = "http://www.gridcc.org/qos/20070730/QoS";
+ private static const XSI_NAMESPACE:String = "http://www.w3.org/2001/XMLSchema-instance";
+ //private static WF_NAMESPACE:String = null;
+ private static const WSDL_PORT_TYPE:String = "_PT";
+ private static const WSDL_OPERATION_NAME:String = "process";
+
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of QoSCreator
+ */
+ public function QoSCreator()
+ {
+ if (QoSCreator.instance == null)
+ {
+ QoSCreator.instance = this;
+ }
+ localParameterArray = new Array();
+ localAttributesArray = new Array();
+ }
+
+ public static function createInstance(parametersArray:Array, atributesArray:Array, type:String):QoSCreator
+ {
+ // This function to be called only from Process Creator
+ if (instance == null)
+ {
+ instance = new QoSCreator();
+ }
+
+ instance.localParameterArray = parametersArray;
+ instance.localAttributesArray = atributesArray;
+ instance.localType = type;
+ instance.createQoSDocument(type);
+ //instance.localWSName = workflowName;
+ return instance;
+ }
+
+ public static function getInstance():QoSCreator
+ {
+ // This function to be called from all classes except Process Creator
+ if (instance == null)
+ {
+ // Do Nothing
+ }
+ return instance;
+ }
+
+ private function createQoSDocument(type:String):void {
+ if(!QoSDocument){
+ QoSDocument = new XML("<QoSRequirements/>");
+ instance.fillNamespaceArray();
+ instance.addSDNamespaces();
+ }
+
+ // For Testing Purpose
+ //QoSDocument.appendChild(new XML("<QoSRequirements/>"));
+
+
+ switch(type){
+ case "IE":
+ createIE();
+ break;
+
+ case "IER":
+ createIER();
+ break;
+
+ case "CE":
+ break;
+
+ case "SE":
+ break;
+
+ default:
+ trace("QoS of type " + type + " not yet supported")
+ }
+ }
+
+
+ private function fillNamespaceArray():void {
+ namespaceArray = new Array();
+ var tempNamespace:Namespace;
+
+ tempNamespace = new Namespace("qos",QoS_NAMESPACE);
+ namespaceArray.push(tempNamespace);
+
+ // Not Used Any More
+ //tempNamespace = new Namespace("qosBasic",QoS_BASIC_NAMESPACE);
+ //namespaceArray.push(tempNamespace);
+
+ tempNamespace = new Namespace("xsi",XSI_NAMESPACE);
+ namespaceArray.push(tempNamespace);
+
+ tempNamespace = new Namespace("wfns",ProcessCreator.getInstance().getTargetNamespace());
+ namespaceArray.push(tempNamespace);
+
+
+ }
+
+ private function addSDNamespaces():void {
+ for(var i:Number = 0; i < namespaceArray.length; i++){
+ QoSDocument.addNamespace(Namespace(namespaceArray[i]));
+ }
+ }
+
+ private function createIER(): void {
+ var QoSConstraint:XML = new XML("<QoSConstraint/>");
+
+ var partnerLinkXML:XML = new XML("<PartnerLinkReference>" +
+ "wfns:" + localParameterArray[0][1] + "</PartnerLinkReference>");
+
+ // Not required for IER
+ //partnerLinkXML. at methodName = localAttributesArray[0][1];
+ QoSConstraint.appendChild(partnerLinkXML);
+
+ var IEService:XML = new XML("<IEService/>");
+ var IEPerformance:XML = new XML("<IEReservationRequired/>");
+
+ //var qualifiedAttribute:String = "qosBasic:" + "ieEndpoint";
+ //IEPerformance.@[qualifiedAttribute] = localAttributesArray[1][1];
+
+ //qualifiedAttribute ="qosBasic:" + "IM_ID";
+ //IEPerformance.@[qualifiedAttribute] = localAttributesArray[2][1];
+ populateElement(IEPerformance);
+
+ IEService.appendChild(IEPerformance);
+
+ QoSConstraint.appendChild(IEService);
+
+ QoSDocument.appendChild(QoSConstraint);
+ //return IEService;
+ }
+
+ private function createIE(): void {
+ // Parent of PartnerLink and IEService
+ var QoSConstraint:XML = new XML("<QoSConstraint/>");
+
+ var partnerLinkXML:XML = new XML("<PartnerLinkReference>" +
+ "wfns:" + localParameterArray[0][1] + "</PartnerLinkReference>");
+ partnerLinkXML. at methodName = localAttributesArray[0][1];
+ QoSConstraint.appendChild(partnerLinkXML);
+
+ var IEService:XML = new XML("<IEService/>");
+ var IEPerformance:XML = new XML("<IEPerformace/>");
+
+ var qualifiedAttribute:String = "qos:" + "ieEndpoint";
+ IEPerformance.@[qualifiedAttribute] = localAttributesArray[1][1];
+
+ qualifiedAttribute ="qos:" + "IM_ID";
+ IEPerformance.@[qualifiedAttribute] = localAttributesArray[2][1];
+ populateElement(IEPerformance);
+
+ IEService.appendChild(IEPerformance);
+ QoSConstraint.appendChild(IEService);
+
+ QoSDocument.appendChild(QoSConstraint);
+ //return IEService;
+ }
+
+ private function populateElement(performanceXML:XML):void{
+ var qosTemp:Namespace = new Namespace("http://www.gridcc.org/qos/20070730/QoS");
+ default xml namespace = qosTemp;
+ for(var i:int = 1 ; i < localParameterArray.length; i++){
+ if(String(localParameterArray[i][1])){
+ if(String(localParameterArray[i][1])){
+ var tempChildElement:String = "<" + localParameterArray[i][0] + ">";
+ tempChildElement = tempChildElement + localParameterArray[i][1];
+ tempChildElement = tempChildElement + "</" + localParameterArray[i][0] + ">";
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ // parameters with attributes starts from 5
+ if(i > 4){
+ pouplateAttributes(tempChildXML, localParameterArray[i][0]);
+ }
+ performanceXML.appendChild(tempChildXML);
+ }
+ }
+ }
+ }
+
+ private function pouplateAttributes(criteriaXML:XML, searchPattern:String):void {
+
+ var qosTemp:Namespace = new Namespace("http://www.gridcc.org/qos/20070730/QoS");
+ default xml namespace = qosTemp;
+
+ for(var i:int = 1 ; i < localAttributesArray.length; i++) {
+ trace("localAttributesArray[i][0]: " + localAttributesArray[i][0]);
+ if(localAttributesArray[i][0].indexOf("operation_" + searchPattern) > -1) {
+ var qualifiedOperation:String = "qos:" + "operation";
+ if(String(localAttributesArray[i][1])) {
+ criteriaXML.@[qualifiedOperation] = localAttributesArray[i][1];
+ } else {
+ criteriaXML.@[qualifiedOperation] = "GE";
+ }
+ }
+
+ if(localAttributesArray[i][0].indexOf("confidence_" + searchPattern) > -1){
+ var qualifiedConfidence:String = "qos:" + "confidence";
+ if(String(localAttributesArray[i][1])){
+ criteriaXML.@[qualifiedConfidence] = localAttributesArray[i][1];
+ } else {
+ criteriaXML.@[qualifiedConfidence] = "100";
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/QoSCreator.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflow.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflow.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflow.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,248 @@
+package bpel.editor.gridcc.controller
+{
+ import flash.events.Event;
+ import flash.net.URLLoader;
+ import flash.net.URLRequest;
+ import flash.net.URLRequestHeader;
+ import flash.net.URLRequestMethod;
+ import flash.net.URLVariables;
+
+ public class RetrieveWorkflow
+ {
+ /**
+ * The Singleton instance of RetrieveWorkflow
+ */
+ protected static var instance:RetrieveWorkflow;
+
+ private var uuid:String;
+ private var fileName:String;
+ private var dirName:String;
+ private var servletURL:String;
+ private var tempURLRequest:URLRequest;
+ private var tempWorkflowID:String;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of RetrieveWorkflow
+ */
+ public function RetrieveWorkflow()
+ {
+ if (RetrieveWorkflow.instance == null)
+ {
+ RetrieveWorkflow.instance = this;
+ }
+ }
+
+ public static function createInstance(uuidValue:String, fileNameValue:String,
+ servletURLValue:String, dirNameValue:String):RetrieveWorkflow
+ {
+ if (instance == null) {
+ instance = new RetrieveWorkflow();
+ if(uuidValue)
+ instance.uuid = uuidValue;
+ if(fileNameValue)
+ instance.fileName = fileNameValue;
+ if(dirNameValue)
+ instance.dirName = dirNameValue;
+ if(servletURLValue)
+ instance.servletURL = servletURLValue;
+ }
+ return instance;
+ }
+
+ public static function getInstance():RetrieveWorkflow{
+ if(instance == null) {
+ // Do Nothing
+ }
+ return instance;
+ }
+
+ public function loadWorkflowFromServer(fileType:String):void {
+
+ //trace("loadWorkflowFromServer " + fileType);
+
+ tempURLRequest = new URLRequest(servletURL);
+ var workflowName:String = "uuid=" + uuid + "&workflowName=" + fileName + "&";
+ var operationString:String = "operation=retrieve&";
+ var fullPath:String = "fullPath="+dirName+"&";
+ //var fileNameTemp:String = "fileName="+ processCreator.BPELProcess. at name ;
+ var fileNameTemp:String = "fileName="+ fileName;
+
+ switch(fileType){
+ case "wsdl":
+ fileNameTemp = fileNameTemp+".wsdl";
+
+ var tempWSDLLoader:URLLoader = new URLLoader();
+ var tempVariables2:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp );
+ tempWSDLLoader.addEventListener(Event.COMPLETE, completeWSDLLoadHandler);
+ tempURLRequest.data = tempVariables2;
+ tempWSDLLoader.load(tempURLRequest);
+ break;
+
+ case "bpel":
+ fileNameTemp = fileNameTemp+".bpel";
+
+ var tempBPELLoader:URLLoader = new URLLoader();
+ var tempBPELVariables:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp);
+ tempBPELLoader.addEventListener(Event.COMPLETE, completeBPELLoadHandler);
+
+ tempURLRequest.data = tempBPELVariables;
+ tempBPELLoader.load(tempURLRequest);
+ //tempBPELLoader.load(new URLRequest("F:/JBProject2005/VCRUploadDownloadServlet/Tomcat/temp/Full_FeedbackCorrection_withCREAM/bpel/Full_FeedbackCorrection_withCREAM/Full_FeedbackCorrection_withCREAM_Original.bpel"));
+
+ break;
+
+ case "pdd":
+ fileNameTemp = fileNameTemp+".pdd";
+
+ var tempPDDLoader:URLLoader = new URLLoader();
+ var tempPDDVariables:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp);
+ tempPDDLoader.addEventListener(Event.COMPLETE, completePDDLoadHandler);
+
+ tempURLRequest.data = tempPDDVariables;
+ tempPDDLoader.load(tempURLRequest);
+
+ break;
+
+ case "catalog":
+ fileNameTemp = "fileName=wsdlCatalog.xml";
+
+ var tempWCLoader:URLLoader = new URLLoader();
+ var tempWCVariables:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp);
+ tempWCLoader.addEventListener(Event.COMPLETE, completeWCLoadHandler);
+
+ tempURLRequest.data = tempWCVariables;
+ tempWCLoader.load(tempURLRequest);
+ break;
+
+ case "subDoc":
+ fileNameTemp = fileNameTemp+"-wfms.xml";
+
+ var tempSDLoader:URLLoader = new URLLoader();
+ var tempSDVariables:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp);
+ tempSDLoader.addEventListener(Event.COMPLETE, completeSDLoadHandler);
+ tempURLRequest.data = tempSDVariables;
+ tempSDLoader.load(tempURLRequest);
+ break;
+ }
+ }
+
+ private function completeBPELLoadHandler(event:Event):void{
+ //trace("BBPPEELL");
+ trace(event.target.data);
+ XML.ignoreComments = false;
+ XML.ignoreProcessingInstructions = false;
+
+ var tempString:String = String (event.target.data);
+ //tempString = tempString.replace(" "," ")
+ var myPattern:RegExp = / /g;
+ tempString = tempString.replace(myPattern, "");
+
+ myPattern = /&/g;
+ //tempString = tempString.replace(myPattern,"%26");
+ //trace(tempString);
+
+ var tempBPEL:XML;
+ try {
+ tempBPEL = new XML(tempString);
+ } catch (error:Error) {
+ tempBPEL = new XML("<process>Error in Loading</process>");
+ } finally {
+ // statements
+ }
+
+ if(tempBPEL)
+ ProcessCreator.getInstance().BPELProcess = tempBPEL;
+ //trace(ProcessCreator.getInstance().BPELProcess);
+
+ WorkflowManager.getInstance().createGUIFromBPELProcess();
+ loadWorkflowFromServer("wsdl");
+ }
+
+ private function completeWSDLLoadHandler(event:Event):void{
+ WSDLCreator.getInstance().WorkflowWSDL = new XML (event.target.data);
+ loadWorkflowFromServer("pdd");
+ }
+
+ private function completePDDLoadHandler(event:Event):void{
+ //trace("PDD");
+ //trace(event.target.data);
+
+ // This part is only to avoid the complications
+ //trace("WS Local Name passed to PDD Creator: " + fileName);
+ var pddCreator:PDDCreator = PDDCreator.createInstance(this.fileName,"Dummy/Namespace");
+ pddCreator.WorkflowPDD = null;
+
+ // This is acturally loading and assigning the PDD file
+ pddCreator.WorkflowPDD = new XML (event.target.data);
+ loadWorkflowFromServer("catalog");
+ }
+
+ private function completeWCLoadHandler(event:Event):void{
+ //trace("WC");
+ //trace(event.target.data);
+
+ // This part is only to avoid the complications
+ //trace("WS Local Name passed to WC Creator: " + fileName);
+ var catalogCreator:WSDLCatalogCreator = WSDLCatalogCreator.createInstance(this.fileName);
+ catalogCreator.WSDLCatalog = null;
+
+ // This is acturally loading and assigning the PDD file
+ catalogCreator.WSDLCatalog = new XML (event.target.data);
+ loadWorkflowFromServer("subDoc");
+ }
+
+ private function completeSDLoadHandler(event:Event):void{
+ //trace("WC");
+ //trace(event.target.data);
+ // This part is only to avoid the complications
+ //trace("WS Local Name passed to S Creator: " + fileName);
+ var loader:URLLoader = URLLoader(event.target);
+ var subDOcCreator:SubmissionDocumentCreator = SubmissionDocumentCreator..createInstance(
+ this.fileName, "Dummy/Namespace");
+ subDOcCreator.SubmissionDocument = null;
+
+ // This is acturally loading and assigning the PDD file
+ subDOcCreator.SubmissionDocument = new XML (event.target.data);
+ //loadWorkflowFromServer("QoS");
+ loader.close();
+ }
+
+ public function retrieveMonitoringWorkflow(workflowID:String):void{
+ //trace("******************** retrieveMonitoringWorkflow *******");
+ var header:URLRequestHeader = new URLRequestHeader("pragma", "no-cache");
+
+ tempWorkflowID = workflowID;
+ //trace("servletURL: " + servletURL);
+ tempURLRequest = null;
+ tempURLRequest = new URLRequest(servletURL);
+ tempURLRequest.requestHeaders.push(header);
+ tempURLRequest.method = URLRequestMethod.POST;
+
+ var tempWorkflowID:String = "wfId=" + workflowID + "&";
+ var operationString:String = "operation=getStatus";
+
+ var tempMonitoringBPELLoader:URLLoader = new URLLoader();
+ tempMonitoringBPELLoader.addEventListener(Event.COMPLETE, completeMonitoringLoadHandler);
+
+ var tempVariables:URLVariables = new URLVariables(tempWorkflowID + operationString /* + fullPath + fileNameTemp */);
+ tempURLRequest.data = tempVariables;
+ tempMonitoringBPELLoader.load(tempURLRequest);
+ var monitoringBPEL:MonitoringWorkflow = MonitoringWorkflow.getInstance(tempWorkflowID);
+ monitoringBPEL.update = true;
+ }
+
+ private function completeMonitoringLoadHandler(event:Event):void{
+ //trace("******************** completeMonitoringLoadHandler *******");
+ //trace(event.target.data);
+ var loader:URLLoader = URLLoader(event.target);
+
+ var monitoringBPEL:MonitoringWorkflow = MonitoringWorkflow.getInstance(tempWorkflowID);
+ //trace(event.target.data);
+ monitoringBPEL.setMonitoringWorkflow(new XML (event.target.data));
+ monitoringBPEL.update = false;
+ loader.close();
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflow.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,85 @@
+/*
+ private function loadWorkflowFromServer(fileType:String):void {
+
+ trace("loadWorkflowFromServer " + fileType);
+ tempURLRequest = new URLRequest(servletURL);
+ var operationString:String = "operation=retrieve&";
+ var fullPath:String = "fullPath="+dirName+"&";
+ //var fileNameTemp:String = "fileName="+ processCreator.BPELProcess. at name ;
+ var fileNameTemp:String = "fileName="+ fileName;
+
+ switch(fileType){
+ case "wsdl":
+ fileNameTemp = fileNameTemp+".wsdl";
+
+ var tempWSDLLoader:URLLoader = new URLLoader();
+ var tempVariables2:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp );
+ tempWSDLLoader.addEventListener(Event.COMPLETE, completeWSDLLoadHandler);
+ tempURLRequest.data = tempVariables2;
+ tempWSDLLoader.load(tempURLRequest);
+ break;
+
+ case "bpel":
+ fileNameTemp = fileNameTemp+".bpel";
+
+ var tempBPELLoader:URLLoader = new URLLoader();
+ var tempBPELVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp);
+ tempBPELLoader.addEventListener(Event.COMPLETE, completeBPELLoadHandler);
+
+ tempURLRequest.data = tempBPELVariables;
+ tempBPELLoader.load(tempURLRequest);
+
+ break;
+
+ case "pdd":
+ fileNameTemp = fileNameTemp+".pdd";
+
+ var tempPDDLoader:URLLoader = new URLLoader();
+ var tempPDDVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp);
+ tempPDDLoader.addEventListener(Event.COMPLETE, completePDDLoadHandler);
+
+ tempURLRequest.data = tempPDDVariables;
+ tempPDDLoader.load(tempURLRequest);
+
+ break;
+
+ case "QoS":
+ fileNameTemp = fileNameTemp+".qos";
+ // To BE Done
+ //fileContent = fileContent + QOS
+
+ break;
+ }
+ }
+
+ private function completeBPELLoadHandler(event:Event):void{
+ //trace("BBPPEELL");
+ //trace(event.target.data);
+ processCreator.BPELProcess = new XML (event.target.data);
+ createGUIFromBPELProcess();
+ loadWorkflowFromServer("pdd");
+ }
+
+ private function completeWSDLLoadHandler(event:Event):void{
+ //trace("WWSDDDDDDLLLLL");
+ //trace(event.target.data);
+ //processCreator.BPELWSDL = new XML (event.target.data);
+ WSDLCreator.getInstance().WorkflowWSDL = new XML (event.target.data);
+ loadWorkflowFromServer("bpel");
+ }
+
+ private function completePDDLoadHandler(event:Event):void{
+ //trace("PDD");
+ //trace(event.target.data);
+
+ // This part is only to avoid the complications
+ trace("WS Local Name passed to PDD Creator: " + fileName);
+ var pddCreator:PDDCreator = PDDCreator.createInstance(this.fileName,"Dummy/Namespace");
+ pddCreator.WorkflowPDD = null;
+
+ // This is acturally loading and assigning the PDD file
+ pddCreator.WorkflowPDD = new XML (event.target.data);
+ //loadWorkflowFromServer("QoS");
+ }
+
+ */
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/RetrieveWorkflowRemovedFromWorkflowManager.txt
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflow.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflow.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflow.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,265 @@
+package bpel.editor.gridcc.controller
+{
+ import flash.events.Event;
+ import flash.net.URLLoader;
+ import flash.net.URLRequest;
+ import flash.net.URLRequestMethod;
+ import flash.net.URLVariables;
+
+ public class SaveWorkflow
+ {
+ /**
+ * The Singleton instance of SaveWorkflow
+ */
+ protected static var instance:SaveWorkflow;
+
+ private var uuid:String;
+ private var fileName:String;
+ private var dirName:String;
+ private var servletURL:String;
+ private var tempURLRequest:URLRequest;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of SaveWorkflow
+ */
+ public function SaveWorkflow()
+ {
+ if (SaveWorkflow.instance == null)
+ {
+ SaveWorkflow.instance = this;
+ }
+ }
+
+ public static function getInstance(uuidValue:String, fileNameValue:String,
+ servletURLValue:String, dirNameValue:String):SaveWorkflow
+ {
+ if (instance == null) {
+ instance = new SaveWorkflow();
+ }
+ instance.uuid = uuidValue;
+ instance.fileName = fileNameValue;
+ instance.dirName = dirNameValue;
+ instance.servletURL = servletURLValue;
+ return instance;
+ }
+
+ public function saveWorkflowOnServer(fileType:String):void {
+ //trace("saveWorkflowOnServer " + fileType);
+ tempURLRequest = new URLRequest(servletURL);
+ tempURLRequest.method = URLRequestMethod.POST;
+ //tempURLRequest.contentType = "text/xml";
+
+ var workflowName:String = "uuid=" + uuid + "&workflowName=" + fileName + "&";
+ var operationString:String = "operation=save&";
+ var fullPath:String = "fullPath="+dirName+"&";
+ //var fileNameTemp:String = "fileName="+ processCreator.BPELProcess. at name ;
+ var fileNameTemp:String = "fileName="+ fileName;
+ var fileContent:String = "fileContent=";
+
+ var myPattern:RegExp = /&/g;
+
+
+ switch(fileType){
+ case "wsdl":
+ fileNameTemp = fileNameTemp+".wsdl&";
+ fileContent = fileContent + WSDLCreator.getInstance().WorkflowWSDL.toString();
+
+ myPattern = /&/g;
+ fileContent = fileContent.replace(myPattern,"%26");
+
+ myPattern = /+/g;
+ fileContent = fileContent.replace(myPattern,"%2B");
+
+ while(fileContent.indexOf("&") > -1){
+ //trace("fileContent.indexOf(&): " + fileContent.indexOf("&"));
+ fileContent = fileContent.replace("&","%26");
+ }
+
+ while(fileContent.indexOf("+") > -1){
+ //trace("fileContent.indexOf(+): " + fileContent.indexOf("+"));
+ fileContent = fileContent.replace("+","%2B");
+ }
+
+ var WSDLLoader:URLLoader = new URLLoader();
+ var tempVariables2:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp + fileContent);
+ WSDLLoader.addEventListener(Event.COMPLETE, completeWSDLHandler);
+ tempURLRequest.data = tempVariables2;
+ WSDLLoader.load(tempURLRequest);
+ break;
+
+ case "bpel":
+ fileNameTemp = fileNameTemp + ".bpel&";
+
+ fileContent = fileContent + ProcessCreator.getInstance().BPELProcess.toString();
+ //fileContent = fileContent.replace(" "," ");
+
+ /*
+ // original Regular Expression not working
+ myPattern = /&/g;
+ fileContent = fileContent.replace(myPattern,"%26");
+ */
+ while(fileContent.indexOf("&") > -1){
+ //trace("fileContent.indexOf(&): " + fileContent.indexOf("&"));
+ fileContent = fileContent.replace("&","%26");
+ }
+
+ while(fileContent.indexOf("+") > -1){
+ trace("fileContent.indexOf(+): " + fileContent.indexOf("+"));
+ fileContent = fileContent.replace("+","%2B");
+ }
+
+ //trace(fileContent);
+
+ var tempBPELLoader:URLLoader = new URLLoader();
+ var tempBPELVariables:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp + fileContent);
+ //trace(tempBPELVariables);
+ tempBPELLoader.addEventListener(Event.COMPLETE, completeBPELHandler);
+ tempURLRequest.data = tempBPELVariables;
+ tempBPELLoader.load(tempURLRequest);
+
+ break;
+
+ case "QoS":
+ fileNameTemp = fileNameTemp+".qos&";
+
+ // To BE Done
+ //fileContent = fileContent + QOS
+
+ /*
+ myPattern = /&/g;
+ fileContent = fileContent.replace(myPattern,"%26");
+ */
+
+ while(fileContent.indexOf("&") > -1){
+ //trace("fileContent.indexOf(&): " + fileContent.indexOf("&"));
+ fileContent = fileContent.replace("&","%26");
+ }
+ myPattern = /+/g;
+ fileContent = fileContent.replace(myPattern,"%2B");
+
+ break;
+
+ case "pdd":
+ fileNameTemp = fileNameTemp + ".pdd&";
+
+ if(PDDCreator.getInstance().WorkflowPDD){
+
+ fileContent = fileContent + PDDCreator.getInstance().WorkflowPDD.toString();
+
+ myPattern = /&/g;
+ fileContent = fileContent.replace(myPattern,"%26");
+
+ myPattern = /+/g;
+ fileContent = fileContent.replace(myPattern,"%2B");
+
+ while(fileContent.indexOf("&") > -1){
+ //trace("fileContent.indexOf(&): " + fileContent.indexOf("&"));
+ fileContent = fileContent.replace("&","%26");
+ }
+
+ while(fileContent.indexOf("+") > -1){
+ //trace("fileContent.indexOf(+): " + fileContent.indexOf("+"));
+ fileContent = fileContent.replace("+","%2B");
+ }
+
+ var tempPDDLoader:URLLoader = new URLLoader();
+ var tempPDDVariables:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp + fileContent);
+ tempPDDLoader.addEventListener(Event.COMPLETE, completePDDHandler);
+ tempURLRequest.data = tempPDDVariables;
+ tempPDDLoader.load(tempURLRequest);
+ }
+
+ break;
+
+ case "catalog":
+ fileNameTemp = "fileName=wsdlCatalog.xml&";
+
+ if(WSDLCatalogCreator.getInstance().WSDLCatalog){
+ fileContent = fileContent + WSDLCatalogCreator.getInstance().WSDLCatalog.toString();
+
+ myPattern = /&/g;
+ fileContent = fileContent.replace(myPattern,"%26");
+
+ myPattern = /+/g;
+ fileContent = fileContent.replace(myPattern,"%2B");
+
+ while(fileContent.indexOf("&") > -1){
+ //trace("fileContent.indexOf(&): " + fileContent.indexOf("&"));
+ fileContent = fileContent.replace("&","%26");
+ }
+
+ while(fileContent.indexOf("+") > -1){
+ //trace("fileContent.indexOf(+): " + fileContent.indexOf("+"));
+ fileContent = fileContent.replace("+","%2B");
+ }
+ // WC stands for WSDL Catalog
+ var tempWCLoader:URLLoader = new URLLoader();
+ var tempWCVariables:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp + fileContent);
+ tempWCLoader.addEventListener(Event.COMPLETE, completeWCHandler);
+ tempURLRequest.data = tempWCVariables;
+ tempWCLoader.load(tempURLRequest);
+ }
+
+ break;
+
+ case "subDoc":
+ fileNameTemp = fileNameTemp + "-wfms.xml&";
+
+ if(SubmissionDocumentCreator.getInstance().SubmissionDocument){
+ fileContent = fileContent + SubmissionDocumentCreator.getInstance().SubmissionDocument.toString();
+
+ myPattern = /&/g;
+ fileContent = fileContent.replace(myPattern,"%26");
+
+ myPattern = /+/g;
+ fileContent = fileContent.replace(myPattern,"%2B");
+
+ while(fileContent.indexOf("&") > -1){
+ //trace("fileContent.indexOf(&): " + fileContent.indexOf("&"));
+ fileContent = fileContent.replace("&","%26");
+ }
+
+ while(fileContent.indexOf("+") > -1){
+ //trace("fileContent.indexOf(+): " + fileContent.indexOf("+"));
+ fileContent = fileContent.replace("+","%2B");
+ }
+ //trace (fileContent)
+ // SD stands for Submission Document
+ var tempSDLoader:URLLoader = new URLLoader();
+ var tempSDVariables:URLVariables = new URLVariables(workflowName + operationString + fullPath + fileNameTemp + fileContent);
+ tempSDLoader.addEventListener(Event.COMPLETE, completeSDHandler);
+ tempURLRequest.data = tempSDVariables;
+ tempSDLoader.load(tempURLRequest);
+ }
+
+ break;
+ }
+ }
+
+ private function completeWSDLHandler(event:Event):void{
+ //trace("WSDL: " + event.target.data);
+ saveWorkflowOnServer("bpel");
+ }
+
+ private function completeBPELHandler(event:Event):void{
+ //trace("BPEL: " + event.target.data);
+ saveWorkflowOnServer("pdd");
+ }
+
+ private function completePDDHandler(event:Event):void{
+ //trace("PDD: " + event.target.data);
+ saveWorkflowOnServer("catalog");
+ }
+
+ private function completeWCHandler(event:Event):void{
+ //trace("WSDL Catalog: " + event.target.data);
+ saveWorkflowOnServer("subDoc");
+ }
+
+ private function completeSDHandler(event:Event):void{
+ //saveWorkflowOnServer("catalog");
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflow.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,102 @@
+ /*
+ private function saveWorkflowOnServer(fileType:String):void {
+ trace("saveWorkflowOnServer " + fileType);
+ tempURLRequest = new URLRequest(servletURL);
+ tempURLRequest.method = URLRequestMethod.POST;
+
+ var operationString:String = "operation=save&";
+ var fullPath:String = "fullPath="+dirName+"&";
+ //var fileNameTemp:String = "fileName="+ processCreator.BPELProcess. at name ;
+ var fileNameTemp:String = "fileName="+ fileName;
+ var fileContent:String = "fileContent=";
+
+
+ switch(fileType){
+ case "wsdl":
+ fileNameTemp = fileNameTemp+".wsdl&";
+ fileContent = fileContent + WSDLCreator.getInstance().WorkflowWSDL;
+
+
+ var WSDLLoader:URLLoader = new URLLoader();
+ var tempVariables2:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp + fileContent);
+ WSDLLoader.addEventListener(Event.COMPLETE, completeWSDLHandler);
+ tempURLRequest.data = tempVariables2;
+ WSDLLoader.load(tempURLRequest);
+ break;
+
+ case "bpel":
+ fileNameTemp = fileNameTemp+".bpel&";
+ fileContent = fileContent + processCreator.BPELProcess;
+
+ var tempBPELLoader:URLLoader = new URLLoader();
+ var tempBPELVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp + fileContent);
+ tempBPELLoader.addEventListener(Event.COMPLETE, completeBPELHandler);
+ tempURLRequest.data = tempBPELVariables;
+ tempBPELLoader.load(tempURLRequest);
+
+ break;
+
+ case "QoS":
+ fileNameTemp = fileNameTemp+".qos";
+ // To BE Done
+ //fileContent = fileContent + QOS
+
+ break;
+
+ case "pdd":
+ fileNameTemp = fileNameTemp + ".pdd";
+
+ fileContent = fileContent + PDDCreator.getInstance().WorkflowPDD;
+
+ var tempPDDLoader:URLLoader = new URLLoader();
+ var tempPDDVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp + fileContent);
+ tempPDDLoader.addEventListener(Event.COMPLETE, completePDDHandler);
+ tempURLRequest.data = tempPDDVariables;
+ tempPDDLoader.load(tempURLRequest);
+
+ break;
+
+ case "catalog":
+ fileNameTemp = "wsdlCatalog.xml";
+
+ fileContent = fileContent + WSDLCatalogCreator.getInstance().WSDLCatalog;
+
+ // WC stands for WSDL Catalog
+
+ var tempWCLoader:URLLoader = new URLLoader();
+ var tempWCVariables:URLVariables = new URLVariables(operationString + fullPath + fileNameTemp + fileContent);
+ tempWCLoader.addEventListener(Event.COMPLETE, completeWCHandler);
+ tempURLRequest.data = tempWCVariables;
+ tempWCLoader.load(tempURLRequest);
+
+ break;
+
+ case "subDoc":
+ fileNameTemp = fileNameTemp + ".xml";
+ // To BE Done
+ //fileContent = fileContent + QOS
+
+ break;
+ }
+ }
+
+ private function completeBPELHandler(event:Event):void{
+ //saveWorkflowOnServer("pdd");
+ }
+
+ private function completeWSDLHandler(event:Event):void{
+ saveWorkflowOnServer("bpel");
+ }
+
+ private function completePDDHandler(event:Event):void{
+ //saveWorkflowOnServer("catalog");
+ }
+
+ private function completeWCHandler(event:Event):void{
+ //saveWorkflowOnServer("subDoc");
+ }
+
+ private function completeQoSHandler(event:Event):void{
+ //saveWorkflowOnServer("QoS");
+ }
+ */
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SaveWorkflowRemovedFromWorkflowManager
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SubmissionDocumentCreator.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SubmissionDocumentCreator.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SubmissionDocumentCreator.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,275 @@
+package bpel.editor.gridcc.controller
+{
+ public class SubmissionDocumentCreator
+ {
+ /**
+ * The Singleton instance of SubmissionDocumentCreator
+ */
+ protected static var instance:SubmissionDocumentCreator;
+
+ [Bindable]
+ public var SubmissionDocument:XML;
+
+ private var namespaceArray:Array;
+
+ private var localWSName:String;
+
+ private static const WSDL_NAMESPACE:String = "http://gridcc.org/workflows/";
+ private static const WSDL_PORT_TYPE:String = "_PT";
+ private static const WSDL_OPERATION_NAME:String = "process";
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of SubmissionDocumentCreator
+ */
+ public function SubmissionDocumentCreator()
+ {
+ if (SubmissionDocumentCreator.instance == null)
+ {
+ SubmissionDocumentCreator.instance = this;
+ }
+ }
+
+ public static function createInstance(workflowName:String, workflowNamespace:String):SubmissionDocumentCreator
+ {
+ // This function to be called only from Process Creator
+ if (instance == null)
+ {
+ instance = new SubmissionDocumentCreator();
+ }
+ instance.createSubmissionDocument(workflowName, workflowNamespace);
+ instance.localWSName = workflowName;
+ return instance;
+ }
+
+ public static function getInstance():SubmissionDocumentCreator
+ {
+ // This function to be called from all classes except Process Creator
+ if (instance == null)
+ {
+ // Do Nothing
+ }
+ return instance;
+ }
+
+ private function createSubmissionDocument(workflowName:String, workflowNamespace:String):void {
+
+ SubmissionDocument = new XML("<wfSubmitRequest/>");
+ SubmissionDocument. at language="BPEL"
+ SubmissionDocument. at engine="active-BPEL";
+ SubmissionDocument. at actionCycle="deploy-and-trigger";
+ instance.fillNamespaceArray(workflowNamespace);
+ instance.addSDNamespaces();
+ instance.createWorkflow();
+ instance.createDeploy(workflowName);
+ instance.createTrigger(workflowName);
+ instance.createQoSRequirements();
+
+ }
+
+ private function fillNamespaceArray(workflowNamespace:String):void {
+ namespaceArray = new Array();
+ var tempNamespace:Namespace;
+
+ tempNamespace = new Namespace("qos","http://www.gridcc.org/qos/20070223/2");
+ namespaceArray.push(tempNamespace);
+
+ tempNamespace = new Namespace("xs","http://www.w3.org/2001/XMLSchema-instance");
+ namespaceArray.push(tempNamespace);
+
+ tempNamespace = new Namespace("wfms",workflowNamespace);
+ namespaceArray.push(tempNamespace);
+ }
+
+ private function addSDNamespaces():void {
+ for(var i:Number = 0; i < namespaceArray.length; i++){
+ SubmissionDocument.addNamespace(Namespace(namespaceArray[i]));
+ }
+ // Hard Coded default Namespace
+ //Not used in Submission Document
+ //WorkflowPDD. at xmlns="http://XXXXXX";
+ }
+ private function createWorkflow():void {
+ var tempChildElement:String = "<workflow/>"
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ tempChildXML. at encoding="Base64";
+ tempChildXML. at packageFormat="bpr";
+
+ findParentElement("wfSubmitRequest",tempChildXML);
+ }
+
+ private function createDeploy(workflowName:String):void {
+ var tempChildElement:String = "<deploy/>"
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ tempChildXML. at inputParameters="0";
+
+ findParentElement("wfSubmitRequest",tempChildXML);
+
+ createParameter("deploy", "xs:string", workflowName+".bpr", null);
+ }
+
+ private function createTrigger(workflowName:String):void {
+ var tempChildElement:String = "<trigger/>"
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ tempChildXML. at inputParameters="0";
+
+ findParentElement("wfSubmitRequest",tempChildXML);
+
+ createTriggerServiceCompletion(workflowName);
+ createTriggerServiceWSDLTNS(workflowName);
+ createTriggerServiceName(workflowName);
+ createTriggerPortName(workflowName);
+ createTriggerOperationName();
+
+ createParameter("trigger", "xs:string", "Free Part", null);
+ }
+
+ private function createTriggerServiceCompletion(value:String):void{
+ var tempChildElement:String = "<serviceCompletion>" + value + "</serviceCompletion>"
+ var tempChildXML:XML = new XML(tempChildElement);
+ findParentElement("trigger",tempChildXML);
+
+ }
+
+ private function createTriggerServiceWSDLTNS(value:String):void{
+ var tempChildElement:String = "<wsdlTargetNamespace>" + "http://gridcc.org/workflows/" + value + "</wsdlTargetNamespace>"
+ var tempChildXML:XML = new XML(tempChildElement);
+ findParentElement("trigger",tempChildXML);
+
+ }
+
+ private function createTriggerServiceName(value:String):void{
+ var tempChildElement:String = "<serviceName>" + value + "</serviceName>"
+ var tempChildXML:XML = new XML(tempChildElement);
+ findParentElement("trigger",tempChildXML);
+
+ }
+
+ private function createTriggerPortName(value:String):void{
+ var tempChildElement:String = "<portName>" + value + "_PT" + "</portName>"
+ var tempChildXML:XML = new XML(tempChildElement);
+ findParentElement("trigger",tempChildXML);
+
+ }
+
+ private function createTriggerOperationName():void{
+ var tempChildElement:String = "<operationName>" + "process" + "</operationName>"
+ var tempChildXML:XML = new XML(tempChildElement);
+ findParentElement("trigger",tempChildXML);
+
+ }
+
+ private function createQoSRequirements():void {
+ trace("createQoSRequirements");
+ var tempChildElement:String = "<QoSRequirements/>"
+ var tempNamespace:Namespace = new Namespace("qos","http://www.gridcc.org/qos/20070223/QoS");
+
+ var tempChildXML:XML = new XML(tempChildElement);
+ //tempChildXML.addNamespace(tempNamespace);
+
+ findParentElement("wfSubmitRequest",tempChildXML);
+ }
+
+ public function createParameter(parent:String, type:String, value:String, partnerLinkRef:String):void {
+ var tempChildElement:String = "<parameter>" + value + "</parameter>"
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ tempChildXML. at order = updateInputParameters(parent);
+ tempChildXML. at type = type;
+ if(partnerLinkRef){
+ tempChildXML. at PartnerLinkReference = localWSName + ":" +partnerLinkRef;
+ }
+ findParentElement(parent,tempChildXML);
+ }
+
+ private function updateInputParameters(parentType:String):Number {
+ var tempXMLList:XMLList;
+ var item:XML
+ var counter:Number = 0;
+
+ switch(parentType) {
+
+ case "deploy":
+ //trace("process");
+ tempXMLList = SubmissionDocument..deploy;
+
+ // There can be only one deploy sub element of wfSubmitRequest
+ item = tempXMLList[0];
+ counter = item. at inputParameters;
+
+ item. at inputParameters = ++(item. at inputParameters);
+ return counter;
+ break;
+
+ case "trigger":
+ //trace("partnerLinks");
+ tempXMLList = SubmissionDocument..trigger;
+
+ // There can be only one trigger sub element of wfSubmitRequest
+ item = tempXMLList[0];
+
+ counter = item. at inputParameters;
+ item. at inputParameters = ++(item. at inputParameters);
+
+ return counter;
+ break;
+
+
+ case "MayBEUsedLater":
+ break;
+
+ default:
+ trace("SD.updateInputParameters(" + parentType + "): Not Yet Implemented");
+ }
+ //tempXMLList = SubmissionDocument..
+ return 0;
+ }
+
+ private function findParentElement(parentType:String, childXML:XML ):void {
+ //trace("ProcessCreator findParentElement");
+ //trace( parentType + " " + parentName);
+
+ var tempXMLList:XMLList;
+ var item:XML;
+
+ switch(parentType) {
+
+ case "wfSubmitRequest":
+ //trace("process");
+ SubmissionDocument.appendChild(childXML);
+ break;
+
+ case "deploy":
+ //trace("partnerLinks");
+ tempXMLList = SubmissionDocument..deploy;
+
+ // There can be only one partnerLinks sub element of process
+ item = tempXMLList[0];
+ item.appendChild(childXML);
+ break;
+
+ case "trigger":
+ //trace("variables");
+ tempXMLList= SubmissionDocument..trigger;
+
+ // There can be only one wsdlReferences sub element of process
+ // Similar to PartnerLinks but in different format
+ for each (item in tempXMLList){
+ item.appendChild(childXML);
+ }
+ break;
+
+ case "MayBEUsedLater":
+
+ break;
+
+ default:
+ trace("SDCreator.findParentElement(" + parentType + "): Not Yet Implemented");
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/SubmissionDocumentCreator.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCatalogCreator.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCatalogCreator.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCatalogCreator.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,90 @@
+package bpel.editor.gridcc.controller
+{
+ import mx.charts.chartClasses.StackedSeries;
+
+ public class WSDLCatalogCreator
+ {
+ /**
+ * The Singleton instance of ProcessCreator
+ */
+ protected static var instance:WSDLCatalogCreator;
+
+ [Bindable]
+ public var WSDLCatalog:XML;
+
+ private var namespaceArray:Array;
+ private var localWorkflowName:String;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of ProcessCreator
+ */
+ public function WSDLCatalogCreator()
+ {
+ if (WSDLCatalogCreator.instance == null)
+ {
+ WSDLCatalogCreator.instance = this;
+ }
+ }
+
+ public static function createInstance(workflowName:String):WSDLCatalogCreator
+ {
+ // This function to be called only from Process Creator
+ if (instance == null)
+ {
+ instance = new WSDLCatalogCreator();
+ }
+ instance.localWorkflowName = workflowName;
+ instance.createInitialWSDLCatalog(workflowName);
+ return instance;
+ }
+
+ public static function getInstance():WSDLCatalogCreator
+ {
+ // This function to be called from all classes except Process Creator
+ if (instance == null)
+ {
+ // Do Nothing
+ }
+ return instance;
+ }
+
+ private function createInitialWSDLCatalog(workflowName:String):void {
+
+ WSDLCatalog = new XML("<wsdlCatalog/>");
+ WSDLCatalog. at xmlns="http://schemas.active-endpoints.com/wsdl-catalog/2005/09/wsdlCatalog.xml";
+ instance.createWSDLEntry (workflowName);
+ }
+
+ public function createWSDLEntry(workflowName:String):void {
+ var tempChildElement:String = "<wsdlEntry/>"
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ tempChildXML. at location = "project:/" + localWorkflowName + "/wsdl/" + workflowName + ".wsdl";
+ tempChildXML. at classpath = "wsdl/" + localWorkflowName + "/wsdl/" + workflowName + ".wsdl";
+
+ findParentElement("wsdlCatalog",tempChildXML);
+ }
+
+ private function findParentElement(parentType:String, childXML:XML ):void {
+
+ var tempXMLList:XMLList;
+ var item:XML;
+
+ switch(parentType) {
+
+ case "wsdlCatalog":
+ //trace("process");
+ WSDLCatalog.appendChild(childXML);
+ break;
+
+ case "MayBEUsedLater":
+ break;
+
+ default:
+ trace("WSDLCatalogCreator.findParentElement: Not Yet Implemented");
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCatalogCreator.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCreator.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCreator.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCreator.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,220 @@
+package bpel.editor.gridcc.controller
+{
+
+ import flash.net.URLLoader;
+ import flash.events.Event;
+ import flash.net.URLLoaderDataFormat;
+ import flash.net.URLRequest;
+
+ public class WSDLCreator
+ {
+ /**
+ * The Singleton instance of WSDLCreator
+ */
+ protected static var instance:WSDLCreator;
+
+ [Bindable]
+ public var WorkflowWSDL:XML;
+
+ private var localWorkflowName:String;
+
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of WSDLCreator
+ */
+ public function WSDLCreator()
+ {
+ if (WSDLCreator.instance == null)
+ {
+ WSDLCreator.instance = this;
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of WSDLCreator
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of WSDLCreator
+ */
+ public static function getInstance():WSDLCreator
+ {
+ if (instance == null)
+ {
+ instance = new WSDLCreator();
+ }
+ return instance;
+ }
+
+ public function loadWSDL(processType:String, workflowName:String):void {
+ localWorkflowName = workflowName;
+
+ var loader:URLLoader = new URLLoader();
+ loader.dataFormat = URLLoaderDataFormat.TEXT;
+ loader.addEventListener(Event.COMPLETE, handleComplete);
+
+ switch(processType){
+
+ case "synchronous":
+ loader.load(new URLRequest("wsdl/Synchronous.wsdl"));
+ break;
+
+ case "asynchronous":
+ loader.load(new URLRequest("wsdl/Asynchronous.wsdl"));
+ break;
+
+ case "empty":
+ break;
+
+ default:
+ trace ("What are you passing to WSDL Loader in Process Creator?");
+ }
+ }
+
+ private function handleComplete(event:Event):void{
+ try{
+ //trace("WSDL Creator File Loaded");
+ WorkflowWSDL = new XML(event.target.data);
+ //trace(BPELWSDL.toXMLString().replace(/DUMMY_PROCESS/g,localWorkflowName));
+ WorkflowWSDL = new XML(WorkflowWSDL.toXMLString().replace(/DUMMY_PROCESS/g,localWorkflowName));
+ //trace(WorkflowWSDL);
+ }catch (e:TypeError){
+ trace(e.message);
+ }
+ }
+
+ private function addNewImport(WSName:String, WSNamespace:String):void{
+
+ // Retrieve the "wsdl" namespace from the WSDL
+ var wsdl:Namespace = WorkflowWSDL.namespace("wsdl");
+
+ var tempChildElement:String = "<import/>"
+
+ // Make the wsdl namespace as default namespace before
+ // creating XML node
+ default xml namespace = wsdl;
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ // adding attributes
+ tempChildXML. at namespace = WSNamespace;
+ tempChildXML. at location = "project:/" + localWorkflowName + "/wsdl/" + WSName + ".wsdl";
+
+ // searching element with qualified name
+ var tempTypesList:XMLList = WorkflowWSDL..wsdl::types
+
+ // Only for testing if import is fully qualified
+ var tempTypesList2:XMLList = WorkflowWSDL.elements();
+ var itemTypes:XML = tempTypesList2[0];
+ //trace(itemTypes.name());
+
+ WorkflowWSDL.insertChildBefore(itemTypes, tempChildXML);
+ }
+
+ public function addNewNamespace(WSName:String, WSNamespace:String):void {
+ var tempNamespace:Namespace = new Namespace(WSName, WSNamespace);
+ WorkflowWSDL.addNamespace(tempNamespace);
+ if(!importExists(WSName, WSNamespace)){
+ addNewImport(WSName, WSNamespace);
+ }
+ }
+
+ public function addNewPartnerLink(WSName:String, WSNamespace:String, portName:String):void{
+
+ if(!partnerLinkTypeExists(WSName, portName)) {
+ var plnk:Namespace = WorkflowWSDL.namespace("plnk");
+
+ var tempPLTElement:String = "<plnk:partnerLinkType/>"
+
+ default xml namespace = plnk;
+ var tempPLTXML:XML = new XML(tempPLTElement);
+
+ tempPLTXML. at name = WSName + "_"+ portName +"_PLT";
+ tempPLTXML.addNamespace(plnk);
+
+ var tempRoleElement:String = "<role/>"
+
+ default xml namespace = plnk;
+ var tempRoleXML:XML = new XML(tempRoleElement);
+
+ tempRoleXML. at name = WSName + "_" + portName + "_Provider";
+
+ var tempPTlement:String = "<portType/>"
+
+ default xml namespace = plnk;
+ var tempPTXML:XML = new XML(tempPTlement);
+
+ tempPTXML. at name = WSName + ":" + portName;
+
+ tempRoleXML.appendChild(tempPTXML);
+ tempPLTXML.appendChild(tempRoleXML);
+ WorkflowWSDL.appendChild(tempPLTXML);
+ }
+ }
+
+ public function addNewRequestMessagePart(partName:String, partType:String):void {
+ // Retrieve the "wsdl" namespace from the WSDL
+ var wsdl:Namespace = WorkflowWSDL.namespace("wsdl");
+
+ var tempChildElement:String = "<part/>"
+
+ // Make the wsdl namespace as default namespace before
+ // creating XML node
+ default xml namespace = wsdl;
+ var tempChildXML:XML = new XML(tempChildElement);
+
+ tempChildXML. at name = partName;
+ tempChildXML. at type = partType;
+
+ // searching element with qualified name
+ // will return two messages
+ var tempMessageList:XMLList = WorkflowWSDL..wsdl::message
+ var itemMessage:XML;
+ //trace("WSDL Creator: " + tempMessageList.length());
+ for(var counter:Number = 0; counter < tempMessageList.length(); counter++){
+ var itemTempMessage:XML = tempMessageList[counter];
+
+ //trace("Messages: " + itemTempMessage.toXMLString());
+ //trace(String (itemTempMessage. at name).search("RequestMessage"));
+
+ if(String (itemTempMessage. at name).search("RequestMessage") > 0){
+ //if(String (itemTempMessage. at name) == localWorkflowName + "RequestMessage"){
+ //trace("Respnse Message found");
+ itemMessage = itemTempMessage;
+ }
+ }
+ if(itemMessage){
+ itemMessage.appendChild(tempChildXML);
+ }
+ }
+
+ private function importExists(WSName:String, WSNamespace:String):Boolean {
+ var wsdl:Namespace = WorkflowWSDL.namespace("wsdl");
+
+ var tempTypesList:XMLList = WorkflowWSDL.children();
+ for each (var item:XML in tempTypesList){
+ if(item. at namespace == WSNamespace){
+ //trace("import found");
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private function partnerLinkTypeExists(WSName:String, portName:String):Boolean {
+ var plnk:Namespace = WorkflowWSDL.namespace("plnk");
+
+ var tempTypesList:XMLList = WorkflowWSDL..plnk::partnerLinkType
+ //trace("tempTypesList in partner link type search: " + tempTypesList.length())
+ for each (var item:XML in tempTypesList){
+ if(item. at name == WSName + "_"+ portName +"_PLT"){
+ //trace("Partner Link Type found");
+ return true;
+ }
+ }
+ return false;
+ }
+
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WSDLCreator.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WebServiceRegistry.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WebServiceRegistry.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WebServiceRegistry.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,47 @@
+package bpel.editor.gridcc.controller
+{
+ public class WebServiceRegistry
+ {
+ /**
+ * The Singleton instance of WebServiceRegistry
+ */
+ protected static var instance:WebServiceRegistry;
+
+ [Bindable]
+ public var WSRegistry:XML;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of WebServiceRegistry
+ */
+ public function WebServiceRegistry()
+ {
+ if (WebServiceRegistry.instance == null)
+ {
+ WebServiceRegistry.instance = this;
+ }
+ initializeRegistry();
+ }
+
+ /**
+ * Determines if the singleton instance of BPELLoader
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of BPELLoader
+ */
+ public static function getInstance():WebServiceRegistry
+ {
+ if (instance == null)
+ {
+ instance = new WebServiceRegistry();
+ }
+ return instance;
+ }
+
+ private function initializeRegistry():void {
+ WSRegistry = new XML("<node label='Web Service Registry'/>");
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WebServiceRegistry.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowArrayParser.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowArrayParser.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowArrayParser.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,750 @@
+package bpel.editor.gridcc.controller
+
+{ import bpel.editor.gridcc.data.*;
+ import bpel.editor.gridcc.view.*;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+
+ import flash.events.TimerEvent;
+ import flash.utils.Timer;
+
+ import mx.controls.Button;
+ import mx.containers.Canvas;
+
+ public class WorkflowArrayParser {
+
+ /**
+ * The Singleton instance of WorkflowArrayParser
+ */
+ protected static var instance:WorkflowArrayParser;
+ //private var rootParent:Canvas;
+ //private var rootParent:Canvas;
+
+ private var processContainer:Process;
+
+ //private var minuteTimer:Timer;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of WorkflowArrayParser
+ */
+ public function WorkflowArrayParser()
+ {
+ if (WorkflowArrayParser.instance == null)
+ {
+ WorkflowArrayParser.instance = this;
+
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of WorkflowArrayParser
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of WorkflowParser
+ */
+ public static function getInstance():WorkflowArrayParser
+ {
+ if (instance == null)
+ {
+ instance = new WorkflowArrayParser();
+ }
+ return instance;
+ }
+
+ public function parseWorkflowArray():CompositeActivity {
+ var processDO:ProcessDO = ProcessDO.getInstance();
+ createProcessVisualObject();
+ return processContainer;
+ }
+
+ private function createProcessVisualObject():void{
+ var processDO:ProcessDO = ProcessDO.getInstance();
+ var processName:String = processDO.getName();
+ //trace("WFAP.processName: " + processName);
+ processContainer = new Process(null, processName, "process", processDO);
+ parseSubActivities(processContainer);
+ }
+
+ // This operation is called recursively
+ // When ever Process, PartnerLinks, Variables, Sequence or Assign
+ // will be found it will be called.
+ public function parseSubActivities(parent:CompositeActivity):void{
+ //trace(parent.name);
+ var verticalGap:Number = VisualCoordinateConstant.verticalGapBetweenActivities;
+ var tempComponentYPosition:Number = verticalGap;
+ //var tempActivityType:String;
+ var tempSubActivitiesArray:Array;
+
+ if(parent is Process){
+ tempSubActivitiesArray = Process(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is PartnerLinks){
+ tempSubActivitiesArray = PartnerLinks(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is Variables) {
+ tempSubActivitiesArray = Variables(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is Sequence){
+ tempSubActivitiesArray = Sequence(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is Assign){
+ tempSubActivitiesArray = Assign(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is While){
+ tempSubActivitiesArray = While(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is Scope){
+ tempSubActivitiesArray = Scope(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is Switch){
+ tempSubActivitiesArray = Switch(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is Case){
+ tempSubActivitiesArray = Case(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is Otherwise){
+ tempSubActivitiesArray = Otherwise(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is FaultHandlers){
+ tempSubActivitiesArray = FaultHandlers(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is Catch){
+ tempSubActivitiesArray = Catch(parent).dataObject.subActivitiesArray;
+ }
+ else if (parent is CatchAll){
+ tempSubActivitiesArray = CatchAll(parent).dataObject.subActivitiesArray;
+ }
+
+
+ // This is only to avoid if containerDO is empty
+ // without any sub activity
+ if(tempSubActivitiesArray){
+ //trace("tempSubActivitiesArray in parseSubActivities");
+ for(var i:int = 0; i < tempSubActivitiesArray.length; i++){
+ var tempContainer:CompositeActivity = null;
+ //trace(parent + " $$$ " + tempContainer);
+ var tempButton:Button;
+
+ switch(tempSubActivitiesArray[i][0]){
+
+ case WorkflowActivities.PARTNERLINKS:
+ //trace(indention + tempSubActivitiesArray[i][0]);
+ var partnerLinksDO:PartnerLinksDO = PartnerLinksDO (tempSubActivitiesArray[i][1]);
+
+ tempContainer = new PartnerLinks(parent, partnerLinksDO.getName(), "partnerLinks", partnerLinksDO);
+
+ break;
+
+ case WorkflowActivities.VARIABLES:
+ //trace(indention + array[i][0]);
+ var variablesDO:VariablesDO = VariablesDO (tempSubActivitiesArray[i][1]);
+
+ tempContainer = new Variables(parent, variablesDO.getName(), "variables", variablesDO);
+
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ //trace(indention + array[i][0]);
+ var sequenceDO:SequenceDO = SequenceDO (tempSubActivitiesArray[i][1]);
+ //sequenceDO.printArray();
+ //trace(sequenceDO.attributesArray.length)
+ tempContainer = new Sequence(parent, sequenceDO.getName(), "sequence", sequenceDO);
+ /*
+ if(sequenceDO.subActivitiesArray){
+ //parseSubActivities(sequenceDO.subActivitiesArray);
+ }
+ */
+ break;
+
+ case WorkflowActivities.WHILE:
+ var whileDO:WhileDO = WhileDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new While(parent, whileDO.getName(), "while", whileDO);
+ break;
+
+ case WorkflowActivities.SCOPE:
+ var scopeDO:ScopeDO = ScopeDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new Scope(parent, scopeDO.getName(), "scope", scopeDO);
+ break;
+
+ case WorkflowActivities.SWITCH:
+ var switchDO:SwitchDO = SwitchDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new Switch(parent, switchDO.getName(), "switch", switchDO);
+ break;
+
+ case WorkflowActivities.CASE:
+ var caseDO:CaseDO = CaseDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new Case(parent, caseDO.getName(), "case", caseDO);
+ break;
+
+ case WorkflowActivities.OTHERWISE:
+ var otherwiseDO:OtherwiseDO = OtherwiseDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new Otherwise(parent, otherwiseDO.getName(), "otherwise", otherwiseDO);
+ break;
+
+ case WorkflowActivities.FAULTHANDLERS:
+ var faultHandlersDO:FaultHandlersDO = FaultHandlersDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new FaultHandlers(parent, faultHandlersDO.getName(), "faultHandlers", faultHandlersDO);
+ break;
+
+ case WorkflowActivities.CATCH:
+ var catchDO:CatchDO = CatchDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new Catch(parent, catchDO.getName(), "catch", catchDO);
+ break;
+
+ case WorkflowActivities.CATCHALL:
+ var catchAllDO:CatchAllDO = CatchAllDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new CatchAll(parent, catchAllDO.getName(), "catchAll", catchAllDO);
+ break;
+
+ case WorkflowActivities.PARTNERLINK:
+ //trace(indention + array[i][0]);
+ var partnerLinkDO:PartnerLinkDO = PartnerLinkDO (tempSubActivitiesArray[i][1]);
+
+ var tempPartnerLink:PartnerLink = new PartnerLink(parent, partnerLinkDO, tempComponentYPosition);
+ parent.addNewActivity(tempPartnerLink);
+
+ // set Y position for next component
+ // 40 is relevant to button size
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement;
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+
+ break;
+
+ case WorkflowActivities.VARIABLE:
+ //trace(indention + array[i][0]);
+ var variableDO:VariableDO = VariableDO (tempSubActivitiesArray[i][1]);
+ var tempVariable:Variable = new Variable(parent, variableDO, tempComponentYPosition);
+ parent.addNewActivity(tempVariable);
+
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement;
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+ break;
+
+ case WorkflowActivities.RECEIVE:
+ //trace(" " + tempSubActivitiesArray[i][0]);
+ var receiveDO:ReceiveDO = ReceiveDO (tempSubActivitiesArray[i][1]);
+
+ var tempReceive:Receive = new Receive(parent,receiveDO,tempComponentYPosition);
+ parent.addNewActivity(tempReceive);
+
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+ break;
+
+ case WorkflowActivities.REPLY:
+ //trace(indention + array[i][0]);
+ var replyDO:ReplyDO = ReplyDO (tempSubActivitiesArray[i][1]);
+
+ var tempReply:Reply = new Reply (parent,replyDO,tempComponentYPosition);
+
+ parent.addNewActivity(tempReply);
+
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+ break;
+
+ case WorkflowActivities.WAIT:
+ //trace(indention + array[i][0]);
+ var waitDO:WaitDO = WaitDO (tempSubActivitiesArray[i][1]);
+
+ var tempWait:Wait = new Wait (parent,waitDO,tempComponentYPosition);
+
+ parent.addNewActivity(tempWait);
+
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+ break;
+
+ case WorkflowActivities.INVOKE:
+ //trace(indention + array[i][0]);
+ var invokeDO:InvokeDO = InvokeDO (tempSubActivitiesArray[i][1]);
+
+ var tempInvoke:Invoke = new Invoke (parent,invokeDO,tempComponentYPosition);
+
+ parent.addNewActivity(tempInvoke);
+
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+ break;
+
+ case WorkflowActivities.EMPTY:
+ //trace(indention + array[i][0]);
+ var emptyDO:EmptyDO = EmptyDO (tempSubActivitiesArray[i][1]);
+
+ var tempEmpty:Empty = new Empty (parent,emptyDO,tempComponentYPosition);
+
+ parent.addNewActivity(tempEmpty);
+
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+ break;
+
+ case WorkflowActivities.TERMINATE:
+ //trace(indention + array[i][0]);
+ var terminateDO:TerminateDO = TerminateDO (tempSubActivitiesArray[i][1]);
+
+ var tempTerminate:Terminate = new Terminate (parent, terminateDO, tempComponentYPosition);
+
+ parent.addNewActivity(tempTerminate);
+
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ var assignDO:AssignDO = AssignDO (tempSubActivitiesArray[i][1]);
+ tempContainer = new Assign(parent, assignDO.getName(), "assign", assignDO);
+ break;
+
+ case WorkflowActivities.COPY:
+ //trace(indention + array[i][0]);
+ var copyDO:CopyDO = CopyDO (tempSubActivitiesArray[i][1]);
+
+ var tempCopy:Copy = new Copy (parent,copyDO,tempComponentYPosition);
+
+ parent.addNewActivity(tempCopy);
+
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + VisualCoordinateConstant.nextActivityYPositionIncrement
+
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+ break;
+
+ default:
+ //trace(indention + tempSubActivitiesArray[i][0]);
+ }
+ if(tempContainer){
+ //minuteTimer = new Timer(200, 1);
+ // Starting width for any activity
+ // endups for the innermost composite activity
+ tempContainer.resetWidth(200);
+
+ // Temp Container's Y position
+ tempContainer.y = tempComponentYPosition ;
+
+ parseSubActivities(tempContainer);
+
+ // set Y position for next component
+ tempComponentYPosition = tempContainer.height + tempComponentYPosition + verticalGap;
+
+ // set the height of the parent activity
+ parent.resetHeight(tempComponentYPosition + VisualCoordinateConstant.parentHightResize);
+
+ // Increment the Width of the Parent if required
+ if(parent.width <= tempContainer.width) {
+ parent.resetWidth(tempContainer.width + 40);
+ }
+
+ // set the X poisition of current activity in the middle
+ tempContainer.x = ((parent.width - tempContainer.width)/2) - 6;
+ //trace(parent.name + " ++ " + tempContainer.name);
+ parent.addNewActivity(tempContainer);
+
+ //tempContainer = parent;
+ }
+ }
+ }
+ }
+
+ // Returns NULL for atomic activities or composite activity
+ public function computeAndAddChild(parentType:String, parentName:String, childType:String, dataObject:Object):CompositeActivity {
+ if(BPELLoader.getInstance().addNewActivity(parentType,parentName,childType,dataObject)){
+ var tempParentCompositeActivity:CompositeActivity;
+ switch(childType){
+
+ case WorkflowActivities.PARTNERLINK:
+ var tempPartnerLink:PartnerLink = new PartnerLink(getPartnerLinksView(), PartnerLinkDO(dataObject), (getPartnerLinksView().height - 40));
+
+ getPartnerLinksView().addNewActivity(tempPartnerLink);
+ getPartnerLinksView().height = getPartnerLinksView().height + tempPartnerLink.height + 30;
+ getPartnerLinksView().activityContainer.height = getPartnerLinksView().activityContainer.height + tempPartnerLink.height + 30;
+ getPartnerLinksView().activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(getPartnerLinksView());
+
+ return null;
+ break;
+
+ case WorkflowActivities.VARIABLE:
+ var tempVariable:Variable = new Variable(getVariablesView(), VariableDO(dataObject), (getVariablesView().height - 40));
+
+ getVariablesView().addNewActivity(tempVariable);
+ getVariablesView().height = getVariablesView().height + tempVariable.height + 30;
+ getVariablesView().activityContainer.height = getVariablesView().activityContainer.height + tempVariable.height + 30;
+ getVariablesView().activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(getVariablesView());
+
+ return null;
+ break;
+
+ case WorkflowActivities.INVOKE:
+ //trace("invoke");
+ var tempInvoke:Invoke;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempInvoke = new Invoke(processContainer,InvokeDO(dataObject), processContainer.height - 40);
+ processContainer.addNewActivity(tempInvoke);
+ processContainer.height = processContainer.height + tempInvoke.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempInvoke.height + 20;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity= findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempInvoke = new Invoke(tempParentCompositeActivity,InvokeDO(dataObject), tempParentCompositeActivity.height - 40);
+ tempParentCompositeActivity.addNewActivity(tempInvoke);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempInvoke.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempInvoke.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+
+ return null;
+ break;
+
+ case WorkflowActivities.RECEIVE:
+ //trace("receive");
+ var tempReceive:Receive;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempReceive = new Receive(processContainer,ReceiveDO(dataObject), processContainer.height - 40);
+ processContainer.addNewActivity(tempReceive);
+ processContainer.height = processContainer.height + tempReceive.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempReceive.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempReceive = new Receive(tempParentCompositeActivity,ReceiveDO(dataObject), tempParentCompositeActivity.height - 40);
+ tempParentCompositeActivity.addNewActivity(tempReceive);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempReceive.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempReceive.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+
+ return null;
+ break;
+
+ case WorkflowActivities.REPLY:
+ //trace("reply");
+ var tempReply:Reply;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempReply = new Reply(processContainer,ReplyDO(dataObject), processContainer.height - 40);
+ processContainer.addNewActivity(tempReply);
+ processContainer.height = processContainer.height + tempReply.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempReply.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempReply = new Reply(tempParentCompositeActivity,ReplyDO(dataObject), tempParentCompositeActivity.height - 40);
+ tempParentCompositeActivity.addNewActivity(tempReply);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempReply.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempReply.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+
+ return null;
+ break;
+
+ case WorkflowActivities.WAIT:
+ //trace("wait");
+ var tempWait:Wait;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempWait = new Wait(processContainer,WaitDO(dataObject), processContainer.height - 40);
+ processContainer.addNewActivity(tempWait);
+ processContainer.height = processContainer.height + tempWait.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempWait.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempWait = new Wait(tempParentCompositeActivity, WaitDO(dataObject), tempParentCompositeActivity.height - 40);
+ tempParentCompositeActivity.addNewActivity(tempWait);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempWait.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempWait.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+
+ return null;
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ var tempSequence:Sequence;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempSequence = new Sequence(processContainer, SequenceDO(dataObject).getName(),childType, SequenceDO(dataObject));
+ tempSequence.y = processContainer.height - 40;
+ tempSequence.x = (processContainer.width - tempSequence.width)/2;
+ processContainer.addNewActivity(tempSequence);
+ processContainer.height = processContainer.height + tempSequence.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempSequence.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempSequence = new Sequence(tempParentCompositeActivity,SequenceDO(dataObject).getName(),childType, SequenceDO(dataObject));
+ tempSequence.y = tempParentCompositeActivity.height - 40;
+ if(tempSequence.width >= tempParentCompositeActivity.width){
+ tempSequence.resetWidth(tempParentCompositeActivity.width -50);
+ }
+ tempSequence.x = (tempParentCompositeActivity.width - tempSequence.width)/2;
+ tempParentCompositeActivity.addNewActivity(tempSequence);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempSequence.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempSequence.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+ return tempSequence;
+ break;
+
+ case WorkflowActivities.WHILE:
+ var tempWhile:While;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempWhile = new While(processContainer, WhileDO(dataObject).getName(),childType, WhileDO(dataObject));
+ tempWhile.y = processContainer.height - 40;
+ tempWhile.x = (processContainer.width - tempWhile.width)/2;
+ processContainer.addNewActivity(tempWhile);
+ processContainer.height = processContainer.height + tempWhile.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempWhile.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempWhile = new While(tempParentCompositeActivity,WhileDO(dataObject).getName(),childType, WhileDO(dataObject));
+ tempWhile.y = tempParentCompositeActivity.height - 40;
+ if(tempWhile.width >= tempParentCompositeActivity.width){
+ tempWhile.resetWidth(tempParentCompositeActivity.width -50);
+ }
+ tempWhile.x = (tempParentCompositeActivity.width - tempWhile.width)/2;
+ tempParentCompositeActivity.addNewActivity(tempWhile);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempWhile.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempWhile.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+ return tempWhile;
+ break;
+
+
+ case WorkflowActivities.SCOPE:
+ var tempScope:Scope;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempScope = new Scope(processContainer, ScopeDO(dataObject).getName(),childType, ScopeDO(dataObject));
+ tempScope.y = processContainer.height - 40;
+ tempScope.x = (processContainer.width - tempScope.width)/2;
+ processContainer.addNewActivity(tempScope);
+ processContainer.height = processContainer.height + tempScope.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempScope.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempScope = new Scope(tempParentCompositeActivity,ScopeDO(dataObject).getName(),childType, ScopeDO(dataObject));
+ tempScope.y = tempParentCompositeActivity.height - 40;
+ if(tempScope.width >= tempParentCompositeActivity.width){
+ tempScope.resetWidth(tempParentCompositeActivity.width -50);
+ }
+ tempScope.x = (tempParentCompositeActivity.width - tempScope.width)/2;
+ tempParentCompositeActivity.addNewActivity(tempScope);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempScope.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempScope.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+ return tempScope;
+ break;
+
+ case WorkflowActivities.FAULTHANDLERS:
+ var tempFaultHandlers:FaultHandlers;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempFaultHandlers = new FaultHandlers(processContainer, FaultHandlersDO(dataObject).getName(),childType, FaultHandlersDO(dataObject));
+ tempFaultHandlers.y = processContainer.height - 40;
+ tempFaultHandlers.x = (processContainer.width - tempFaultHandlers.width)/2;
+ processContainer.addNewActivity(tempFaultHandlers);
+ processContainer.height = processContainer.height + tempFaultHandlers.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempFaultHandlers.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempFaultHandlers = new FaultHandlers(tempParentCompositeActivity, FaultHandlersDO(dataObject).getName(),childType, FaultHandlersDO(dataObject));
+ tempFaultHandlers.y = tempParentCompositeActivity.height - 40;
+ if(tempFaultHandlers.width >= tempParentCompositeActivity.width){
+ tempFaultHandlers.resetWidth(tempParentCompositeActivity.width -50);
+ }
+ tempFaultHandlers.x = (tempParentCompositeActivity.width - tempFaultHandlers.width)/2;
+ tempParentCompositeActivity.addNewActivity(tempFaultHandlers);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempFaultHandlers.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempFaultHandlers.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+ return tempFaultHandlers;
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ //trace("assign");
+ var tempAssign:Assign;
+ if(parentType == WorkflowActivities.PROCESS){
+ tempAssign = new Assign(processContainer, AssignDO(dataObject).getName(),childType, AssignDO(dataObject));
+ tempAssign.y = processContainer.height - 40;
+ tempAssign.x = (processContainer.width - tempAssign.width)/2;
+ processContainer.addNewActivity(tempAssign);
+ processContainer.height = processContainer.height + tempAssign.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempAssign.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else {
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempAssign = new Assign(tempParentCompositeActivity,AssignDO(dataObject).getName(),childType, AssignDO(dataObject));
+ tempAssign.y = tempParentCompositeActivity.height - 40;
+ if(tempAssign.width >= tempParentCompositeActivity.width){
+ tempAssign.resetWidth(tempParentCompositeActivity.width -50);
+ }
+ tempAssign.x = (tempParentCompositeActivity.width - tempAssign.width)/2;
+ tempParentCompositeActivity.addNewActivity(tempAssign);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempAssign.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempAssign.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+ return tempAssign;
+ break;
+
+ case WorkflowActivities.COPY:
+ //trace("copy");
+ var tempCopy:Copy;
+ /*
+ if(parentType == WorkflowActivities.PROCESS){
+ tempReceive = new Receive(processContainer,ReceiveDO(dataObject), processContainer.height - 40);
+ processContainer.addNewActivity(tempReceive);
+ processContainer.height = processContainer.height + tempReceive.height + 30;
+ processContainer.activityContainer.height = processContainer.activityContainer.height + tempReceive.height + 30;
+ processContainer.activityContainer.setStyle("borderStyle", "solid");
+ }else */{
+ tempParentCompositeActivity = findActivity(processContainer, parentType, parentName);
+ //trace(tempParentCompositeActivity.name + " +++++++++ " + tempParentCompositeActivity.activityType);
+ tempCopy = new Copy(tempParentCompositeActivity, CopyDO(dataObject), tempParentCompositeActivity.height - 40);
+ tempParentCompositeActivity.addNewActivity(tempCopy);
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + tempCopy.height + 30;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + tempCopy.height + 30;
+ tempParentCompositeActivity.activityContainer.setStyle("borderStyle", "solid");
+ redrawActivities(tempParentCompositeActivity);
+ }
+
+ return null;
+ break;
+
+ default:
+ trace ("Not yet implemented");
+
+ }
+ }
+ return null;
+ //redrawActivities();
+ }
+
+ private function getVariablesView():Variables {
+ var tempArray:Array = processContainer.subActivitiesArray;
+ var tempVariablesView:Variables;
+
+ //trace("tempArray[1]: " + tempArray[1]);
+ if(tempArray[1]is Variables){
+ //trace ("I have found Variables")
+ tempVariablesView = Variables(tempArray[1]);
+ }
+ return tempVariablesView;
+ }
+
+ private function getPartnerLinksView():PartnerLinks {
+ var tempArray:Array = processContainer.subActivitiesArray;
+ var tempPartnerLinksView:PartnerLinks;
+
+ //trace("tempArray[1]: " + tempArray[0]);
+ if(tempArray[0]is PartnerLinks){
+ //trace ("I have found PartnerLinks")
+ tempPartnerLinksView = PartnerLinks(tempArray[0]);
+ }
+ return tempPartnerLinksView;
+ }
+
+ private function redrawActivities(currentActivity:CompositeActivity):void {
+
+ var parentActivity:CompositeActivity = CompositeActivity(currentActivity.parent.parent);
+
+ var tempParentCanvas:Canvas = parentActivity.activityContainer;
+
+ var newYCordinate:int = 10;
+ for (var index:int=0; index < tempParentCanvas.numChildren; index++){
+ tempParentCanvas.getChildAt(index).y = newYCordinate;
+
+ // Incrementing for the Next One
+ newYCordinate = newYCordinate + tempParentCanvas.getChildAt(index).height + 20;
+ }
+ parentActivity.activityContainer.height = newYCordinate + 10;
+ parentActivity.activityContainer.setStyle("borderStyle", "solid");
+ parentActivity.height = newYCordinate + 50;
+ if(parentActivity.activityType != WorkflowActivities.PROCESS){
+ redrawActivities(parentActivity);
+ }
+ }
+
+ private function findActivity(parentActivity:CompositeActivity, activityType:String, activityName:String):CompositeActivity {
+
+ var tempCompositeActivityCanvas:Canvas = parentActivity.activityContainer;
+ var tempChildCompositeActivity:CompositeActivity;
+ for (var index:int=0; index < tempCompositeActivityCanvas.numChildren; index++){
+ //trace(tempCompositeActivityCanvas.getChildAt(index).name);
+ if(tempCompositeActivityCanvas.getChildAt(index) is CompositeActivity){
+ tempChildCompositeActivity = CompositeActivity(tempCompositeActivityCanvas.getChildAt(index));
+ if((tempChildCompositeActivity.activityType == activityType) && (tempChildCompositeActivity.name == activityName)){
+ return tempChildCompositeActivity;
+ }
+ else {
+ tempChildCompositeActivity = findActivity(tempChildCompositeActivity, activityType, activityName);
+ if(tempChildCompositeActivity){
+ return tempChildCompositeActivity;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /// Never used this operation ... Cool Logic went to Drain ....!
+ private function resizeParentActivities(currentCompositeActivity:CompositeActivity, incrementY:int):void {
+ var tempParentCompositeActivity:CompositeActivity;
+ if(currentCompositeActivity.parent.parent is CompositeActivity){
+ tempParentCompositeActivity = CompositeActivity (currentCompositeActivity.parent.parent);
+ }
+ if(tempParentCompositeActivity){
+ if(tempParentCompositeActivity.activityType == WorkflowActivities.PROCESS){
+ // do Nothing Assuming that parent size is changed in computeAndAndChild
+ }
+ else {
+ tempParentCompositeActivity.height = tempParentCompositeActivity.height + incrementY;
+ tempParentCompositeActivity.activityContainer.height = tempParentCompositeActivity.activityContainer.height + incrementY;
+ // Here should call modified Resize.
+ resizeParentActivities(tempParentCompositeActivity, incrementY);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowArrayParser.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowManager.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowManager.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowManager.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,861 @@
+package bpel.editor.gridcc.controller
+{
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.*;
+ import bpel.editor.gridcc.utility.DragNDropLogic;
+ import bpel.editor.gridcc.utility.QueryString;
+ import bpel.editor.gridcc.view.*;
+
+ import flash.display.DisplayObject;
+ import flash.events.Event;
+ import flash.events.IOErrorEvent;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+
+ import flash.utils.Timer;
+
+ import flash.net.URLLoader;
+ import flash.net.URLRequest;
+ import flash.net.URLRequestMethod;
+ import flash.net.URLVariables;
+
+ import mx.containers.Canvas;
+ import mx.containers.Panel;
+ import mx.controls.Alert;
+ import mx.controls.Button;
+ import mx.core.DragSource;
+ import mx.core.IFlexDisplayObject;
+ import mx.core.UIComponent;
+ import mx.events.DragEvent;
+ import mx.managers.DragManager;
+ import mx.managers.PopUpManager;
+ import mx.rpc.events.AbstractEvent;
+
+ public class WorkflowManager
+ {
+ protected static var instance:WorkflowManager;
+
+ private static var bpelActivityPanel:ActivityPanel = null;
+
+ private static var bpelEditor:BPELEditor = null;
+
+ private static var processCreator:ProcessCreator = null;
+
+ private static var workflowParser:WorkflowParser = null;
+
+ private static var workflowArrayParser:WorkflowArrayParser = null;
+
+ private static var bpelLoader:BPELLoader = null;
+
+ private var retrieveWorkflow:RetrieveWorkflow = null;
+
+ private var currentTarget:UIComponent;
+
+ private var tempParentType:String;
+
+ private var tempURLRequest:URLRequest;
+
+ private var minuteTimer:Timer;
+
+
+ private var uuid:String = null;
+
+ private var dirName:String = null;
+ private var fileName:String = null;
+ private var servletName:String = null;
+ private var workflowID:String = null;
+ private var servletURL:String = "http://localhost:8888/org.drools.guvnor.Guvnor/workflowmanager"
+ //"http://localhost:8082/VCRServlet/workflowmanagerservlet";
+ private var WSDLServletURL:String = "http://localhost:8888/org.drools.guvnor.Guvnor/wsdlparser"
+ //"http://localhost:8082/VCRServlet/wsdlparserservlet";
+
+ public function WorkflowManager(){
+
+ if (WorkflowManager.instance == null) {
+ WorkflowManager.instance = this;
+
+ processCreator = ProcessCreator.getInstance();
+ workflowParser = WorkflowParser.getInstance();
+ workflowArrayParser = WorkflowArrayParser.getInstance();
+ bpelLoader = BPELLoader.getInstance();
+ setUploadDownloadVariables();
+ }
+ }
+
+ public static function getInstance():WorkflowManager
+ {
+ if (instance == null) {
+ instance = new WorkflowManager();
+ }
+ return instance;
+ }
+
+ private function setUploadDownloadVariables():void{
+ //trace ("setUploadDownloadVariables ")
+ var queryString:QueryString = new QueryString();
+
+ servletName = queryString.parameters.servletName;
+ if(!servletName || servletName == "undefined"){
+ servletURL = null;
+
+ // For testing
+ servletURL = "http://localhost:8888/org.drools.guvnor.Guvnor/workflowmanager";
+ } else {
+ var URLString:String = queryString.url;
+ URLString = URLString.slice(0,URLString.indexOf("bpeleditor"));
+ servletURL = URLString + servletName;
+ WSDLServletURL = URLString + "wsdlparser"
+ }
+ //Alert.show("ServletURL: "+ servletURL + " WSDLServletURL: " + WSDLServletURL, 'Message');
+ dirName = queryString.parameters.dirName;
+
+ // For testing
+ //dirName = "temp\\";
+
+ fileName = queryString.parameters.fileName;
+ uuid = queryString.parameters.uuid;
+ var isNew:String = queryString.parameters.isNew;
+
+ //Alert.show("fileName: " + fileName + " uuid: " +uuid, 'Message');
+
+ // For testing
+ //fileName = "CREAMPing";
+ //fileName = "Full_FeedbackCorrection"
+ //fileName = "Full_OneButtonMachine";
+ //fileName = "Full_FeedbackCorrection_withWMProxy";
+ //fileName = "Full_FeedbackCorrection_withCREAM";
+ //fileName = "Ping_KRB";
+
+ workflowID = queryString.parameters.wfId;
+
+ // For testing
+ //workflowID = "workflowID";
+
+ // Alert.show("is new : " + isNew,'Messsage');
+
+ // if(!fileName || fileName == "undefined" || fileName == "WorkflowNotSelected"){
+ if(isNew != null && isNew == "true"){
+ // Alert.show("No workflow is selected", 'Message');
+ } else {
+
+ retrieveWorkflow = RetrieveWorkflow.createInstance(uuid, fileName, servletURL, dirName);
+
+ retrieveWorkflow.loadWorkflowFromServer("bpel");
+ if(workflowID){
+ Alert.show("retrieveWorkflow.retrieveMonitoringWorkflow(workflowID)", 'Message');
+ retrieveWorkflow.retrieveMonitoringWorkflow(workflowID);
+ }
+ }
+ if(!servletName){
+ Alert.show("Servlet managing workflow is not available", 'Message');
+ //servletName = "workflowmanagerservlet";
+ }
+ if(!dirName){
+ Alert.show("File System managing workflow is not available", 'Message');
+ //dirName = "temp/";
+ }
+ }
+
+ public function setBPELEditor(value:BPELEditor):void {
+ bpelEditor = value;
+ }
+
+ public function getBPELEditor():BPELEditor{
+ return bpelEditor;
+ }
+
+ public function setbpelActivityPanel(value:ActivityPanel):void {
+ bpelActivityPanel = value;
+ }
+
+ public function dragStart(event:MouseEvent, value:String):void {
+ //trace("WorkflowManager.dragStart ");
+
+ var dragInitiator:Button = event.currentTarget as Button;
+ //var dragInitiator:Button = new Button();
+ if(dragInitiator.enabled){
+
+ // Create a DragSource object.
+ var dragSource:DragSource = new DragSource();
+
+ // Add the data to the object.
+ dragSource.addData(value, "activity");
+
+ var dragProxy:Button = new Button();
+ dragProxy.width = 80;
+ dragProxy.height = 20;
+ dragProxy.label = value;
+
+ // Call the DragManager doDrag() method to start the drag.
+ DragManager.doDrag(dragInitiator, dragSource, event, dragProxy);
+ }
+ }
+
+ public function workflowUploadDownload(event:MouseEvent, value:String):void {
+ /*
+ var tempDirFileName:DirFileName = new DirFileName();
+ tempDirFileName.loadOrSave = value;
+ tempDirFileName.myDir = dirName;
+ tempDirFileName.myFile = fileName;
+ tempDirFileName.myServlet = servletURL;
+ PopUpManager.addPopUp(tempDirFileName, bpelEditor, true); */
+ fileName = processCreator.BPELProcess. at name;
+ SaveWorkflow.getInstance(uuid, fileName, servletURL, dirName).saveWorkflowOnServer("wsdl");
+ //this.saveWorkflowOnServer("wsdl");
+ }
+
+ public function dragDropped(parentType:String, childType:String, event:DragEvent):void{
+ //trace("WorkflwoManager.dragDropped: " + parentType + " " + childType);
+
+ currentTarget = UIComponent(event.currentTarget);
+ //trace(currentTarget)
+ if(childType == WorkflowActivities.PROCESS){
+ PopUpManager.createPopUp(bpelEditor, MyLoginForm, true);
+ }
+
+ if(DragNDropLogic.dragNdrop(parentType, childType)){
+ switch(childType) {
+
+ case WorkflowActivities.SEQUENCE:
+ //trace("sequence");
+ var sequencePopup:SequencePopup = new SequencePopup();
+ var sequenceDO:SequenceDO = new SequenceDO();
+
+ sequencePopup.setSequenceDO(sequenceDO);
+
+ PopUpManager.addPopUp(sequencePopup, bpelEditor, true);
+ break;
+
+ case WorkflowActivities.INVOKE:
+ //trace("invoke");
+
+ var invokePopup:InvokePopup = new InvokePopup();
+ var invokeDO:InvokeDO = new InvokeDO();
+
+ invokePopup.setInvokeDO(invokeDO);
+
+ PopUpManager.addPopUp(invokePopup, bpelEditor, true);
+ break;
+
+ case WorkflowActivities.RECEIVE:
+ //trace("receive");
+
+ var receivePopup:ReceivePopup = new ReceivePopup();
+ var receiveDO:ReceiveDO = new ReceiveDO();
+
+ receivePopup.setReceiveDO(receiveDO);
+
+ PopUpManager.addPopUp(receivePopup, bpelEditor, true);
+ break;
+
+ case WorkflowActivities.REPLY:
+ //trace("reply");
+ var replyPopup:ReplyPopup = new ReplyPopup();
+ var replyDO:ReplyDO = new ReplyDO();
+
+ replyPopup.setReplyDO(replyDO);
+
+ PopUpManager.addPopUp(replyPopup, bpelEditor, true);
+ break;
+
+ case WorkflowActivities.PARTNERLINK:
+ //trace("partnerLink");
+ var partnerLinkPopup:PartnerLinkPopup = new PartnerLinkPopup();
+ var partnerLinkDO:PartnerLinkDO = new PartnerLinkDO();
+
+ partnerLinkPopup.setPartnerLinkDO(partnerLinkDO);
+
+ PopUpManager.addPopUp(partnerLinkPopup, bpelEditor, true);
+ break;
+
+ case WorkflowActivities.VARIABLE:
+ //trace("variable");
+
+ // Bring PopUP for Variable
+ var variablePopup:VariablePopup = new VariablePopup();
+ var variableDO:VariableDO = new VariableDO();
+
+ variablePopup.setVariableDO(variableDO);
+ PopUpManager.addPopUp(variablePopup, bpelEditor, true);
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ //trace("assign");
+
+ // Bring PopUP for Assign
+ var assignPopup:AssignPopup = new AssignPopup();
+ var assignDO:AssignDO = new AssignDO();
+ var assignToDO:ToDO = new ToDO();
+ var assignFromDO:FromDO = new FromDO();
+
+ assignPopup.setAssignDO(assignDO);
+ assignPopup.setToDO(assignToDO);
+ assignPopup.setFromDO(assignFromDO);
+ PopUpManager.addPopUp(assignPopup, bpelEditor, true);
+ break;
+
+ case WorkflowActivities.COPY:
+ /*
+ trace("copy");
+
+ // Bring PopUP for Variable
+ var variablePopup:VariablePopup = new VariablePopup();
+ var variableDO:VariableDO = new VariableDO();
+
+ //variableDO.updateAttributesArray("name","Asif");
+ //variableDO.updateAttributesArray("type","");
+
+ variablePopup.setVariableDO(variableDO);
+ PopUpManager.addPopUp(variablePopup, bpelEditor, true); */
+ break;
+
+ case WorkflowActivities.WAIT:
+ //trace("wait");
+
+ // Bring PopUP for Variable
+ var waitPopup:WaitPopup = new WaitPopup();
+ var waitDO:WaitDO = new WaitDO();
+
+ waitPopup.setWaitDO(waitDO);
+ PopUpManager.addPopUp(waitPopup, bpelEditor, true); /* */
+ break;
+
+ case WorkflowActivities.WHILE:
+ //trace("while");
+
+ // Bring PopUP for While
+ var whilePopup:WhilePopup = new WhilePopup();
+ var whileDO:WhileDO = new WhileDO();
+
+ whilePopup.setWhileDO(whileDO);
+ PopUpManager.addPopUp(whilePopup, bpelEditor, true);
+ break;
+
+ default:
+ trace("Not Allowed Activity Structured Activity");
+ }
+ }
+ }
+
+ public function popUPOKHandler(popupWindow:IFlexDisplayObject, type:String ):void{
+ var process:XML;
+ var tempCompositeActivity:CompositeActivity;
+
+ //var bpelLoader:BPELLoader = BPELLoader.getInstance();
+ if(currentTarget.parent is CompositeActivity){
+ tempCompositeActivity = CompositeActivity(currentTarget.parent);
+ //trace("***** " + tempCompositeActivity.activityType + " " + tempCompositeActivity.name);
+ }
+
+ switch(type){
+
+ case WorkflowActivities.PROCESS:
+ var loginForm:MyLoginForm = MyLoginForm(popupWindow);
+
+ process = processCreator.creatProcess(loginForm.workflowName.text,loginForm.targetNamespace.text,loginForm.workflowType.text );
+ fileName = processCreator.BPELProcess. at name;
+ //trace("popUPOKHandler fileName: " + fileName);
+ bpelActivityPanel.isEditable = true;
+ //trace(process);
+
+ // This is for the first time when workflow is created or any workflow is loaded
+ bpelLoader.parseWorkflow(processCreator.BPELProcess);
+
+ /* Using Old API workflowParser works on XML
+ */
+ //var tempParent:CompositeActivity = workflowParser.parseWorkflow(process, currentTarget.width);
+ //trace(tempParent.width + " " + tempParent.height);
+
+ //printSubActivities(bpelLoader.processDO.subActivitiesArray, " ");
+ // workflowArrayParser works on the Activity Array created by BPEL Loader
+ var tempParent:CompositeActivity = workflowArrayParser.parseWorkflowArray();
+
+ tempParent.x = ((currentTarget.width - tempParent.width)/2);
+ if(tempParent.height < currentTarget.height){
+ tempParent.resetHeight(currentTarget.height);
+ }
+ UIComponent(currentTarget).addChild(tempParent);
+
+ break;
+
+ case WorkflowActivities.VARIABLE:
+ var variablePopup:VariablePopup = VariablePopup(popupWindow);
+ //variablePopup.variableDO.printArray();
+
+ processCreator.createNewActivity(WorkflowActivities.VARIABLES, "",
+ WorkflowActivities.VARIABLE, variablePopup.variableDO.attributesArray);
+
+ if(!variablePopup.modifyable)
+ workflowArrayParser.computeAndAddChild(WorkflowActivities.VARIABLES, "",
+ WorkflowActivities.VARIABLE, variablePopup.variableDO);
+ //trace(processCreator.BPELProcess);
+ break;
+
+ case WorkflowActivities.INVOKE:
+ //trace("invoke");
+
+ var invokePopup:InvokePopup = InvokePopup(popupWindow);
+
+ //invokePopup.invokeDO.printArray();
+ if(tempCompositeActivity)
+ processCreator.createNewActivity(tempCompositeActivity.activityType, tempCompositeActivity.name, WorkflowActivities.INVOKE,invokePopup.invokeDO.attributesArray);
+
+ if(!invokePopup.modifyable)
+ workflowArrayParser.computeAndAddChild(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.INVOKE, invokePopup.invokeDO);
+
+ break;
+
+ case WorkflowActivities.RECEIVE:
+ //trace("receive");
+ var receivePopup:ReceivePopup = ReceivePopup(popupWindow);
+
+ if(tempCompositeActivity)
+ processCreator.createNewActivity(tempCompositeActivity.activityType, tempCompositeActivity.name,
+ WorkflowActivities.RECEIVE, receivePopup.receiveDO.attributesArray);
+
+ if(!receivePopup.modifyable)
+ workflowArrayParser.computeAndAddChild(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.RECEIVE, receivePopup.receiveDO);
+
+ break;
+
+ case WorkflowActivities.REPLY:
+ //trace("reply");
+ var replyPopup:ReplyPopup = ReplyPopup(popupWindow);
+
+ if(tempCompositeActivity)
+ processCreator.createNewActivity(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.REPLY, replyPopup.replyDO.attributesArray);
+
+ if(!replyPopup.modifyable)
+ workflowArrayParser.computeAndAddChild(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.REPLY, replyPopup.replyDO);
+
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ //trace("assign");
+ var assignPopup:AssignPopup = AssignPopup(popupWindow);
+
+ processCreator.createNewActivity(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.ASSIGN, assignPopup.assignDO.attributesArray);
+
+ tempCompositeActivity = (workflowArrayParser.computeAndAddChild(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.ASSIGN, assignPopup.assignDO));
+
+ var tempCopyDO:CopyDO = new CopyDO();
+ tempCopyDO.updateSubActivitiesArray("from", assignPopup.fromDO );
+ tempCopyDO.updateSubActivitiesArray("to", assignPopup.toDO);
+
+ processCreator.createNewCopy(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, tempCopyDO);
+
+ workflowArrayParser.computeAndAddChild(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.COPY, tempCopyDO)
+
+ break;
+
+ case WorkflowActivities.PARTNERLINK:
+ if(!tempCompositeActivity) {
+ // Not a clean logic but working for time Being ....!
+ var tempPartnerLinkDO:PartnerLinkDO;
+ if(popupWindow is PartnerLinkPopup){
+ var partnerLinkPopup:PartnerLinkPopup = PartnerLinkPopup(popupWindow);
+ tempPartnerLinkDO = partnerLinkPopup.partnerLinkDO
+ } else if(popupWindow is PartnerLinkWSDLPopup){
+ var partnerLinkWSDLPopup:PartnerLinkWSDLPopup = PartnerLinkWSDLPopup(popupWindow);
+ tempPartnerLinkDO = partnerLinkWSDLPopup.partnerLinkDO
+ }
+
+ processCreator.createNewActivity(WorkflowActivities.PARTNERLINKS, "",
+ WorkflowActivities.PARTNERLINK,tempPartnerLinkDO.attributesArray);
+
+ //workflowArrayParser.computeAndAddChild(WorkflowActivities.PARTNERLINKS, "",
+ // WorkflowActivities.PARTNERLINK, tempPartnerLinkDO);
+ }
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ var sequencePopup:SequencePopup = SequencePopup(popupWindow);
+
+ processCreator.createNewActivity(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.SEQUENCE,sequencePopup.sequenceDO.attributesArray);
+
+ workflowArrayParser.computeAndAddChild(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.SEQUENCE, sequencePopup.sequenceDO);
+
+ break;
+
+ case WorkflowActivities.WHILE:
+ var whilePopup:WhilePopup = WhilePopup(popupWindow);
+
+ processCreator.createNewActivity(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.WHILE,
+ whilePopup.whileDO.attributesArray);
+
+ workflowArrayParser.computeAndAddChild(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.WHILE, whilePopup.whileDO);
+
+ break;
+
+ case WorkflowActivities.WAIT:
+ var waitPopup:WaitPopup = WaitPopup(popupWindow);
+
+ processCreator.createNewActivity(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.WAIT,
+ waitPopup.waitDO.attributesArray);
+
+ if(!waitPopup.modifyable)
+ workflowArrayParser.computeAndAddChild(tempCompositeActivity.activityType,
+ tempCompositeActivity.name, WorkflowActivities.WAIT, waitPopup.waitDO);
+
+ break;
+ default:
+ trace("Not implemented yet");
+
+ }
+
+ var processDO:ProcessDO = ProcessDO.getInstance();
+ printSubActivities(processDO.subActivitiesArray, " ");
+ }
+
+ public function updateNameForMonitoring(activityType:String,
+ activityOldName:String, activityNewName:String):Boolean{
+ return processCreator.modifyNameForMonitoring(activityType, activityOldName, activityNewName);
+ }
+
+ // Only for testing purposes
+ private function printSubActivities(array:Array, indention:String):void{
+ indention = indention + " ";
+
+ for(var i:int = 0; i < array.length; i++){
+
+ switch(array[i][0]){
+ case WorkflowActivities.PARTNERLINKS:
+ trace(indention + array[i][0]);
+ var partnerLinksDO:PartnerLinksDO = PartnerLinksDO (array[i][1]);
+ printSubActivities(partnerLinksDO.subActivitiesArray, indention);
+ break;
+
+ case WorkflowActivities.VARIABLES:
+ trace(indention + array[i][0]);
+ var variablesDO:VariablesDO = VariablesDO (array[i][1]);
+ printSubActivities(variablesDO.subActivitiesArray, indention);
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ trace(indention + array[i][0]);
+ var sequenceDO:SequenceDO = SequenceDO (array[i][1]);
+ if(sequenceDO.subActivitiesArray){
+ printSubActivities(sequenceDO.subActivitiesArray, indention);
+ }
+ break;
+
+ case WorkflowActivities.WHILE:
+ trace(indention + array[i][0]);
+ var whileDO:WhileDO = WhileDO (array[i][1]);
+ if(whileDO.subActivitiesArray){
+ printSubActivities(whileDO.subActivitiesArray, indention);
+ }
+ break;
+
+ default:
+ trace(indention + array[i][0]);
+ }
+ }
+ }
+
+ public function retrieveBPEL():XML{
+ //processCreator.printNameSpaceArray();
+ return processCreator.BPELProcess;
+ }
+
+ public function retrieveWSDL():XML{
+ //trace(processCreator.BPELWSDL);
+ var wsdlCreator:WSDLCreator = WSDLCreator.getInstance();
+ return wsdlCreator.WorkflowWSDL;
+ }
+
+ public function retrievePDD():XML{
+ //trace(processCreator.retrievePDD);
+ var pddCreator:PDDCreator = PDDCreator.getInstance();
+ if(pddCreator != null)
+ return pddCreator.WorkflowPDD;
+ return null;
+ }
+
+ public function retrieveWSDLCatalog():XML{
+ var wsdlCatalog:WSDLCatalogCreator = WSDLCatalogCreator.getInstance();
+ if(wsdlCatalog != null){
+ return wsdlCatalog.WSDLCatalog;
+ }
+ return null;
+ }
+
+ public function retrieveSubDoc():XML{
+ var subDoc:SubmissionDocumentCreator = SubmissionDocumentCreator.getInstance();
+ if(subDoc != null){
+ return subDoc.SubmissionDocument;
+ }
+ return null;
+ }
+
+ public function retrieveQoSDoc():XML{
+ var qosDoc:QoSCreator = QoSCreator.getInstance();
+ if(qosDoc != null){
+ return qosDoc.QoSDocument;
+ }
+ return null;
+ }
+
+ public function setDirAndFileName(popupWindow:IFlexDisplayObject):void{
+ var dirFileName:DirFileName = DirFileName(popupWindow);
+ dirName = dirFileName.dir.text;
+ fileName = dirFileName.fileName.text;
+
+ servletURL = dirFileName.servletURL.text;
+
+ if(dirFileName.loadOrSave == "SAVE"){
+ // calls save function
+ SaveWorkflow.getInstance(uuid, fileName, servletURL, dirName).saveWorkflowOnServer("wsdl");
+ } else if(dirFileName.loadOrSave == "LOAD"){
+ // call Load function
+ RetrieveWorkflow.createInstance(uuid, fileName, servletURL, dirName).loadWorkflowFromServer("wsdl");
+ //loadWorkflowFromServer("wsdl");
+ }
+ else {
+ trace("(setDirAndFileName) Should not reach here ...!");
+ }
+ }
+
+ public function createGUIFromBPELProcess():void {
+
+ //trace(process);
+
+ // This is for the first time when workflow is created or any workflow is loaded
+ bpelLoader.parseWorkflow(processCreator.BPELProcess);
+
+ /*
+ ** Using Old API workflowParser works on XML
+ */
+ //var tempParent:CompositeActivity = workflowParser.parseWorkflow(process, currentTarget.width);
+ //trace(tempParent.width + " " + tempParent.height);
+ //printSubActivities(bpelLoader.processDO.subActivitiesArray, " ");
+ // workflowArrayParser works on the Activity Array created by BPEL Loader
+ var tempParent:CompositeActivity = workflowArrayParser.parseWorkflowArray();
+
+ // hard coded main canvas
+ if(bpelEditor){
+ //if(bpelEditor.mainCanvas) {
+ currentTarget = bpelEditor.mainCanvas;
+ for(var children:Number = currentTarget.numChildren ; children > 0; children--){
+ currentTarget.removeChildAt(children);
+ }
+
+ if(tempParent.width > currentTarget.width){
+ //currentTarget.width = tempParent.width + 10;
+ }
+
+ tempParent.x = ((currentTarget.width - tempParent.width)/2);
+ if(tempParent.height < currentTarget.height){
+ tempParent.resetHeight(currentTarget.height);
+ }
+ UIComponent(currentTarget).addChild(tempParent);
+
+ if(bpelActivityPanel) {
+ bpelActivityPanel.isEditable = true;
+ } else {
+ bpelEditor.BPELActivitiesPanel.isEditable = true;
+ }
+
+ var processDO:ProcessDO = ProcessDO.getInstance();
+ //printSubActivities(processDO.subActivitiesArray, " ");
+ //MonitoringWorkflow.getInstance(null).getMonitoringWorkflow();
+ //}
+ } else {
+ minuteTimer = new Timer(200, 1);
+ minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete);
+ minuteTimer.start();
+ }
+ }
+
+ public function onTimerComplete(evt:Event):void {
+ trace("Timer Started");
+ createGUIFromBPELProcess();
+ }
+ public function displayWSDLPopUp():void {
+
+ if(fileName){
+ var wsdlPopUp:WSDLPopUp = new WSDLPopUp();
+ wsdlPopUp.workflowName = fileName;
+ PopUpManager.addPopUp(wsdlPopUp, bpelEditor, true);
+ } else {
+ Alert.show("Please create workflow before using Web Service Registry");
+ }
+ }
+
+ private var tempwsdlPopUp:WSDLPopUp = null;
+ public function WSDLPopUPOKButtonHandler(popupWindow:IFlexDisplayObject):void{
+ tempwsdlPopUp = WSDLPopUp (popupWindow);
+ //String wsdlPopUp.webServiceName
+ tempURLRequest = new URLRequest(WSDLServletURL);
+ var operationString:String = "operation=getFromURL&";
+ var fullPath:String = "fullPath="+dirName+"&";
+ var WorkflowName:String = "WorkflowName=" + tempwsdlPopUp.workflowName + "&";
+ var WSName:String = "WSname=" + tempwsdlPopUp.webServiceName.text +"&";
+ var WSDLURL:String = "WSDLURL="+tempwsdlPopUp.wsdlURL.text;
+
+ var tempWSDLLoader:URLLoader = new URLLoader();
+ var tempVariables2:URLVariables = new URLVariables(operationString + fullPath + WorkflowName + WSName + WSDLURL);
+ tempWSDLLoader.addEventListener(Event.COMPLETE, WSDLParserHandler);
+ tempWSDLLoader.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
+
+ tempURLRequest.data = tempVariables2;
+ tempWSDLLoader.load(tempURLRequest);
+ }
+
+ public function WSDLParserHandler(event:Event):void{
+ try{
+ var tempXML:XML = new XML (event.target.data);
+ var webServiceRegistry:WebServiceRegistry = WebServiceRegistry.getInstance();
+ webServiceRegistry.WSRegistry.newElement = tempXML;
+ bpelEditor.updateWSRegistryTree(webServiceRegistry.WSRegistry);
+
+ // Should change
+ VCRServletWSDLRetrieval();
+ }
+ catch (exception:*){
+ Alert.show("Error in Parsing WSDL");
+ trace(exception);
+ }
+ //wsRegistryTree
+ }
+
+ // This method is used when VCR retrieves external WSDL
+ private function VCRServletWSDLRetrieval():void {
+ tempURLRequest = new URLRequest(servletURL);
+ var operationString:String = "operation=getFromURL&";
+ var fullPath:String = "fullPath="+dirName+"&";
+ var WorkflowName:String = "workflowName=" + tempwsdlPopUp.workflowName + "&";
+ var WSName:String = "fileName=" + tempwsdlPopUp.webServiceName.text +".wsdl&";
+ var WSDLURL:String = "url="+tempwsdlPopUp.wsdlURL.text;
+
+ var tempWSDLLoader:URLLoader = new URLLoader();
+ var tempVariables2:URLVariables = new URLVariables(operationString + fullPath + WorkflowName + WSName + WSDLURL);
+ tempWSDLLoader.addEventListener(Event.COMPLETE, VCRServletWSDLRetrievalHandler);
+ tempWSDLLoader.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
+
+ tempURLRequest.data = tempVariables2;
+ tempWSDLLoader.load(tempURLRequest);
+ }
+
+ public function VCRServletWSDLRetrievalHandler(event:Event):void{
+
+ }
+ private function catchIOError(event:IOErrorEvent):void {
+ Alert.show("Error in Parsing WSDL "+ event.type);
+ }
+
+ public function addNewPartner(WSName:String, portName:String, WSNamespace:String, operationNames:Array):void {
+
+ if(bpelEditor.mainCanvas.numChildren == 1){
+ if( bpelEditor.mainCanvas.getChildAt(0) is Process){
+
+ this.currentTarget = getPartnerLinksCanvas();
+ trace("partnerLink");
+ var partnerLinkPopup:PartnerLinkWSDLPopup = new PartnerLinkWSDLPopup();
+ var partnerLinkDO:PartnerLinkDO = new PartnerLinkDO();
+
+ var tempArray:Array = new Array();
+ tempArray.push(["name", WSName + "_" + portName + "_PL"]);
+ tempArray.push(["partnerLinkType", WSName + ":" + WSName + "_" + portName + "_PLT"]);
+ tempArray.push(["myRole",""]);
+ tempArray.push(["partnerRole",WSName + "_" + portName + "_Provider"]);
+
+ partnerLinkDO.attributesArray = tempArray;
+ partnerLinkPopup.setPartnerLinkDO(partnerLinkDO);
+
+ PopUpManager.addPopUp(partnerLinkPopup, bpelEditor, true);
+
+
+ processCreator.addNewNamespace(WSName, WSNamespace);
+
+ WSDLCreator.getInstance().addNewNamespace(WSName, WSNamespace);
+ WSDLCreator.getInstance().addNewPartnerLink(WSName, WSNamespace,portName);
+
+ PDDCreator.getInstance().createPartnerLink(WSName, false, false);
+ PDDCreator.getInstance().createWSDL(WSName, WSNamespace);
+
+ SubmissionDocumentCreator.getInstance().createParameter("trigger", "xs:string", "Enter URL", WSName + "_PL");
+
+ WSDLCatalogCreator.getInstance().createWSDLEntry(WSName);
+
+ var plPortMapping:PLPortMapping = PLPortMapping.getInstance();
+ plPortMapping.addNewMapping(WSName + "_" + portName + "_PL", WSName + ":" + portName, operationNames);
+ }
+ } else {
+ Alert.show("Please First create BPEL Process");
+ }
+ }
+
+ private function getPartnerLinksCanvas():Canvas {
+ var tempProcess:Process = Process(bpelEditor.mainCanvas.getChildAt(0));
+ var tempProcessCanvas:Canvas = Canvas(tempProcess.getChildAt(1));
+
+ var tempPartnerLinks:PartnerLinks = PartnerLinks(tempProcessCanvas.getChildAt(0));
+
+ var tempPartnerLinksCanvas:Canvas = Canvas(tempPartnerLinks.getChildAt(1));
+ return tempPartnerLinksCanvas;
+ }
+
+ private function getVariablessCanvas():Canvas {
+ var tempProcess:Process = Process(bpelEditor.mainCanvas.getChildAt(0));
+ var tempProcessCanvas:Canvas = Canvas(tempProcess.getChildAt(1));
+
+ var tempVariables:Variables = Variables (tempProcessCanvas.getChildAt(1));
+ var tempVariablesCanvas:Canvas = Canvas(tempVariables.getChildAt(1));
+
+ return tempVariablesCanvas;
+ }
+
+ private function updateWSDL():void {
+
+ }
+
+ private function updateBPELProcess():void {
+
+ }
+
+ private function updatePDD():void {
+
+ }
+
+ private function updateWSDLCatalog():void {
+
+ }
+
+ private function updateSubDoc():void {
+
+ }
+
+ public function getMonitoringBPELArray():Array{
+ var monitoringBPEL:MonitoringWorkflow = null;
+ if(workflowID){
+ if(!retrieveWorkflow){
+ retrieveWorkflow = RetrieveWorkflow.createInstance(uuid, fileName, servletURL, dirName);
+ }
+ retrieveWorkflow.retrieveMonitoringWorkflow(workflowID);
+ monitoringBPEL = MonitoringWorkflow.getInstance(workflowID);
+ } else {
+ monitoringBPEL = MonitoringWorkflow.getInstance(null);
+
+ }
+ return monitoringBPEL.getMonitoringArray();
+ }
+
+ public function createQoSDocument(parametersArray:Array, aatributesArray:Array, type:String):void{
+ QoSCreator.createInstance(parametersArray, aatributesArray, type);
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/controller/WorkflowManager.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ActivityDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ActivityDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ActivityDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,36 @@
+package bpel.editor.gridcc.data
+{
+ public class ActivityDO
+ {
+ [Bindable]
+ public var name:String;// = "undefined";
+ public var joinCondition:Boolean = false;
+ public var suppressJoinFailure:Boolean = false;
+
+ protected var _attributesArray:Array;
+
+ public function ActivityDO(){
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+ /*
+ public function printArray():void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ for (var j:int = 0; j < attributesArray[i].length; j++){
+ trace(attributesArray[i][j])
+ }
+ }
+ }
+ */
+ public function get attributesArray():Array{
+ return _attributesArray;
+ }
+
+ public function set attributesArray(attribtesValue:Array):void {
+ _attributesArray = attribtesValue;
+ //printArray();
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ActivityDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/AssignDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/AssignDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/AssignDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,86 @@
+package bpel.editor.gridcc.data
+{
+ public class AssignDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,CopyDO(activity)]);
+ }
+
+ public function AssignDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "optional"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ //for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("AssignDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ //}
+ fillAttributes();
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1]
+ }
+ }
+ }
+ }
+ return "assign" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/AssignDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CaseDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CaseDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CaseDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,84 @@
+package bpel.editor.gridcc.data
+{
+ public class CaseDO extends ActivityDO implements DOInterface {
+ private static var counter:int = 1;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function CaseDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("CaseeDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1]
+ }
+ }
+ }
+ }
+ return "case" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ //trace("Do I reach Here in the Sequence");
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CaseDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchAllDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchAllDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchAllDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,86 @@
+package bpel.editor.gridcc.data
+{
+ public class CatchAllDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ private var childCounter:int = 1;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function CatchAllDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("FaultHandlersDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ //trace("Name attribute" + attributesArray[i][1]);
+ return attributesArray[i][1]
+ }
+ }
+ }
+ return "faultHandlers" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1]
+ }
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchAllDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,85 @@
+package bpel.editor.gridcc.data
+{
+ public class CatchDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ private var childCounter:int = 1;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function CatchDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("FaultHandlersDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ //trace("Name attribute" + attributesArray[i][1]);
+ return attributesArray[i][1]
+ }
+ }
+ }
+ return "faultHandlers" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ //trace("Do I reach Here in the Sequence");
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CatchDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CopyDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CopyDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CopyDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,62 @@
+package bpel.editor.gridcc.data
+{
+ public class CopyDO implements DOInterface
+ {
+ [Bindable]
+ private var _toDO:ToDO;
+
+ [Bindable]
+ private var _fromDO:FromDO
+
+ public function set fromDO(dataObject:FromDO):void {
+ _fromDO = dataObject;
+ }
+
+ public function get fromDO():FromDO {
+ return _fromDO;
+ }
+
+ public function set toDO(dataObject:ToDO):void {
+ _toDO = dataObject;
+ }
+
+ public function get toDO():ToDO {
+ return _toDO;
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ // Doing Nothing
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void{
+ if(type == "to"){
+ //toDO =
+ //ToDO (activity).printArray();
+ _toDO = ToDO (activity);
+ //trace(activity);
+ //trace("To Activity added in the Copy")
+ } else if (type == "from"){
+ //fromDO = FromDO (activity)
+ //FromDO(activity).printArray();
+ _fromDO = FromDO (activity)
+ //trace(activity);
+ //trace("From Activity added in the Copy: "+ activity);
+ }
+ }
+
+ public function printArray():void {
+ // Doing Nothing
+ }
+
+ public function getName():String {
+ // Doing Nothing
+ return "copy";
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ // Doing Nothing
+ return null;
+ }
+
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/CopyDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/DOInterface.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/DOInterface.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/DOInterface.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,13 @@
+package bpel.editor.gridcc.data
+{
+ public interface DOInterface
+ {
+ function updateAttributesArray(attributeName:String, attributeValue:String):void;
+
+ function getName():String;
+
+ function populateAttributes(attNamesList:XMLList):String;
+
+ function updateSubActivitiesArray(type:String, activity:Object):void;
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/DOInterface.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/EmptyDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/EmptyDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/EmptyDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,33 @@
+package bpel.editor.gridcc.data
+{
+ public class EmptyDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ public function EmptyDO(){
+ super();
+ }
+
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to Receive: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ return "empty" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ return "empty";
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/EmptyDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FaultHandlersDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FaultHandlersDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FaultHandlersDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,85 @@
+package bpel.editor.gridcc.data
+{
+ public class FaultHandlersDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ private var childCounter:int = 1;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function FaultHandlersDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("FaultHandlersDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ //trace("Name attribute" + attributesArray[i][1]);
+ return attributesArray[i][1]
+ }
+ }
+ }
+ return "faultHandlers" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ //trace("Do I reach Here in the Sequence");
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FaultHandlersDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FromDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FromDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FromDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,118 @@
+package bpel.editor.gridcc.data
+{
+ public class FromDO implements DOInterface
+ {
+ //[Bindable]
+ //public var name:String;
+
+ [Bindable]
+ public var variable:String = "variable";
+ public var variableValue:String = "";
+ public var queryType:String = "empty";
+
+ [Bindable]
+ public var fromValue:String = " ";
+
+ private var _attributesArray:Array;
+
+ public function get attributesArray():Array {
+ return _attributesArray;
+ }
+
+ public function set attributesArray(attribtesValue:Array):void {
+ _attributesArray = attribtesValue;
+ //printArray();
+ }
+
+ public function FromDO(){
+ //_attributesArray = new Array();
+ fillAttributes();
+ }
+
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["variable", variableValue, "mandatory"]);
+ _attributesArray.push([queryType, fromValue]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+
+ //for ( var i:int = 0; i < _attributesArray.length; i++){
+ switch(attributeName){
+ case "variable":
+ variableValue = attributeValue;
+ break;
+
+ case "query":
+ queryType = attributeName
+ fromValue = attributeValue;
+ break;
+
+ case "part":
+ queryType = attributeName
+ fromValue = attributeValue;
+ break;
+
+ case "empty":
+ //_User is assigning the value directly to any String
+ queryType = attributeName
+ fromValue = attributeValue;
+ break;
+
+ case "expression":
+ //_User is assigning the value directly to any String
+ queryType = attributeName
+ fromValue = attributeValue;
+ break;
+
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to From DO: " + attributeName);
+ }
+ //}
+ fillAttributes();
+ //printArray();
+ }
+
+ public function printArray():void {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ for (var j:int = 0; j < _attributesArray[i].length; j++){
+ trace(_attributesArray[i][j])
+ }
+ }
+ }
+
+
+ // From has no Name will always return NULL
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1]
+ }
+ }
+ }
+ return "from";
+ }
+
+ public function getQueryType():String{
+ return queryType;
+ }
+
+ public function getFromValue():String {
+ return fromValue;
+ }
+
+ // What this function is doing .. why returning name
+ public function populateAttributes(attNamesList:XMLList):String {
+ //var variableName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+ }
+ fillAttributes();
+ return null;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/FromDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/InvokeDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/InvokeDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/InvokeDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,105 @@
+package bpel.editor.gridcc.data
+{
+ public class InvokeDO extends ActivityDO implements DOInterface
+ {
+ public var partnerLink:String;
+ public var portType:String;
+ public var operation:String;
+ public var inputVariable:String;
+ public var outputVariable:String;
+
+ public function InvokeDO(){
+ super();
+ fillAttributes();
+ }
+
+ private function fillAttributes():void {
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["partnerLink", partnerLink, "mandatory"]);
+ _attributesArray.push(["portType", portType, "mandatory"]);
+ _attributesArray.push(["operation", operation, "mandatory"]);
+ _attributesArray.push(["inputVariable", inputVariable, "mandatory"]);
+ _attributesArray.push(["outputVariable",outputVariable, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ _attributesArray[0][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "partnerLink":
+ _attributesArray[1][1] = attributeValue;
+ partnerLink = attributeValue;
+ break;
+ case "portType":
+ _attributesArray[2][1] = attributeValue;
+ portType = attributeValue;
+ break;
+ case "operation":
+ _attributesArray[3][1] = attributeValue;
+ operation = attributeValue;
+ break;
+ case "inputVariable":
+ _attributesArray[4][1] = attributeValue;
+ inputVariable = attributeValue;
+ break;
+ case "outputVariable":
+ _attributesArray[5][1] = attributeValue;
+ outputVariable = attributeValue;
+ break;
+ case "joinCondition":
+ _attributesArray[6][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ _attributesArray[7][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to Invoke: " + attributeName);
+ }
+ }
+ fillAttributes();
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1];
+ }
+ }
+ }
+ return "invoke";
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ //trace(attNamesList[i].name() + " " + attNamesList[i])
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ //super.printArray();
+ return processName;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void{}
+
+ public function printArray():void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ for (var j:int = 0; j < attributesArray[i].length; j++){
+ trace(attributesArray[i][j])
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/InvokeDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/OtherwiseDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/OtherwiseDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/OtherwiseDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,85 @@
+package bpel.editor.gridcc.data
+{
+ public class OtherwiseDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function OtherwiseDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("OtherwiseDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1];
+ }
+ }
+ }
+ }
+ return "otherwise" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ //trace("Do I reach Here in the Sequence");
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/OtherwiseDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,118 @@
+package bpel.editor.gridcc.data
+{
+ public class PartnerLinkDO implements DOInterface
+ {
+ public var myRole:String;
+ public var name:String;
+ public var partnerLinkType:String;
+ public var partnerRole:String;
+
+ private var _attributesArray:Array;
+
+ public function PartnerLinkDO(){
+ fillAttributes();
+ }
+
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["partnerLinkType", partnerLinkType, "mandatory"]);
+ _attributesArray.push(["myRole",myRole, "mandatory"]);
+ _attributesArray.push(["partnerRole", partnerRole, "optional"]);
+ }
+ public function get attributesArray():Array {
+ return _attributesArray;
+ }
+
+ public function set attributesArray(attribtesValue:Array):void {
+ _attributesArray = attribtesValue;
+ //printArray();
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[0][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "myRole":
+ //_attributesArray[2][1] = attributeValue;
+ myRole = attributeValue;
+ break;
+ case "partnerLinkType":
+ //_attributesArray[1][1] = attributeValue;
+ partnerLinkType = attributeValue;
+ break;
+ case "partnerRole":
+ //_attributesArray[3][1] = attributeValue;
+ partnerRole = attributeValue;
+ break;
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to PartnerLink: " + attributeName);
+ }
+ }
+ fillAttributes();
+ }
+ /*
+ public function printArray():void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ for (var j:int = 0; j < attributesArray[i].length; j++){
+ trace(attributesArray[i][j])
+ }
+ }
+ }
+ */
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1];
+ }
+ }
+ }
+ return "partnerLink";
+ }
+
+ public function getPartnerLinkType():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "partnerLinkType"){
+ return _attributesArray[i][1]
+ }
+ }
+ return null;
+ }
+
+ public function getPartnerRole():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "partnerRole"){
+ return _attributesArray[i][1]
+ }
+ }
+ return null;
+ }
+
+ public function getMyRole():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "myRole"){
+ return _attributesArray[i][1]
+ }
+ }
+ return null;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+ //trace(attNamesList[i].name() + " : " + attNamesList[i])
+ if(attNamesList[i].name() == "name"){
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,52 @@
+package bpel.editor.gridcc.data
+{
+ public class PartnerLinkTypeDO
+ {
+
+ private var _name:String;
+ private var _role:String;
+ private var _portType:String;
+ private var _namespacePrefix:String;
+ private var _operationNames:Array = new Array();
+
+ public function get Name():String{
+ return _name;
+ }
+
+ public function get Role():String {
+ return _role;
+ }
+
+ public function get PortType():String{
+ return _portType;
+ }
+
+ public function get NamespacePrefix():String {
+ return _namespacePrefix;
+ }
+
+ public function get OperationNames():Array{
+ return _operationNames;
+ }
+
+ public function set Name(nameValue:String):void {
+ _name = nameValue;
+ }
+
+ public function set Role(roleValue:String):void {
+ _role = roleValue;
+ }
+
+ public function set NamespacePrefix(namesapcePrefixValue:String):void{
+ _namespacePrefix = namesapcePrefixValue;
+ }
+
+ public function set PortType(portTypeValue:String):void {
+ _portType = portTypeValue;
+ }
+
+ public function set OperationNames(operationNamesValues:Array):void{
+ _operationNames = operationNamesValues;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeWrapperDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeWrapperDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeWrapperDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,78 @@
+package bpel.editor.gridcc.data
+{
+ public class PartnerLinkTypeWrapperDO
+ {
+
+ /**
+ * The Singleton instance of PartnerLinkTypeWrapperDO
+ */
+ protected static var instance:PartnerLinkTypeWrapperDO;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of ProcessCreator
+ */
+ public function PartnerLinkTypeWrapperDO()
+ {
+ if (PartnerLinkTypeWrapperDO.instance == null)
+ {
+ PartnerLinkTypeWrapperDO.instance = this;
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of ProcessCreator
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of ProcessCreator
+ */
+ public static function getInstance():PartnerLinkTypeWrapperDO
+ {
+ if (instance == null)
+ {
+ instance = new PartnerLinkTypeWrapperDO();
+ }
+ return instance;
+ }
+
+ private var partnerLinkTypeArray:Array = new Array();
+
+ public function createPartnerLinkType(name:String, portType:String, namespacePrefix:String,
+ operationNames:Array, role:String):void {
+ //trace("PartnerLinkTypeWrapperDO.createPartnerLinkType");
+ var tempPartnerLinkType:PartnerLinkTypeDO = new PartnerLinkTypeDO();
+ tempPartnerLinkType.Name = name;
+ tempPartnerLinkType.NamespacePrefix = namespacePrefix;
+ tempPartnerLinkType.PortType = portType;
+ tempPartnerLinkType.Role = role;
+ tempPartnerLinkType.OperationNames = operationNames;
+
+ partnerLinkTypeArray.push(tempPartnerLinkType);
+ }
+
+ public function findPartnerLinkType(name:String):PartnerLinkTypeDO{
+ for(var i:int = 0; i < partnerLinkTypeArray.length; i++){
+ var tempPartnerLinkType:PartnerLinkTypeDO =
+ PartnerLinkTypeDO (partnerLinkTypeArray[i]);
+ if(tempPartnerLinkType.Name == name){
+ return tempPartnerLinkType;
+ }
+ }
+ return null;
+ }
+
+ public function partnerLinkTypeNamesArray():Array{
+ var tempPartnerLinkTypeNamesArray:Array = new Array();
+ for(var i:int = 0; i < partnerLinkTypeArray.length; i++){
+ var tempPartnerLinkType:PartnerLinkTypeDO =
+ PartnerLinkTypeDO (partnerLinkTypeArray[i]);
+ var tempPartnerLinkTypeName:String = tempPartnerLinkType.Name;
+
+ tempPartnerLinkTypeNamesArray.push(tempPartnerLinkTypeName);
+ }
+ return tempPartnerLinkTypeNamesArray;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinkTypeWrapperDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinksDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinksDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinksDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,77 @@
+package bpel.editor.gridcc.data
+{
+ public class PartnerLinksDO implements DOInterface
+ {
+ protected static var instance:PartnerLinksDO;
+
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ _subActivitiesArray = subActivitiesArrayValue;
+ }
+
+
+ public function updateSubActivitiesArray(type:String, partnerLink:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,PartnerLinkDO(partnerLink)]);
+ }
+
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of PartnerLinks
+ */
+ public function PartnerLinksDO()
+ {
+ if (PartnerLinksDO.instance == null)
+ {
+ PartnerLinksDO.instance = this;
+ _subActivitiesArray = new Array();
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of PartnerLinks
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of PartnerLinks
+ */
+ public static function getInstance():PartnerLinksDO
+ {
+ if (instance == null)
+ {
+ instance = new PartnerLinksDO();
+ }
+ return instance;
+ }
+
+ /**
+ * Delete the Singleton instance of PartnerLinks
+ */
+ public function removeInstance():void {
+ if(instance){
+ instance = null;
+ }
+ }
+
+ public function getName():String {
+ return "partnerLinks";
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {}
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ return null;
+ }
+ //public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/PartnerLinksDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ProcessDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ProcessDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ProcessDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,205 @@
+package bpel.editor.gridcc.data
+{
+ public class ProcessDO implements DOInterface {
+
+ protected static var instance:ProcessDO;
+
+ private var name:String = "";
+ private var targetNamespace:String = "";
+ private var queryLanguage:String = "XPath";
+ private var expressionLanguage:String = "";
+ private var enableInstanceCompensation:Boolean = false;
+ private var abstractProcess:Boolean = false;
+
+ public var _attributesArray:Array;
+ public var namespaceArray:Array;
+
+ private var _subActivitiesArray:Array;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of Process
+ */
+ public function ProcessDO()
+ {
+ if (ProcessDO.instance == null)
+ {
+ ProcessDO.instance = this;
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of Process
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of Process
+ */
+ public static function getInstance():ProcessDO
+ {
+ if (instance == null)
+ {
+ instance = new ProcessDO();
+ }
+ return instance;
+ }
+
+ public function removeInstance():void {
+ if(instance){
+ instance = null;
+ }
+ }
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ // Here I should have any sort of event for Visualisation and XML generation
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,activity]);
+ }
+
+ public function fillNamespaceArray(clientNamespace:String):void {
+ namespaceArray = new Array();
+ var tempNamespace:Namespace;
+
+ tempNamespace = new Namespace("bpws","http://schemas.xmlsoap.org/ws/2003/03/business-process/");
+ namespaceArray.push(tempNamespace);
+
+ tempNamespace = new Namespace("xsd","http://www.w3.org/2001/XMLSchema");
+ namespaceArray.push(tempNamespace);
+
+ tempNamespace = new Namespace("wsa","http://schemas.xmlsoap.org/ws/2003/03/addressing");
+ namespaceArray.push(tempNamespace);
+
+ tempNamespace = new Namespace("client",clientNamespace);
+ namespaceArray.push(tempNamespace);
+ }
+
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["targetNamespace", targetNamespace, "mandatory"]);
+ _attributesArray.push(["queryLanguage", queryLanguage, "optional"]);
+ _attributesArray.push(["expressionLanguage", expressionLanguage, "optional"]);
+ _attributesArray.push(["enableInstanceCompensation", enableInstanceCompensation, "optional"]);
+ _attributesArray.push(["abstractProcess", abstractProcess, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //for ( var i:int = 0; i < _attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "targetNamespace":
+ //_attributesArray[i][1] = attributeValue;
+ targetNamespace = attributeValue;
+ break;
+ case "queryLanguage":
+ //_attributesArray[i][1] = attributeValue;
+ queryLanguage = attributeValue;
+ break;
+ case "expressionLanguage":
+ //_attributesArray[i][1] = attributeValue;
+ expressionLanguage = attributeValue;
+ break;
+ case "enableInstanceCompensation":
+ //_attributesArray[i][1] = attributeValue;
+ enableInstanceCompensation = Boolean (attributeValue);
+ break;
+ case "abstractProcess":
+ //_attributesArray[i][1] = attributeValue;
+ abstractProcess = Boolean (attributeValue);
+ break;
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to Process Do: " + attributeName);
+ }
+ //}
+ }
+ /*
+ public function printArray():void {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ for (var j:int = 0; j < _attributesArray[i].length; j++){
+ trace(_attributesArray[i][j])
+ }
+ }
+ }
+ */
+ public function printNSArray():void {
+ for ( var i:int = 0; i < namespaceArray.length; i++){
+ trace(Namespace(namespaceArray[i]).prefix + " "+ Namespace(namespaceArray[i]).uri)
+
+ }
+ }
+
+ // Method takes an array of attributes
+ // returns the value of attribute "name"
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ //trace(attNamesList[i].name() + " " + attNamesList[i]);
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+ //trace (typeof (attNamesList[i])); // xml
+ //trace (attNamesList[i].nodeKind()); // attribute
+ //trace (attNamesList[i].name()); // id and color
+ //trace (attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+
+ public function populateNS(nsArray:Array):void {
+ var tempNamespace:Namespace;
+
+ if(!namespaceArray){
+ namespaceArray = new Array();
+ for (var index:int = 0; index < nsArray.length; index++) {
+ tempNamespace = nsArray[index];
+ namespaceArray.push(tempNamespace);
+ //trace(tempNamespace.prefix + " " + tempNamespace.uri)
+ }
+ } else{
+ for (var j:int = 0; j < namespaceArray.length; j++){
+ var originalNamespace:Namespace = Namespace(namespaceArray[j]);
+ for (var k:int = 0; k < nsArray.length; k++) {
+ tempNamespace = nsArray[k];
+ if(originalNamespace.prefix == tempNamespace.prefix){
+ originalNamespace = tempNamespace;
+ }
+ else {
+ // Adding new namespace in the array
+ //while looping array starts indefinate loop
+ //namespaceArray.push(tempNamespace);
+ }
+ }
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1];
+ }
+ }
+ }
+ return "process";
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ProcessDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReceiveDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReceiveDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReceiveDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,104 @@
+package bpel.editor.gridcc.data
+{
+ public class ReceiveDO extends ActivityDO implements DOInterface
+ {
+ public var partnerLink:String;
+ public var portType:String;
+ public var operation:String;
+ public var variable:String;
+ public var createInstance:Boolean;
+
+ public function ReceiveDO(){
+ super();
+ fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["partnerLink", partnerLink, "mandatory"]);
+ _attributesArray.push(["portType", portType, "mandatory"]);
+ _attributesArray.push(["operation", operation, "mandatory"]);
+ _attributesArray.push(["variable", variable, "mandatory"]);
+ _attributesArray.push(["createInstance", createInstance, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "partnerLink":
+ //_attributesArray[i][1] = attributeValue;
+ partnerLink = attributeValue;
+ break;
+ case "portType":
+ //_attributesArray[i][1] = attributeValue;
+ portType = attributeValue;
+ break;
+ case "operation":
+ //_attributesArray[i][1] = attributeValue;
+ operation = attributeValue;
+ break;
+ case "variable":
+ //_attributesArray[i][1] = attributeValue;
+ variable = attributeValue;
+ break;
+ case "createInstance":
+ //_attributesArray[i][1] = attributeValue;
+ createInstance = Boolean (attributeValue);
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to Receive: " + attributeName);
+ }
+ }
+ fillAttributes();
+ }
+
+ /*
+ public function printArray():void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ for (var j:int = 0; j < attributesArray[i].length; j++){
+ trace(attributesArray[i][j])
+ }
+ }
+ } */
+
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1];
+ }
+ }
+ }
+ return "reply";
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReceiveDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReplyDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReplyDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReplyDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,105 @@
+package bpel.editor.gridcc.data
+{
+ public class ReplyDO extends ActivityDO implements DOInterface
+ {
+ public var partnerLink:String;
+ public var portType:String;
+ public var operation:String;
+ public var variable:String;
+ public var faultName:String;
+
+ public function ReplyDO(){
+ super();
+ fillAttributes();
+ }
+
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["partnerLink", partnerLink, "mandatory"]);
+ _attributesArray.push(["portType", portType, "mandatory"]);
+ _attributesArray.push(["operation", operation, "mandatory"]);
+ _attributesArray.push(["variable", variable, "mandatory"]);
+ _attributesArray.push(["faultName", faultName, "optional"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ _attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "partnerLink":
+ _attributesArray[i][1] = attributeValue;
+ partnerLink = attributeValue;
+ break;
+ case "portType":
+ _attributesArray[i][1] = attributeValue;
+ portType = attributeValue;
+ break;
+ case "operation":
+ _attributesArray[i][1] = attributeValue;
+ operation = attributeValue;
+ break;
+ case "variable":
+ _attributesArray[i][1] = attributeValue;
+ variable = attributeValue;
+ break;
+ case "faultName":
+ _attributesArray[i][1] = attributeValue;
+ faultName = (attributeValue);
+ break;
+ case "joinCondition":
+ _attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ _attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to Reply: " + attributeName);
+ }
+ }
+ fillAttributes();
+ }
+
+ /*
+ public function printArray():void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ for (var j:int = 0; j < attributesArray[i].length; j++){
+ trace(attributesArray[i][j])
+ }
+ }
+ }*/
+
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1];
+ }
+ }
+ }
+ return "reply";
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ReplyDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ScopeDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ScopeDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ScopeDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,86 @@
+package bpel.editor.gridcc.data
+{
+ public class ScopeDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ private var childCounter:int = 1;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function ScopeDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("ScopeDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1];
+ }
+ }
+ }
+ }
+ return "scope" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ //trace("Do I reach Here in the Sequence");
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ScopeDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SequenceDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SequenceDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SequenceDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,84 @@
+package bpel.editor.gridcc.data
+{
+ public class SequenceDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function SequenceDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("SequenceDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ //trace("Name attribute" + attributesArray[i][1]);
+ return attributesArray[i][1]
+ }
+ }
+ }
+ return "sequence" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ //trace("Do I reach Here in the Sequence");
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SequenceDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SwitchDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SwitchDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SwitchDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,84 @@
+package bpel.editor.gridcc.data
+{
+ public class SwitchDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function SwitchDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("SwitchDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ //trace("Name attribute" + attributesArray[i][1]);
+ return attributesArray[i][1]
+ }
+ }
+ }
+ return "switch" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ //trace("Do I reach Here in the Sequence");
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/SwitchDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/TerminateDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/TerminateDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/TerminateDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,71 @@
+package bpel.editor.gridcc.data
+{
+ public class TerminateDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+
+ public function TerminateDO(){
+ super();
+ fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to Terminate: " + attributeName);
+ }
+ }
+ fillAttributes();
+ }
+
+ /*
+ public function printArray():void {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ for (var j:int = 0; j < attributesArray[i].length; j++){
+ trace(attributesArray[i][j])
+ }
+ }
+ } */
+
+ public function getName():String {
+
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ if(_attributesArray[i][1]){
+ return _attributesArray[i][1]
+ }
+ }
+ }
+ return "terminate" + counter++;
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var processName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ processName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return processName;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/TerminateDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ToDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ToDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ToDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,114 @@
+package bpel.editor.gridcc.data
+{
+ public class ToDO implements DOInterface
+ {
+ //[Bindable]
+ //public var name:String;
+
+ [Bindable]
+ public var variable:String = "variable";
+ public var variableValue:String = "";
+ public var queryType:String = "empty";
+
+ [Bindable]
+ public var toValue:String = " ";
+
+ private var _attributesArray:Array;
+
+ public function get attributesArray():Array {
+ return _attributesArray;
+ }
+
+ public function set attributesArray(attribtesValue:Array):void {
+ _attributesArray = attribtesValue;
+ //printArray();
+ }
+
+ public function ToDO(){
+ //_attributesArray = new Array();
+ fillAttributes();
+ }
+
+ public function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["variable", variableValue, "mandatory"]);
+ _attributesArray.push([queryType, toValue, "mandatory"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("To Do: " + attributeName + " : " + attributeValue)
+ //for ( var i:int = 0; i < _attributesArray.length; i++){
+ switch(attributeName){
+ case "variable":
+ variableValue = attributeValue;
+ //trace(variableValue);
+ break;
+
+ case "query":
+ queryType = attributeName
+ toValue = attributeValue;
+ break;
+
+ case "part":
+ queryType = attributeName
+ toValue = attributeValue;
+ break;
+
+ case "empty":
+ //_User is assigning the value directly to any String
+ //queryType = attributeName
+ toValue = attributeValue;
+ break;
+
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to To DO: " + attributeName);
+ }
+ //}
+ fillAttributes();
+ //printArray();
+ }
+
+ public function printArray():void {
+
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ var tempString:String = " "
+ for (var j:int = 0; j < _attributesArray[i].length; j++){
+ tempString = tempString + " " + _attributesArray[i][j];
+ }
+ //trace(tempString);
+ }
+ }
+
+
+ // From has no Name will always return NULL
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ return _attributesArray[i][1]
+ }
+ }
+ return null;
+ }
+
+ public function getQueryType():String{
+ return queryType;
+ }
+
+ public function getFromValue():String {
+ return toValue;
+ }
+
+ // What this function is doing .. why returning name
+ public function populateAttributes(attNamesList:XMLList):String {
+ //var variableName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+ }
+ fillAttributes();
+ return null;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/ToDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariableDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariableDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariableDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,133 @@
+package bpel.editor.gridcc.data
+{
+ public class VariableDO implements DOInterface
+ {
+ [Bindable]
+ public var name:String;
+ [Bindable]
+ public var variableType:String = "element";
+ public var variableTypeValue:String = "";
+ //[Bindable]
+ //public var type:String;
+ //[Bindable]
+ //public var element:String;
+
+ private var _attributesArray:Array;
+
+ public function get attributesArray():Array {
+ return _attributesArray;
+ }
+
+ public function set attributesArray(attribtesValue:Array):void {
+ _attributesArray = attribtesValue;
+ //printArray();
+ }
+
+ public function VariableDO(){
+ //_attributesArray = new Array();
+ fillAttributes();
+ }
+
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push([variableType, variableTypeValue]);
+ //_attributesArray.push(["type", type]);
+ //_attributesArray.push(["element", element]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+
+ //for ( var i:int = 0; i < _attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //trace(attributeName + " " + attributeValue);
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ //fillAttributes();
+ break;
+
+ case "messageType":
+ //trace(attributeName + " " + attributeValue);
+ //_attributesArray[i][1] = attributeValue;
+ variableType = attributeName
+ variableTypeValue = attributeValue;
+ //messageType = attributeValue;
+ //setVariableType(attributeName);
+ //fillAttributes();
+ break;
+
+ case "type":
+ //trace(attributeName + " " + attributeValue);
+ //_attributesArray[i][1] = attributeValue;
+ variableType = attributeName
+ variableTypeValue = "" + attributeValue;
+ break;
+
+ case "element":
+ //_attributesArray[i][1] = attributeValue;
+ variableType = attributeName
+ variableTypeValue = attributeValue;
+ break;
+
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to Variable DO: " + attributeName);
+ }
+ //}
+ fillAttributes();
+ }
+
+ public function printArray():void {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ for (var j:int = 0; j < _attributesArray[i].length; j++){
+ //trace(_attributesArray[i][j])
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ return _attributesArray[i][1]
+ }
+ }
+ return "variable";
+ }
+
+ public function getVariableType():String{
+ return variableType;
+ }
+
+ public function getVariableTypeValue():String {
+ return variableTypeValue;
+ }
+
+ /*
+ public function setVariableType(variableType:String):void{
+ // Starting with 1 to miss name attribute
+ for ( var i:int = 1; i < _attributesArray.length; i++){
+
+ if(_attributesArray[i][0] == variableType){
+ _attributesArray[i][2] = "selected";
+ } else {
+ _attributesArray[i][2] = "notSelected";
+ }
+ }
+ }
+ */
+ public function populateAttributes(attNamesList:XMLList):String {
+ var variableName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ variableName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return variableName;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariableDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariablesDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariablesDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariablesDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,74 @@
+package bpel.editor.gridcc.data
+{
+ public class VariablesDO implements DOInterface
+ {
+
+ protected static var instance:VariablesDO;
+ private var _subActivitiesArray:Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, variable:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,VariableDO(variable)]);
+ }
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of Variables
+ */
+ public function VariablesDO()
+ {
+ if (VariablesDO.instance == null)
+ {
+ VariablesDO.instance = this;
+ _subActivitiesArray = new Array();
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of Variables
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of Variables
+ */
+ public static function getInstance():VariablesDO
+ {
+ if (instance == null)
+ {
+ instance = new VariablesDO();
+ }
+ return instance;
+ }
+
+ /**
+ * Delete the Singleton instance of Variables
+ */
+ public function removeInstance():void {
+ if(instance){
+ instance = null;
+ }
+ }
+
+ public function getName():String {
+ return "variables";
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {}
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ return null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/VariablesDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WaitDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WaitDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WaitDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,86 @@
+package bpel.editor.gridcc.data
+{
+ public class WaitDO extends ActivityDO implements DOInterface {
+
+ public static var counter:int = 1;
+
+ [Bindable]
+ public var waitValue:String;
+ public var waitType:String = "for";
+
+ public function WaitDO(){
+ //_attributesArray = new Array();
+ fillAttributes();
+ }
+
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push([waitType, waitValue, "mandatory"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+
+ //for ( var i:int = 0; i < _attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ name = attributeValue;
+ break;
+
+ case "for":
+ waitType = attributeName
+ waitValue = attributeValue;
+ break;
+
+ case "until":
+ waitType = attributeName
+ waitValue = attributeValue;
+ break;
+
+ default:
+ trace("ooops ... Wrong Attribute Name Passed to WaitDO: " + attributeName);
+ }
+ //}
+ fillAttributes();
+ //printArray();
+ }
+
+ public function printArray():void {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ for (var j:int = 0; j < _attributesArray[i].length; j++){
+ trace(_attributesArray[i][j])
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < _attributesArray.length; i++){
+ if(_attributesArray[i][0] == "name"){
+ if(_attributesArray[i][1])
+ return _attributesArray[i][1]
+ }
+ }
+ return "wait-" + counter++;
+ }
+
+ public function getWaitType():String{
+ return waitType;
+ }
+
+ public function getWaitValue():String {
+ return waitValue;
+ }
+
+ // What this function is doing .. why returning name
+ public function populateAttributes(attNamesList:XMLList):String {
+ //var variableName:String = "";
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+ }
+ fillAttributes();
+ return null;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {}
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WaitDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WhileDO.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WhileDO.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WhileDO.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,103 @@
+package bpel.editor.gridcc.data
+{
+ public class WhileDO extends ActivityDO implements DOInterface
+ {
+ private static var counter:int = 1;
+ private var condition:Boolean = false;
+ private var _subActivitiesArray:Array;
+
+ // sub activities array can have only one element
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ [Bindable]
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void{
+ subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function updateSubActivitiesArray(type:String, activity:Object):void {
+ if(!_subActivitiesArray){
+ _subActivitiesArray = new Array();
+ }
+ _subActivitiesArray.push([type,ActivityDO(activity)]);
+ }
+
+ public function WhileDO(){
+ super();
+ //fillAttributes();
+ }
+ private function fillAttributes():void {
+ _attributesArray = new Array();
+ _attributesArray.push(["name", name, "mandatory"]);
+ _attributesArray.push(["condition", condition, "mandatory"]);
+ _attributesArray.push(["joinCondition", joinCondition, "optional"]);
+ _attributesArray.push(["suppressJoinFailure", suppressJoinFailure, "optional"]);
+ }
+
+ public function updateAttributesArray(attributeName:String, attributeValue:String):void {
+ //trace("attributeName: " + attributeName + " attributeValue: " + attributeValue);
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ switch(attributeName){
+ case "name":
+ //_attributesArray[i][1] = attributeValue;
+ name = attributeValue;
+ break;
+ case "condition":
+ //_attributesArray[i][1] = attributeValue;
+ condition = Boolean (attributeValue);
+ break;
+ case "joinCondition":
+ //_attributesArray[i][1] = attributeValue;
+ joinCondition = Boolean (attributeValue);
+ break;
+ case "suppressJoinFailure":
+ //_attributesArray[i][1] = attributeValue;
+ suppressJoinFailure = Boolean (attributeValue);
+ break;
+ default:
+ trace("SequenceDO ooops ... Wrong Attribute Name Passed to Me: " + attributeName);
+ }
+ }
+ }
+
+ public function getName():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "name"){
+ if(attributesArray[i][1]){
+ //trace("Name attribute" + attributesArray[i][1]);
+ return attributesArray[i][1]
+ }
+ }
+ }
+ return "while" + counter++;
+ }
+
+ public function getCondtion():String {
+ for ( var i:int = 0; i < attributesArray.length; i++){
+ if(attributesArray[i][0] == "condition"){
+ if(attributesArray[i][1]){
+ //trace("Name attribute" + attributesArray[i][1]);
+ return attributesArray[i][1]
+ }
+ }
+ }
+ return "";
+ }
+
+ public function populateAttributes(attNamesList:XMLList):String {
+ var activityName:String = "";
+
+ for (var i:int = 0; i < attNamesList.length(); i++) {
+ updateAttributesArray(attNamesList[i].name(),attNamesList[i]);
+
+ if(attNamesList[i].name() == "name"){
+ //trace("Do I reach Here in the Sequence");
+ activityName = attNamesList[i];
+ }
+ }
+ fillAttributes();
+ return activityName;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/data/WhileDO.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/events/MonitoringArrayUpdate.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/events/MonitoringArrayUpdate.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/events/MonitoringArrayUpdate.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,17 @@
+package bpel.editor.gridcc.events
+{
+ import flash.events.Event;
+ [Event(name="monitoringArrayUpdateEvent", type="bpel.editor.gridcc.events.MonitoringArrayUpdate")]
+ public class MonitoringArrayUpdate extends Event
+ {
+ public static const MONITORING_ARRAY_UPDATE_EVENT:String = "monitoringArrayUpdateEvent";
+
+ public function MonitoringArrayUpdate(type:String){
+ super(type);
+ }
+
+ override public function clone():Event {
+ return new MonitoringArrayUpdate(MONITORING_ARRAY_UPDATE_EVENT);
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/events/MonitoringArrayUpdate.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ActivityDOSearch.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ActivityDOSearch.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ActivityDOSearch.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,211 @@
+package bpel.editor.gridcc.utility
+{
+ import bpel.editor.gridcc.data.*
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ public class ActivityDOSearch
+ {
+ // Should not return SequenceDo can be flow or scope also
+ // not yet implemented
+
+ public static function searchProcess(type:String, name:String):ActivityDO {
+ trace("ActivityDOSearch.searchProcess: " + type + " " + name);
+ var processDO:ProcessDO = ProcessDO.getInstance();
+ var returnActivityDO:ActivityDO = null;
+
+ //Starting with Index 2 which can be SequenceDO.
+ for(var i:int = 2; i < processDO.subActivitiesArray.length; i++){
+
+ //if(processDO.subActivitiesArray[i][0] == type){
+
+ switch(processDO.subActivitiesArray[i][0]){
+
+ case WorkflowActivities.SEQUENCE:
+ var tempSequenceDO:SequenceDO;
+ tempSequenceDO = SequenceDO(processDO.subActivitiesArray[i][1]);
+ //trace("ActivityDOSearch tempSequenceDO.getName(): " + tempSequenceDO.getName());
+ if(tempSequenceDO.getName() == name && type == WorkflowActivities.SEQUENCE) {
+ return tempSequenceDO;
+ } else {
+ returnActivityDO = searchSequence(type, name, tempSequenceDO);
+ }
+
+ if(returnActivityDO){
+ //trace("returnActivityDO: " + returnActivityDO);
+ return returnActivityDO;
+ }
+ break;
+
+ case WorkflowActivities.WHILE:
+ var tempWhileDO:WhileDO;
+ tempWhileDO = WhileDO(processDO.subActivitiesArray[i][1]);
+ //trace("ActivityDOSearch tempWhileDO.getName(): " + tempWhileDO.getName());
+ if(tempWhileDO.getName() == name && type == WorkflowActivities.WHILE) {
+ return tempWhileDO;
+ } else {
+ returnActivityDO = searchWhile(type, name, tempWhileDO);
+ }
+
+ if(returnActivityDO){
+ //trace("returnActivityDO: " + returnActivityDO);
+ return returnActivityDO;
+ }
+ break;
+
+ default:
+ trace("Not Implemented Yet");
+ }
+ //}
+ }
+ //trace("returnActivityDO: " + returnActivityDO);
+
+ return returnActivityDO;
+ }
+
+ public static function searchSequence(type:String, name:String, sequenceDO:SequenceDO):ActivityDO {
+ //trace("ActivityDOSearch.searchSequence: " + type + " " + name);
+ var returnActivityDO:ActivityDO = null;
+ if(sequenceDO.subActivitiesArray){
+ for(var i:int = 0; i < sequenceDO.subActivitiesArray.length; i++){
+ //if(sequenceDO.subActivitiesArray[i][0] == type){
+ switch(sequenceDO.subActivitiesArray[i][0]){
+
+ case WorkflowActivities.SEQUENCE:
+ var tempSequenceDO:SequenceDO;
+ tempSequenceDO = SequenceDO(sequenceDO.subActivitiesArray[i][1]);
+
+ //trace("ActivityDOSearch tempSequenceDO.getName(): " + tempSequenceDO.getName());
+ if(tempSequenceDO.getName() == name && type == WorkflowActivities.SEQUENCE) {
+ return tempSequenceDO;
+ } else {
+ returnActivityDO = searchSequence(type, name, tempSequenceDO);
+ }
+
+ if(returnActivityDO){
+ return returnActivityDO;
+ }
+ break;
+
+ case WorkflowActivities.WHILE:
+ var tempWhileDO:WhileDO;
+ tempWhileDO = WhileDO(sequenceDO.subActivitiesArray[i][1]);
+ //trace("ActivityDOSearch tempWhileDO.getName(): " + tempWhileDO.getName());
+ if(tempWhileDO.getName() == name && type == WorkflowActivities.WHILE) {
+ //trace("tempWhileDO.subActivitiesArray.length: " + tempWhileDO.subActivitiesArray.length);
+ return tempWhileDO;
+ } else {
+ returnActivityDO = searchWhile(type, name, tempWhileDO);
+ }
+
+ if(returnActivityDO){
+ return returnActivityDO;
+ }
+ break;
+ }
+ //}
+ }
+ }
+ return returnActivityDO;
+ }
+
+ public static function searchWhile(type:String, name:String, whileDO:WhileDO):ActivityDO {
+ //trace("ActivityDOSearch.searchWhile: " + type + " " + name);
+ var returnActivityDO:ActivityDO = null;
+ if(whileDO.subActivitiesArray){
+ for(var i:int = 0; i < whileDO.subActivitiesArray.length; i++){
+ if(whileDO.subActivitiesArray[i][0] == type){
+ switch(whileDO.subActivitiesArray[i][0]){
+
+ case WorkflowActivities.SEQUENCE:
+ var tempSequenceDO:SequenceDO;
+ tempSequenceDO = SequenceDO(whileDO.subActivitiesArray[i][1]);
+
+ //trace("ActivityDOSearch tempSequenceDO.getName(): " + tempSequenceDO.getName());
+ if(tempSequenceDO.getName() == name && type == WorkflowActivities.SEQUENCE) {
+ return tempSequenceDO;
+ } else {
+ returnActivityDO = searchSequence(type, name, tempSequenceDO);
+ }
+
+ if(returnActivityDO){
+ return returnActivityDO;
+ }
+ break;
+
+ case WorkflowActivities.WHILE:
+ var tempWhileDO:WhileDO;
+ tempWhileDO = WhileDO(whileDO.subActivitiesArray[i][1]);
+ //trace("ActivityDOSearch tempWhileDO.getName(): " + tempWhileDO.getName());
+ if(tempWhileDO.getName() == name && type == WorkflowActivities.WHILE) {
+ return tempWhileDO;
+ } else {
+ returnActivityDO = searchWhile(type, name, tempWhileDO);
+ }
+
+ if(returnActivityDO){
+ return returnActivityDO;
+ }
+ break;
+ }
+ }
+ }
+ }
+ return returnActivityDO;
+ }
+
+ // Returning all partnerLink's in PartnerLinksDO for view ...
+ public static function getPartnerLinkAsArray():Array{
+ //var processDO:ProcessDO = ProcessDO.getInstance();
+ var partnerLinksDO:PartnerLinksDO = PartnerLinksDO.getInstance();
+ var tempPartnerLinkArray:Array = new Array();
+ tempPartnerLinkArray.push(" - - - - - - - -");
+
+ for (var index:int = 0; index < partnerLinksDO.subActivitiesArray.length; index++){
+ var partnerLinkName:String = PartnerLinkDO(partnerLinksDO.subActivitiesArray[index][1]).getName();
+
+ tempPartnerLinkArray.push(partnerLinkName);
+ }
+ return tempPartnerLinkArray;
+ }
+
+ // Returning all variable's in VariablesDO for View
+ public static function getVariableAsArray():Array{
+ //var processDO:ProcessDO = ProcessDO.getInstance();
+ var variablesDO:VariablesDO = VariablesDO.getInstance();
+ var tempVariableArray:Array = new Array();
+ tempVariableArray.push(" - - - - - - - - ");
+
+ for (var index:int = 0; index < variablesDO.subActivitiesArray.length; index++){
+ var variableName:String = VariableDO(variablesDO.subActivitiesArray[index][1]).getName();
+
+ tempVariableArray.push(variableName);
+ }
+ return tempVariableArray;
+ }
+
+ public static function variableIndex(variableName:String):int {
+ var tempVariableArray:Array = ActivityDOSearch.getVariableAsArray();
+
+ for(var index:int = 0; index < tempVariableArray.length; index++){
+ var tempString:String = String (tempVariableArray[index]);
+ //trace(tempString + " " + variableName);
+ if(tempString == variableName){
+ return index;
+ }
+ }
+ return 0;
+ }
+
+ public static function partnerLinkIndex(partnerLinkName:String):int {
+ var tempPLArray:Array = ActivityDOSearch.getPartnerLinkAsArray();
+
+ for(var index:int = 0; index < tempPLArray.length; index++){
+ var tempString:String = String (tempPLArray[index]);
+ //trace(tempString + " " + partnerLinkName);
+ if(tempString == partnerLinkName){
+ return index;
+ }
+ }
+ return 0;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ActivityDOSearch.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ComponenetPanels.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ComponenetPanels.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ComponenetPanels.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,64 @@
+package bpel.editor.gridcc.utility
+{
+ import mx.containers.*;
+ public class ComponenetPanels
+ {
+ private static var BPELActivitiesPanel:ApplicationControlBar;
+ private static var QoSActivities:ApplicationControlBar = new ApplicationControlBar();
+ private static var WSRegistry:ApplicationControlBar = new ApplicationControlBar();
+ private static var SchemaRegistry:ApplicationControlBar = new ApplicationControlBar();
+ private static var propertiesPanel:ApplicationControlBar;
+
+ public function ComponenetPanels(){
+ /*
+ if(!BPELActivities){
+ BPELActivities = new ApplicationControlBar();
+ }
+ if(!QoSActivities){
+ QoSActivities = new ApplicationControlBar();
+ }
+ if(!WSRegistry){
+ WSRegistry = new ApplicationControlBar();
+ }
+ if(!SchemaRegistry){
+ SchemaRegistry = new ApplicationControlBar();
+ }
+ if(!propertiesPanel){
+ propertiesPanel = new ApplicationControlBar();
+ }
+ */
+ }
+
+ public function getPropertiesPanel():ApplicationControlBar{
+ if(propertiesPanel){
+ return propertiesPanel;
+ }
+ return null;
+ }
+
+ public function setPropertiesPanel(propertiesPanelValue:ApplicationControlBar):void {
+ if(!propertiesPanel){
+ propertiesPanel = propertiesPanelValue;
+ trace("PropertiesPanel set successfully");
+ } else {
+ trace("OOOPS PropertiesPanel is already set");
+ }
+ }
+
+ public function getBPELActivitiesPanel():ApplicationControlBar{
+ if(BPELActivitiesPanel){
+ return BPELActivitiesPanel;
+ }
+ return null;
+ }
+
+ public function setBPELActivitiesPanel(BPELActivitiesPanelValue:ApplicationControlBar):void {
+ if(!BPELActivitiesPanel){
+ BPELActivitiesPanel = BPELActivitiesPanelValue;
+ //trace("BPELPanel set successfully");
+ } else {
+ //trace("OOOPS BPELPanel is already set");
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/ComponenetPanels.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/DragNDropLogic.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/DragNDropLogic.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/DragNDropLogic.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,529 @@
+package bpel.editor.gridcc.utility
+{
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+
+ public class DragNDropLogic
+ {
+ public static function dragNdrop(containerActivityName:String, droppedActivityName:String):Boolean {
+
+ switch(containerActivityName) {
+ case WorkflowActivities.PROCESS:
+ // Don't allow user to add any activity in the process
+ // other than the default Sequence
+ //return process(containerActivityName,droppedActivityName);
+ return false;
+ break;
+
+ case WorkflowActivities.PARTNERLINKS:
+ return partnerLinks(containerActivityName,droppedActivityName);
+ break;
+
+ case WorkflowActivities.PARTNERS:
+ // To Be Done
+ return true;
+ break;
+
+ case WorkflowActivities.VARIABLES:
+ return variables(containerActivityName,droppedActivityName);
+ break;
+
+ case WorkflowActivities.CORRELATIONSETS:
+ // To Be Done
+ return true;
+ break;
+
+ case WorkflowActivities.FAULTHANDLERS:
+ // To Be Done
+ return true;
+ break;
+
+ case WorkflowActivities.COMPENSATIONHANDLER:
+ // To Be Done
+ return true;
+ break;
+
+ case WorkflowActivities.EVENTHANDLERS:
+ // To Be Done
+ return true;
+ break;
+
+ case WorkflowActivities.EMPTY:
+ // To Be Done
+ return true;
+ break;
+
+ case WorkflowActivities.INVOKE:
+ return invoke(containerActivityName,droppedActivityName);
+ break;
+
+ case WorkflowActivities.RECEIVE:
+ return receive(containerActivityName,droppedActivityName);
+ break;
+
+ case WorkflowActivities.REPLY:
+ return reply(containerActivityName,droppedActivityName);;
+ break;
+
+ case WorkflowActivities.ASSIGN:
+ return assign(containerActivityName,droppedActivityName);;
+ break;
+
+ case WorkflowActivities.WAIT:
+ return true;
+ break;
+
+ case WorkflowActivities.THROW:
+ return true;
+ break;
+
+ case WorkflowActivities.TERMINATE:
+ return true;
+ break;
+
+ case WorkflowActivities.FLOW:
+ return true;
+ break;
+
+ case WorkflowActivities.SWITCH:
+ return true;
+ break;
+
+ case WorkflowActivities.WHILE:
+ return true;
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ return sequence(containerActivityName,droppedActivityName);
+ break;
+
+
+ case WorkflowActivities.PICK:
+ // To Be Done
+ return true;
+ break;
+
+ case WorkflowActivities.SCOPE:
+ // To Be Done
+ return true;
+ break;
+
+ default:
+ trace("Out of range ...!");
+ return false;
+ }
+
+ return false;
+ }
+
+ private static function partnerLinks(containerActivityName:String, droppedActivityName:String):Boolean {
+ //trace("DragNDropLogic.partnerLinks");
+ if(containerActivityName == WorkflowActivities.PARTNERLINKS){
+ if(droppedActivityName == WorkflowActivities.PARTNERLINK){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static function variables(containerActivityName:String, droppedActivityName:String):Boolean {
+ if(containerActivityName == WorkflowActivities.VARIABLES){
+ if(droppedActivityName == WorkflowActivities.VARIABLE){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static function process(containerActivityName:String, droppedActivityName:String):Boolean {
+ if(containerActivityName == WorkflowActivities.PROCESS){
+ switch(droppedActivityName) {
+ case WorkflowActivities.PARTNERLINKS:
+ //trace("partnerLinks");
+ return true;
+ break;
+
+ case WorkflowActivities.PARTNERS:
+ //trace("partners");
+ return true;
+ break;
+
+ case WorkflowActivities.VARIABLES:
+ //trace("variables");
+ return true;
+ break;
+
+ case WorkflowActivities.CORRELATIONSETS:
+ //trace("correlationSets");
+ return true;
+ break;
+
+ case WorkflowActivities.FAULTHANDLERS:
+ //trace("faultHandlers");
+ return true;
+ break;
+
+ case WorkflowActivities.COMPENSATIONHANDLER:
+ //trace("compensationHandler");
+ return true;
+ break;
+
+ case WorkflowActivities.EMPTY:
+ //trace("empty");
+ return true;
+ break;
+ case WorkflowActivities.INVOKE:
+ //trace("invoke");
+ return true;
+ break;
+ case WorkflowActivities.RECEIVE:
+ //trace("receive");
+ return true;
+ break;
+ case WorkflowActivities.REPLY:
+ //trace("reply");
+ return true;
+ break;
+ case WorkflowActivities.ASSIGN:
+ //trace("assign");
+ return true;
+ break;
+ case WorkflowActivities.WAIT:
+ //trace("wait");
+ return true;
+ break;
+ case WorkflowActivities.THROW:
+ //trace("throw");
+ return true;
+ break;
+ case WorkflowActivities.TERMINATE:
+ //trace("terminate");
+ return true;
+ break;
+ case WorkflowActivities.FLOW:
+ //trace("Tuesday");
+ return true;
+ break;
+ case WorkflowActivities.SWITCH:
+ //trace("switch");
+ return true;
+ break;
+ case WorkflowActivities.WHILE:
+ //trace("while");
+ return true;
+ break;
+ case WorkflowActivities.SEQUENCE:
+ //trace("sequence");
+ return true;
+ break;
+ case WorkflowActivities.PICK:
+ //trace("pick");
+ return true;
+ break;
+ case WorkflowActivities.SCOPE:
+ //trace("scope");
+ return true;
+ break;
+ default:
+ trace("Out of range !");
+ return false;
+ }
+ }
+ return false;
+ }
+
+ private static function sequence(containerActivityName:String, droppedActivityName:String):Boolean {
+ //trace("DragNDropLogic.sequence");
+ if(containerActivityName == WorkflowActivities.SEQUENCE){
+ switch(droppedActivityName) {
+ case WorkflowActivities.TARGET:
+ //trace("target");
+ return true;
+ break;
+
+ case WorkflowActivities.SOURCE:
+ //trace("source");
+ return true;
+ break;
+
+ case WorkflowActivities.EMPTY:
+ //trace("empty");
+ return true;
+ break;
+ case WorkflowActivities.INVOKE:
+ //trace("invoke");
+ return true;
+ break;
+ case WorkflowActivities.RECEIVE:
+ //trace("receive");
+ return true;
+ break;
+ case WorkflowActivities.REPLY:
+ //trace("reply");
+ return true;
+ break;
+ case WorkflowActivities.ASSIGN:
+ //trace("assign");
+ return true;
+ break;
+ case WorkflowActivities.WAIT:
+ //trace("wait");
+ return true;
+ break;
+ case WorkflowActivities.THROW:
+ //trace("throw");
+ return true;
+ break;
+ case WorkflowActivities.TERMINATE:
+ //trace("terminate");
+ return true;
+ break;
+ case WorkflowActivities.FLOW:
+ //trace("Tuesday");
+ return true;
+ break;
+ case WorkflowActivities.SWITCH:
+ //trace("switch");
+ return true;
+ break;
+ case WorkflowActivities.WHILE:
+ //trace("while");
+ return true;
+ break;
+ case WorkflowActivities.SEQUENCE:
+ //trace("sequence");
+ return true;
+ break;
+ case WorkflowActivities.PICK:
+ //trace("pick");
+ return true;
+ break;
+ case WorkflowActivities.SCOPE:
+ //trace("scope");
+ return true;
+ break;
+ default:
+ trace("Out of range ???");
+ return false;
+ }
+ }
+ return false;
+ }
+
+ private static function scope(containerActivityName:String, droppedActivityName:String):Boolean {
+ //trace("DragNDropLogic.scope");
+ if(containerActivityName == WorkflowActivities.SCOPE){
+ switch(droppedActivityName) {
+ case WorkflowActivities.TARGET:
+ //trace("target");
+ return true;
+ break;
+
+ case WorkflowActivities.SOURCE:
+ //trace("source");
+ return true;
+ break;
+
+ case WorkflowActivities.EMPTY:
+ //trace("empty");
+ return true;
+ break;
+ case WorkflowActivities.INVOKE:
+ //trace("invoke");
+ return true;
+ break;
+ case WorkflowActivities.RECEIVE:
+ //trace("receive");
+ return true;
+ break;
+ case WorkflowActivities.REPLY:
+ //trace("reply");
+ return true;
+ break;
+ case WorkflowActivities.ASSIGN:
+ //trace("assign");
+ return true;
+ break;
+ case WorkflowActivities.WAIT:
+ //trace("wait");
+ return true;
+ break;
+ case WorkflowActivities.THROW:
+ //trace("throw");
+ return true;
+ break;
+ case WorkflowActivities.TERMINATE:
+ //trace("terminate");
+ return true;
+ break;
+ case WorkflowActivities.FLOW:
+ //trace("Tuesday");
+ return true;
+ break;
+ case WorkflowActivities.SWITCH:
+ //trace("switch");
+ return true;
+ break;
+ case WorkflowActivities.WHILE:
+ //trace("while");
+ return true;
+ break;
+ case WorkflowActivities.SEQUENCE:
+ //trace("sequence");
+ return true;
+ break;
+ case WorkflowActivities.PICK:
+ //trace("pick");
+ return true;
+ break;
+ case WorkflowActivities.SCOPE:
+ //trace("scope");
+ return true;
+ break;
+ default:
+ trace("Out of range ???");
+ return false;
+ }
+ }
+ return false;
+ }
+ private static function invoke(containerActivityName:String, droppedActivityName:String):Boolean {
+ if(containerActivityName == WorkflowActivities.INVOKE){
+ switch(droppedActivityName) {
+ case WorkflowActivities.TARGET:
+ //trace("target");
+ return true;
+ break;
+
+ case WorkflowActivities.SOURCE:
+ //trace("source");
+ return true;
+ break;
+
+ case WorkflowActivities.CORRELATIONS:
+ //trace("correlations");
+ return true;
+ break;
+
+ case WorkflowActivities.CATCH:
+ //trace("catch");
+ return true;
+ break;
+
+ case WorkflowActivities.CATCHALL:
+ //trace("catchAll");
+ return true;
+ break;
+
+ case WorkflowActivities.COMPENSATIONHANDLER:
+ //trace("compensationHandler");
+ return true;
+ break;
+
+ default:
+ trace("Out of range");
+ return false;
+ }
+ }
+ return false;
+ }
+
+ private static function receive(containerActivityName:String, droppedActivityName:String):Boolean {
+ if(containerActivityName == WorkflowActivities.RECEIVE){
+ switch(droppedActivityName) {
+ case WorkflowActivities.TARGET:
+ //trace("target");
+ return true;
+ break;
+
+ case WorkflowActivities.SOURCE:
+ //trace("source");
+ return true;
+ break;
+
+ case WorkflowActivities.CORRELATIONS:
+ //trace("correlations");
+ return true;
+ break;
+
+ default:
+ //trace("Out of range");
+ return false;
+ }
+ }
+ return false;
+ }
+
+ private static function reply(containerActivityName:String, droppedActivityName:String):Boolean {
+ if(containerActivityName == WorkflowActivities.REPLY){
+ switch(droppedActivityName) {
+ case WorkflowActivities.TARGET:
+ //trace("target");
+ return true;
+ break;
+
+ case WorkflowActivities.SOURCE:
+ //trace("source");
+ return true;
+ break;
+
+ case WorkflowActivities.CORRELATIONS:
+ //trace("correlations");
+ return true;
+ break;
+
+ default:
+ trace("Out of range");
+ return false;
+ }
+ }
+ return false;
+ }
+
+ private static function assign(containerActivityName:String, droppedActivityName:String):Boolean {
+ if(containerActivityName == WorkflowActivities.ASSIGN){
+ switch(droppedActivityName) {
+ case WorkflowActivities.TARGET:
+ //trace("target");
+ return true;
+ break;
+
+ case WorkflowActivities.SOURCE:
+ //trace("source");
+ return true;
+ break;
+
+ case WorkflowActivities.COPY:
+ //trace("copy");
+ return true;
+ break;
+
+ default:
+ trace("Out of range");
+ return false;
+ }
+ }
+ return false;
+ }
+
+ private static function copy(containerActivityName:String, droppedActivityName:String):Boolean {
+ if(containerActivityName == WorkflowActivities.COPY){
+ switch(droppedActivityName) {
+ case WorkflowActivities.TO:
+ //trace("to");
+ return true;
+ break;
+
+ case WorkflowActivities.FROM:
+ //trace("from");
+ return true;
+ break;
+
+ default:
+ trace("Out of range");
+ return false;
+ }
+ }
+ return false;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/DragNDropLogic.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/QueryString.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/QueryString.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/QueryString.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,68 @@
+package bpel.editor.gridcc.utility
+{
+ import flash.external.*;
+ import flash.utils.*;
+
+ public class QueryString
+ {
+
+ private var _queryString:String;
+ private var _all:String;
+ private var _params:Object;
+
+ public function get queryString():String
+ {
+ return _queryString;
+ }
+ public function get url():String
+ {
+ return _all;
+ }
+ public function get parameters():Object
+ {
+ return _params;
+ }
+
+
+ public function QueryString()
+ {
+
+ readQueryString();
+ }
+
+ private function readQueryString():void
+ {
+ _params = {};
+ try
+ {
+ _all = ExternalInterface.call("window.location.href.toString");
+ _queryString = ExternalInterface.call("window.location.search.substring", 1);
+ if(_queryString)
+ {
+ // Split the query string separated by "&"
+ var params:Array = _queryString.split('&');
+ var length:uint = params.length;
+
+ for (var i:uint=0,index:int=-1; i<length; i++)
+ {
+ // process each entry in the params array
+ var kvPair:String = params[i];
+
+ // find the index of "=" in each entry
+ if((index = kvPair.indexOf("=")) > 0)
+ {
+ // split each entry in two components
+ // key and value
+ var key:String = kvPair.substring(0,index);
+ var value:String = kvPair.substring(index+1);
+ _params[key] = value;
+ }
+ }
+ }
+ }catch(e:Error) {
+ trace("Some error occured. ExternalInterface doesn't work in Standalone player.");
+ }
+ }
+
+ }
+}
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/utility/QueryString.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Activity.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Activity.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Activity.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,252 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+ import mx.containers.Canvas;
+ import mx.containers.VBox;
+ import mx.containers.FormHeading;
+ import mx.controls.Button;
+
+ //import mx.controls.Label;
+ //import mx.controls.Button;
+
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.FocusEvent;
+
+ //import mx.managers.DragManager;
+ //import mx.core.DragSource;
+
+ public class Activity extends UIComponent {
+
+ [Bindable("parentChangedEvent")]
+ private var _parentActivity:UIComponent;
+
+ private var _activityType:String;
+ private var _activityName:String;
+
+ private var _dragable:Boolean;
+
+ //public var activityHeading:FormHeading;
+ public var activityButton:Button;
+
+ //private var _startEndGap:Number;
+
+ //protected var _preferedWidth:Number;
+ //protected var _preferedHeight:Number;
+
+ [Bindable("yPositionChangedEvent")]
+ private var _yPosition:Number;
+
+ [Bindable]
+ public function get parentActivity():UIComponent {
+ return _parentActivity;
+ }
+
+ public function set parentActivity(parentValue:UIComponent):void {
+ _parentActivity = parentValue;
+ }
+
+ [Bindable]
+ public function get activityType():String{
+ return _activityType;
+ }
+
+ public function set activityType(value:String):void{
+ _activityType = value;
+ //activityHeading.label = this.activityType + " > " + name;
+ activityButton.label = this.activityType + " > " + name;
+ }
+
+ [Bindable]
+ public function get activityName():String{
+ return _activityName;
+ }
+
+
+ public function set activityName(value:String):void{
+ super.name = value;
+ _activityName = value;
+ //activityHeading.label = this.activityType + " > " + name;
+ activityButton.label = this.activityType + " > " + name;
+ }
+
+ public function set dragable(value:Boolean):void {
+ _dragable = value;
+ }
+
+ public function get dragable():Boolean {
+ return _dragable;
+ }
+
+ /*
+ public function set preferedWidth(value:Number):void {
+ _preferedWidth = value;
+ }
+
+ public function get preferedWidth():Number {
+ return _preferedWidth;
+ }
+
+ public function set preferedHeight(value:Number):void {
+ _preferedWidth = value;
+ }
+
+ public function get preferedHeight():Number {
+ return _preferedWidth;
+ }
+
+ public function set startEndGap(value:Number):void {
+ _startEndGap = value;
+ }
+ */
+
+ [Bindable("yPositionChangedEvent")]
+ public function get yPosition():Number {
+ return _yPosition;
+ }
+
+ public function set yPosition(value:Number):void {
+ _yPosition = value;
+ dispatchEvent(new Event("yPositionChangedEvent"));
+ }
+
+ public function Activity(parentValue:UIComponent, name:String, type:String){
+ super();
+ //_parentActivity = parentValue;
+ super.name = name;
+ _activityName = name;
+ _activityType = type;
+
+ //createChildren();
+
+ //setStyle("backgroundColour","#FFBBFF");
+ //parentActivity = parentValue;
+ //startEndGap = 5;
+
+ // Add this listeners if event is dragable .. which means in actual activity
+ //this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false);
+ //this.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+ this.addEventListener(FocusEvent.FOCUS_IN, myFocusIn);
+ this.addEventListener(FocusEvent.FOCUS_OUT, myFocusOut);
+ }
+ /*
+ override protected function createChildren():void {
+ super.createChildren();
+
+ if(!activityHeading){
+ activityHeading = new FormHeading();
+ sizeContainer();
+ activityHeading.label = this.activityType + " > " + name;
+
+ // Add Action Listener in sub class if required
+ //this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+
+ activityHeading.setStyle("backgroundColor","blue");
+ activityHeading.setStyle("color","red");
+
+ // Not sure where it will be added
+ this.addChild(activityHeading);
+ }
+ }
+
+ private function sizeContainer():void {
+
+
+ activityHeading.explicitHeight = 25;
+ activityHeading.explicitWidth = this.width - 10;
+
+ activityHeading.maxHeight = 25;
+ activityHeading.maxWidth = this.width - 10;
+
+ activityHeading.height = 25;
+ activityHeading.width = this.width - 10;
+ }
+ */
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ if(!activityButton){
+ activityButton = new Button();
+ sizeContainer();
+ activityButton.label = this.activityType + " > " + name;
+
+ // Add Action Listener in sub class if required
+ //this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+
+ //activityButton.setStyle("borderColor","blue");
+ //activityButton.setStyle("color","blue");
+ activityButton.setStyle("fontWeight","bold");
+ activityButton.setStyle("fontSize","13");
+ activityButton.setStyle("textAlign","center");
+
+
+ // Not sure where it will be added
+ this.addChild(activityButton);
+ }
+ }
+
+ private function sizeContainer():void {
+
+
+ activityButton.explicitHeight = 25;
+ activityButton.explicitWidth = this.width - 10;
+
+ activityButton.maxHeight = 25;
+ activityButton.maxWidth = this.width - 10;
+
+ activityButton.height = 25;
+ activityButton.width = this.width - 10;
+ }
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ //trace("CustomContainer.updateDisplayList " + name);
+ /*
+ activityHeading.x = 10
+ activityHeading.y = 10
+ */
+ activityButton.x = 5
+ activityButton.y = 5
+ drawBorder();
+ }
+
+ private function drawBorder():void {
+ graphics.clear();
+ graphics.lineStyle(1, 0X000000, 1.0);
+ graphics.drawRect(0,0, this.width,this.height);
+ //graphics.drawRect(5,5, this.activityHeading.width,this.activityHeading.height);
+ // Border around Button is horrible
+ //graphics.drawRect(5,5, this.activityButton.width,this.activityButton.height);
+ }
+
+ /*
+ public function configureEventListener():void{
+ // Add this listeners if event is dragable .. which means in actual activity
+ this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false);
+ //this.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+ //this.addEventListener(FocusEvent.FOCUS_IN, myFocusIn);
+ //this.addEventListener(FocusEvent.FOCUS_OUT, myFocusOut);
+ }
+ */
+ private function mouseMoveHandler(event:MouseEvent):void {
+
+ }
+
+ private function mouseUpHandler(event:MouseEvent):void {
+
+ }
+
+ public function mouseDownHandler(event:MouseEvent):void {
+ event.stopPropagation();
+ //trace("_activityType: " + _activityType + " " +event.localX + " " + event.localY)
+ }
+
+ private function myFocusIn(event:FocusEvent):void {
+ trace("Focus In " + activityType + " " + activityName);
+ }
+ private function myFocusOut(event:FocusEvent):void {
+ //trace("Focus Out " + activityType + " " + activityName);
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Activity.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Assign.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Assign.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Assign.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,28 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+ import mx.containers.Canvas;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.AssignDO;
+
+ public class Assign extends CompositeActivity
+ {
+ private var _dataObject:AssignDO;
+
+ public function Assign(parentValue:UIComponent, name:String, type:String, assignDOValue:AssignDO){
+ super(parentValue, name, WorkflowActivities.ASSIGN);
+ super.dragable = false;
+
+ super.backgroundColour="#FFBBFF";
+ _dataObject = assignDOValue;
+ }
+
+ public function get dataObject():AssignDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:AssignDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Assign.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Case.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Case.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Case.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,33 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.CaseDO;
+
+ public class Case extends CompositeActivity
+ {
+ private var _dataObject:CaseDO;
+
+ public function Case(parentValue:UIComponent, name:String,
+ type:String, caseDOValue:CaseDO){
+ super(parentValue, name, WorkflowActivities.CASE);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = caseDOValue;
+ }
+
+ public function get dataObject():CaseDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:CaseDO):void {
+ _dataObject = value;
+ }
+
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Case.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Catch.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Catch.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Catch.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,32 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.CatchDO;
+
+ public class Catch extends CompositeActivity
+ {
+ private var _dataObject:CatchDO;
+
+ public function Catch(parentValue:UIComponent, name:String,
+ type:String, catchDOValue:CatchDO){
+ super(parentValue, name, WorkflowActivities.CATCH);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = catchDOValue;
+ }
+
+ public function get dataObject():CatchDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:CatchDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Catch.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CatchAll.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CatchAll.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CatchAll.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,32 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.CatchAllDO;
+
+ public class CatchAll extends CompositeActivity
+ {
+ private var _dataObject:CatchAllDO;
+
+ public function CatchAll(parentValue:UIComponent, name:String,
+ type:String, catchAllDOValue:CatchAllDO){
+ super(parentValue, name, WorkflowActivities.CATCHALL);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = catchAllDOValue;
+ }
+
+ public function get dataObject():CatchAllDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:CatchAllDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CatchAll.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CompositeActivity.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CompositeActivity.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CompositeActivity.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,247 @@
+package bpel.editor.gridcc.view {
+
+ import mx.core.UIComponent;
+ import mx.core.Container;
+
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.FocusEvent;
+
+ import mx.controls.Label;
+ import mx.containers.Canvas;
+
+ import mx.events.DragEvent;
+ import mx.managers.DragManager;
+ import mx.core.DragSource;
+
+
+ import bpel.editor.gridcc.controller.WorkflowManager;
+
+
+ public class CompositeActivity extends Activity {
+
+ private var _collapsedSize:Number;
+
+ [Bindable("expandedSizeChangedEvent")]
+ private var _expandedSize:Number;
+
+ [Bindable("expandedOrCollapsedEvent")]
+ private var _expanded:Boolean = true;
+
+ private var _dropable:Boolean;
+
+ //private var expandCollapseLabel:Label;
+
+ //private var titleLabel:Label;
+
+ // Used for Structured Activity Only
+ public var activityContainer:Canvas;
+
+ // This boolean is to stop parent to accept the actvity event
+ protected var acceptDrag:Boolean = false;
+
+ protected var backgroundColour:String = "#ECC8EC";
+
+ /* -------------- Sub Activities Array --------------------*/
+ // It should be in the Structured Activities ONLY
+ [ArrayElementType("bpel.editor.gridcc.view.Activity")]
+ protected var _subActivitiesArray:Array = new Array;
+
+ public function get subActivitiesArray():Array {
+ return _subActivitiesArray;
+ }
+
+ public function set subActivitiesArray(subActivitiesArrayValue:Array):void {
+ _subActivitiesArray = subActivitiesArrayValue;
+ }
+
+ public function addNewActivity(/*newActivityType:String,*/ newActivity:UIComponent):void {
+ _subActivitiesArray.push( newActivity);
+ //trace(this.name + " ** "+ newActivity.name)
+ activityContainer.addChild(newActivity);
+ }
+ /* -----------------------------------------------------------------------*/
+ private var dropedActivityValue:String;
+ private var target:UIComponent;
+
+ public function set dropable(value:Boolean):void {
+ _dropable = value;
+ }
+
+ public function get dropable():Boolean {
+ return _dropable;
+ }
+
+ public function set expanded(value:Boolean):void {
+ _expanded = value;
+ }
+
+ [Bindable("expandedOrCollapsedEvent")]
+ public function get expanded():Boolean {
+ return expanded;
+ }
+
+ public function CompositeActivity(parentValue:UIComponent, name:String, type:String){
+ super(parentValue, name, type);
+ super.dragable = true;
+ super.width = 300;
+ super.height = 60;
+ createChildren();
+
+ //addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler);
+ //addEventListener(DragEvent.DRAG_EXIT,dragExitHandler);
+ //addEventListener(DragEvent.DRAG_DROP,dragDropHandler);
+ }
+
+ /*
+ public function configureEventListeners():void {
+ this.addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler);
+ this.addEventListener(DragEvent.DRAG_EXIT,dragExitHandler);
+ this.addEventListener(DragEvent.DRAG_DROP,dragDropHandler);
+ this.addEventListener(FocusEvent.FOCUS_IN, focusInEventHandler);
+ this.addEventListener(FocusEvent.FOCUS_OUT, focusOutEventHandler);
+ }
+ */
+ override protected function createChildren():void {
+ super.createChildren();
+ //trace("CompositeActivity.createChildren " + super.type);
+
+ createActivityContainer();
+ //createExpandCollapseLabel();
+ //createTitleLabel();
+ //createAxtivityContainer();
+ }
+
+ private function createActivityContainer():void {
+ if(!activityContainer){
+ activityContainer = new Canvas();
+
+ // Only to give reasonable name to activity container
+ //activityContainer.name = super.activityType;
+
+ activityContainer.width = this.width - 10;
+ activityContainer.height = this.height - 40;
+
+ activityContainer.y = 35;
+ //activityContainer.x = (this.width - activityContainer.width)/2;
+ activityContainer.x = 5;
+
+ activityContainer.setStyle("borderStyle", "solid");
+ //activityContainer.setStyle("backgroundColor","#C6C3BA");
+
+ activityContainer.addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler);
+ activityContainer.addEventListener(DragEvent.DRAG_EXIT,dragExitHandler);
+ activityContainer.addEventListener(DragEvent.DRAG_DROP,dragDropHandler);
+ //activityContainer.addEventListener(FocusEvent.FOCUS_IN,onFocus);
+
+ this.addChild(activityContainer);
+ }
+ }
+
+ override protected function commitProperties():void {
+ super.commitProperties();
+ }
+
+ override protected function measure():void {
+ super.measure();
+ }
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private function calculateMinWidth():Number {
+ if(subActivitiesArray.length == 0){
+
+ }
+ return 0;
+ }
+
+ private function calculateMinHeight():Number {
+ if(subActivitiesArray.length == 0){
+
+ }
+ return 0;
+ }
+
+ private function dragEnterHandler(event:DragEvent):void {
+ //trace("CompositeActivity.dragEnterHandler "+ super.activityType);
+ // Get the drop target component from the event object.
+ var dropTarget:Container = event.currentTarget as Container;
+ DragManager.acceptDragDrop(dropTarget);
+ //this.setStyle("backgroundColor", "#FFE1FF");
+ dropTarget.setStyle("backgroundColor", "#C9D1DD");
+ //backgroundColor="#C0C0C0"
+ }
+
+ // Called if the user drags the drag proxy away from the drop target.
+ private function dragExitHandler(event:DragEvent):void {
+ //trace("CompositeActivity.dragExitHandler " + super.activityType);
+ revertFocus(event.currentTarget as Canvas);
+ }
+
+ private function revertFocus(dropTarget:Canvas):void {
+ dropTarget.setStyle("borderStyle", "solid");
+ dropTarget.setStyle("backgroundColor", "#e0e0e0");
+ }
+
+ private function dragDropHandler(event:DragEvent):void {
+ //trace("CompositeActivity.dragDropHandler " + super.activityType);
+ //event.stopPropagation();
+ //trace("Y Position of Drag Drop: " + event.localY);
+ // Get the data identified by the color format from the drag source.
+ dropedActivityValue = event.dragSource.dataForFormat("activity") as String;
+ //target = UIComponent(event.currentTarget);
+ //trace("Target Value " + dropedActivityValue + " Target Parent.type " + target.parent.name);
+
+ var workflowManager:WorkflowManager = WorkflowManager.getInstance();
+ workflowManager.dragDropped(super.activityType, dropedActivityValue, event);
+
+ revertFocus(event.currentTarget as Canvas);
+ }
+
+ private function focusInEventHandler(event:FocusEvent):void{
+ this.setStyle("backgroundColor", "#FFE1FF");
+ }
+
+ private function focusOutEventHandler(event:FocusEvent):void{
+ //revertFocus(this);
+ }
+
+ public function resetWidth(widthValue:int):void {
+ this.width = widthValue;
+ /*
+ activityHeading.width = this.width - 10;
+ */
+ activityButton.width = this.width - 10;
+ activityContainer.width = this.width - 10;
+ resetXCoordinateOfChildActivities();
+ //trace(super.activityType + " " + activityContainer.height + " " + activityContainer.width);
+ //drawBorders();
+ }
+
+ public function resetHeight(heightValue:int):void {
+ this.height = heightValue;
+ activityContainer.height = this.height - 40;
+ //trace(super.activityType + " " + activityContainer.height + " " + activityContainer.width);
+ //drawBorders();
+ }
+
+ private function drawBorders():void {
+ graphics.clear();
+ graphics.lineStyle(1, 0X000000, 1.0);
+ //graphics.drawRect(0,0, this.width,this.height);
+ graphics.drawRect(5,5, activityContainer.width, activityContainer.height);
+ }
+
+ private function resetXCoordinateOfChildActivities():void {
+ var childXCoordiate:int = 0;
+ for (var index:int = 0; index < subActivitiesArray.length; index++){
+
+ childXCoordiate = (this.width - UIComponent(subActivitiesArray[index]).width)/2;
+
+ UIComponent (subActivitiesArray[index]).x = childXCoordiate
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/CompositeActivity.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Copy.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Copy.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Copy.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,85 @@
+package bpel.editor.gridcc.view
+{
+ import mx.controls.Button;
+ import flash.events.MouseEvent;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.*;
+ import mx.managers.PopUpManager;
+
+
+ public class Copy extends Button
+ {
+ private var _copyDO:CopyDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+
+
+ public function Copy(parentValue:CompositeActivity, copyDOValue:CopyDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _copyDO = copyDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+
+ this.label =_copyDO.getName();
+ this.name =_copyDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ // Add Action Listener in sub class if required
+ this.addEventListener(MouseEvent.CLICK, mouseClickHandler);
+
+ //this.setStyle("color","blue");
+ }
+
+ public function get copyDO():CopyDO{
+ return _copyDO;
+ }
+
+ public function set receiveyDO(copyDOValue:CopyDO):void{
+ _copyDO = copyDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+
+ private function mouseClickHandler(event:MouseEvent):void{
+ //trace("mouseClickHandler of Copy");
+ //_variableDO.printArray();
+
+ var copyPopUp:CopyPopUp = new CopyPopUp();
+
+ copyPopUp.setFromDO(_copyDO.fromDO);
+ copyPopUp.setToDO(_copyDO.toDO);
+ copyPopUp.modifyable = true;
+
+ PopUpManager.addPopUp(copyPopUp, this, true);
+ //_copyDO.fromDO.printArray();
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Copy.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Empty.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Empty.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Empty.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,69 @@
+package bpel.editor.gridcc.view
+{
+ import mx.controls.Button;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.*;
+
+ import flash.events.MouseEvent;
+ import flash.events.FocusEvent;
+ import mx.managers.PopUpManager;
+
+ public class Empty extends Button
+ {
+ private var _emptyDO:EmptyDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+
+
+ public function Empty(parentValue:CompositeActivity, emptyDOValue:EmptyDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _emptyDO = emptyDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ //this.label = "Name Asif";
+ this.label =_emptyDO.getName();
+ this.name =_emptyDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ //this.setStyle("color","blue");
+ }
+
+ public function get emptyDO():EmptyDO{
+ return _emptyDO;
+ }
+
+ public function set emptyDO(emptyDOValue:EmptyDO):void{
+ _emptyDO = emptyDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate;
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Empty.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/FaultHandlers.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/FaultHandlers.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/FaultHandlers.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,31 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.FaultHandlersDO;
+
+ public class FaultHandlers extends CompositeActivity
+ {
+ private var _dataObject:FaultHandlersDO;
+
+ public function FaultHandlers(parentValue:UIComponent, name:String,
+ type:String, faultHandlersDOValue:FaultHandlersDO){
+ super(parentValue, name, WorkflowActivities.FAULTHANDLERS);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = faultHandlersDOValue;
+ }
+
+ public function get dataObject():FaultHandlersDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:FaultHandlersDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/FaultHandlers.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Invoke.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Invoke.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Invoke.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,88 @@
+package bpel.editor.gridcc.view
+{
+ import mx.controls.Button;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.*;
+
+ import flash.events.MouseEvent;
+ import flash.events.FocusEvent;
+ import mx.managers.PopUpManager;
+
+ public class Invoke extends Button
+ {
+ private var _invokeDO:InvokeDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+
+
+ public function Invoke(parentValue:CompositeActivity, invokeDOValue:InvokeDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _invokeDO = invokeDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ //this.label = "Name Asif";
+ this.label =_invokeDO.getName();
+ this.name =_invokeDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ // Add Action Listener in sub class if required
+ this.addEventListener(MouseEvent.CLICK, mouseClickHandler);
+ //this.addEventListener(FocusEvent.FOCUS_IN, mouseClickHandler);
+
+ this.setStyle("color","red");
+ }
+
+ public function get invokeDO():InvokeDO{
+ return _invokeDO;
+ }
+
+ public function set invokeDO(invokeDOValue:InvokeDO):void{
+ _invokeDO = invokeDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate;
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+
+ private function mouseClickHandler(event:MouseEvent):void{
+ //trace("mouseClickHandler");
+ //_variableDO.printArray();
+ //trace("Number of Children in parent: " + this.parent.numChildren + this.parent.parent.name);
+ //trace("My Index in parent ChildList: " + this.parent.getChildIndex(this));
+ var invokePopup:InvokePopup = new InvokePopup();
+ invokePopup.setInvokeDO(invokeDO);
+ invokePopup.modifyable = true;
+ PopUpManager.addPopUp(invokePopup, this, true);
+
+ // Attempt to modify the label fails ...
+ // Try something better ...!
+ //this.label =_invokeDO.getName();
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Invoke.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Otherwise.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Otherwise.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Otherwise.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,32 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.OtherwiseDO;
+
+ public class Otherwise extends CompositeActivity
+ {
+ private var _dataObject:OtherwiseDO;
+
+ public function Otherwise(parentValue:UIComponent, name:String,
+ type:String, otherwiseDOValue:OtherwiseDO){
+ super(parentValue, name, WorkflowActivities.OTHERWISE);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = otherwiseDOValue;
+ }
+
+ public function get dataObject():OtherwiseDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:OtherwiseDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Otherwise.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLink.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLink.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLink.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,80 @@
+package bpel.editor.gridcc.view{
+
+ import mx.controls.Button;
+ import flash.events.MouseEvent;
+ import mx.managers.PopUpManager;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.*;
+
+ public class PartnerLink extends Button
+ {
+ private var _partnerLinkDO:PartnerLinkDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+ public function PartnerLink(parentValue:CompositeActivity, partnerLinkDOValue:PartnerLinkDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _partnerLinkDO = partnerLinkDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ //this.label = "PartnerLink";
+ this.label = _partnerLinkDO.getName();
+ this.name = _partnerLinkDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ // Add Action Listener in sub class if required
+ this.addEventListener(MouseEvent.CLICK, mouseClickHandler);
+
+ //this.setStyle("color","blue");
+ }
+
+ public function get partnerLinkDO():PartnerLinkDO{
+ return _partnerLinkDO;
+ }
+
+ public function set partnerLinkDO(partnerLinkDOValue:PartnerLinkDO):void{
+ _partnerLinkDO = partnerLinkDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+
+ private function mouseClickHandler(event:MouseEvent):void{
+ var partnerLinkPopup:PartnerLinkPopup = new PartnerLinkPopup();
+
+ //partnerLinkDO.printArray();
+ //trace("partnerLinkDO.partnerRole: " + partnerLinkDO.partnerRole);
+ //trace("partnerLinkDO.myRole: " + partnerLinkDO.myRole);
+ partnerLinkPopup.setPartnerLinkDO(partnerLinkDO);
+ partnerLinkPopup.modifyable = true;
+ PopUpManager.addPopUp(partnerLinkPopup, this, true);
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLink.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLinks.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLinks.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLinks.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,28 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+ import mx.containers.Canvas;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.PartnerLinksDO;
+
+ public class PartnerLinks extends CompositeActivity
+ {
+ private var _dataObject:PartnerLinksDO;
+
+ public function PartnerLinks(parentValue:UIComponent, name:String, type:String, partnerLinksDOValue:PartnerLinksDO){
+ super(parentValue, name, WorkflowActivities.PARTNERLINKS);
+ super.dragable = false;
+
+ super.backgroundColour="#FFBBFF";
+ _dataObject = partnerLinksDOValue;
+ }
+
+ public function get dataObject():PartnerLinksDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:PartnerLinksDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PartnerLinks.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Process.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Process.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Process.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,30 @@
+package bpel.editor.gridcc.view
+{
+ //import mx.core.UIComponent;
+ import mx.containers.Canvas;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.ProcessDO;
+
+ public class Process extends CompositeActivity
+ {
+ private var _dataObject:ProcessDO;
+
+ public function Process(parentValue:Canvas, name:String, type:String, processDOValue:ProcessDO){
+ super(parentValue, name, WorkflowActivities.PROCESS);
+
+ super.dragable = false;
+
+
+ _dataObject = processDOValue;
+ }
+
+ public function get dataObject():ProcessDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:ProcessDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Process.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PropertyPanel.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PropertyPanel.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PropertyPanel.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,260 @@
+package bpel.editor.gridcc.view
+{
+
+ import mx.containers.*;
+
+ import mx.controls.Button;
+ import mx.controls.Label;
+ import mx.controls.TextInput;
+
+ import flash.events.MouseEvent;
+
+ import bpel.editor.gridcc.data.*;
+ import bpel.editor.gridcc.controller.*;
+ import bpel.editor.gridcc.utility.*;
+
+ public class PropertyPanel extends Canvas
+ {
+ /*
+ [ArrayElementType("mx.controls.Label")]
+ private var labelArray:Array = new Array;
+
+ [ArrayElementType("mx.controls.TextInput")]
+ private var textInputArray:Array = new Array;
+
+ private var _tempAttributesArray:Array;
+ private var tempNamespaceArray:Array;
+
+
+ public function get tempAttributesArray():Array{
+ return _tempAttributesArray;
+ }
+
+ private function set tempAttributesArray(tempArrayValue:Array):void{
+ _tempAttributesArray = tempArrayValue;
+ }
+ private var OKButton:Button = new Button();
+ private var _OKButtonClicked:Boolean = false;
+
+ private var _structuredActivity:StructuredActivity;
+
+ public function get OKButtonClicked():Boolean{
+ return _OKButtonClicked;
+ }
+
+ private var tempLabel:Label;
+ private var tempTextInput:TextInput;
+
+ private var XCoordinate:Number = 20;
+ private var YCoordinate:Number = 10;
+
+ private var isProcess:Boolean = false;
+ private var activityType:String;
+
+ public function PropertyPanel(dummyValue:String){
+
+ }
+
+ public function set structuredActivity(structuredActivityValue:StructuredActivity):void{
+ this._structuredActivity = structuredActivityValue;
+ }
+
+ public function activitySelector(activityType:String):void {
+ trace("Activity Selector" + this.height + " " + this.width)
+ this.activityType = activityType;
+ switch(activityType) {
+
+ case WorkflowActivities.PROCESS:
+ trace("process");
+ var process:gridcc.ic.ac.uk.data.Process = new gridcc.ic.ac.uk.data.Process();
+ isProcess = !isProcess;
+ this._tempAttributesArray = process.attributesArray;
+ this.tempNamespaceArray = process.namespaceArray;
+ fillPanel();
+ break;
+
+ case WorkflowActivities.PARTNERLINK:
+ trace("partenrLink");
+ var partnerLink:gridcc.ic.ac.uk.data.PartnerLink = new gridcc.ic.ac.uk.data.PartnerLink();
+
+ this._tempAttributesArray = partnerLink.attributesArray;
+ fillPanel();
+ break;
+
+ case WorkflowActivities.VARIABLE:
+ trace("variable");
+ var variable:gridcc.ic.ac.uk.data.Variable = new gridcc.ic.ac.uk.data.Variable();
+
+ this._tempAttributesArray = variable.attributesArray;
+ fillPanel();
+ break;
+
+ case WorkflowActivities.INVOKE:
+ trace("variable");
+ var invoke:gridcc.ic.ac.uk.data.Invoke = new gridcc.ic.ac.uk.data.Invoke();
+
+ this._tempAttributesArray = invoke.attributesArray;
+ fillPanel();
+ break;
+
+ case WorkflowActivities.REPLY:
+ trace("variable");
+ var reply:gridcc.ic.ac.uk.data.Reply = new gridcc.ic.ac.uk.data.Reply();
+
+ this._tempAttributesArray = reply.attributesArray;
+ fillPanel();
+ break;
+
+ case WorkflowActivities.RECEIVE:
+ trace("variable");
+ var receive:gridcc.ic.ac.uk.data.Receive = new gridcc.ic.ac.uk.data.Receive();
+
+ this._tempAttributesArray = receive.attributesArray;
+ fillPanel();
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ trace("sequence");
+ var sequence:gridcc.ic.ac.uk.data.Sequence = new gridcc.ic.ac.uk.data.Sequence();
+
+ this._tempAttributesArray = sequence.attributesArray;
+ fillPanel();
+ break;
+ }
+ }
+
+ private function fillPanel():void{
+ for(var i:int=0; i < _tempAttributesArray.length; i++){
+ if(i % 2 == 0){
+ tempLabel = new Label();
+ tempLabel.name = _tempAttributesArray[i][0];
+ tempLabel.text = _tempAttributesArray[i][0];
+ tempLabel.id = _tempAttributesArray[i][0];
+ tempLabel.x = 10;
+ tempLabel.y = YCoordinate;
+ //tempLabel.width = 190;
+ tempLabel.height = 25;
+ tempLabel.percentWidth = 25;
+ tempLabel.setStyle("color", "#CD69C9");
+ tempLabel.setStyle("fontSize", 12);
+ if(_tempAttributesArray[i][2] == "mandatory"){
+ tempLabel.setStyle("fontWeight","bold");
+ }
+ addChild(tempLabel);
+
+ tempTextInput = new TextInput();
+ tempTextInput.name = _tempAttributesArray[i][0];
+ tempTextInput.id = _tempAttributesArray[i][0];
+ tempTextInput.x = 220;
+ tempTextInput.y = YCoordinate;
+ tempTextInput.width = 190;
+ tempTextInput.height = 25;
+ textInputArray.push(tempTextInput);
+ addChild(tempTextInput);
+ } else{
+ tempLabel = new Label();
+ tempLabel.name = _tempAttributesArray[i][0];
+ tempLabel.text = _tempAttributesArray[i][0];
+ tempLabel.id = _tempAttributesArray[i][0];
+ tempLabel.x = 440;
+ tempLabel.y = YCoordinate;
+ //tempLabel.width = 190;
+ tempLabel.height = 25;
+ tempLabel.percentWidth = 25;
+ tempLabel.setStyle("color", "#CD69C9");
+ tempLabel.setStyle("fontSize", 12);
+ if(_tempAttributesArray[i][2] == "mandatory"){
+ tempLabel.setStyle("fontWeight","bold");
+ }
+ addChild(tempLabel);
+
+ tempTextInput = new TextInput();
+ tempTextInput.name = _tempAttributesArray[i][0];
+ tempTextInput.id = _tempAttributesArray[i][0];
+ tempTextInput.x = 650;
+ tempTextInput.y = YCoordinate;
+ tempTextInput.width = 190;
+ tempTextInput.height = 25;
+ textInputArray.push(tempTextInput);
+ addChild(tempTextInput);
+
+ YCoordinate = YCoordinate + 30;
+ }
+ }
+
+ if(_tempAttributesArray.length % 2 != 0){
+ YCoordinate = YCoordinate + 30;
+ }
+
+ OKButton.x = 20;
+ OKButton.y = YCoordinate;
+ OKButton.label = "OK";
+ OKButton.addEventListener(MouseEvent.CLICK, OKButtonClick);
+ if(this.activityType != "process"){
+ OKButton.addEventListener(MouseEvent.CLICK, _structuredActivity.OKClicked);
+ _structuredActivity.setLocalPropertyPanel(this);
+ }
+ addChild(OKButton);
+ }
+
+ public function OKButtonClick(event:MouseEvent):void {
+ if(validateForm()){
+ //trace("OKButtonClicked");
+ for(var i:int = 0; i < textInputArray.length; i++){
+ //trace(TextInput(textInputArray[i]).text);
+ if(TextInput(textInputArray[i]).text != ""){
+ //trace("It is not empty");
+ _tempAttributesArray[i][1] = TextInput(textInputArray[i]).text;
+ }
+ }
+ //partnerLink.printArray();
+ //PopUpManager.removePopUp(this);
+ _OKButtonClicked = !_OKButtonClicked;
+
+ this.parent.removeChildAt(0);
+
+
+ trace(this.activityType);
+ if(this.activityType == "process"){
+ var bpel:BPELCreator = new BPELCreator();
+ bpel.addProcessNamespaces(tempNamespaceArray);
+ bpel.addProcessAttributes(_tempAttributesArray);
+ var componentPanel:ComponenetPanels = new ComponenetPanels();
+ componentPanel.getBPELActivitiesPanel().enabled = true;
+ }
+ }
+ }
+
+ public function getNameValue():String{
+ var nameValue:String;
+ for(var i:int = 0; i < textInputArray.length; i++){
+ if(TextInput(textInputArray[i]).id == "name"){
+ if(TextInput(textInputArray[i]).text == ""){
+ //trace(TextInput(textInputArray[i]).text);
+ TextInput(textInputArray[i]).text = activityType + Math.random();
+ //nameValue = TextInput(textInputArray[i]).text;
+ }
+ nameValue = TextInput(textInputArray[i]).text;
+ break;
+ }
+ }
+ return nameValue;
+ }
+
+ public function validateForm():Boolean{
+ var validate:Boolean = true;
+ for(var i:int = 0; i < _tempAttributesArray.length; i++){
+ trace(_tempAttributesArray[i][0] + " " + _tempAttributesArray[i][2]);
+ if(_tempAttributesArray[i][2] == "mandatory"){
+ if(TextInput(textInputArray[i]).text == ""){
+ validate = false;
+ break;
+ }
+ }
+ }
+ //trace(validate);
+ return validate;
+ }
+ */
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/PropertyPanel.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Receive.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Receive.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Receive.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,86 @@
+package bpel.editor.gridcc.view
+{
+ import mx.controls.Button;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.*;
+
+ import flash.events.MouseEvent;
+ import mx.managers.PopUpManager;
+ import bpel.editor.gridcc.controller.WorkflowManager;
+
+ public class Receive extends Button
+ {
+ private var _receiveDO:ReceiveDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+
+
+ public function Receive(parentValue:CompositeActivity, receiveDOValue:ReceiveDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _receiveDO = receiveDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ //this.label = "Receive";
+ this.label = _receiveDO.getName();
+ this.name = _receiveDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ // Add Action Listener in sub class if required
+ this.addEventListener(MouseEvent.CLICK, mouseClickHandler);
+
+ this.setStyle("color","red");
+ }
+
+ public function get receiveDO():ReceiveDO{
+ return _receiveDO;
+ }
+
+ public function set receiveyDO(receiveDOValue:ReceiveDO):void{
+ _receiveDO = receiveDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+
+ private function mouseClickHandler(event:MouseEvent):void{
+ //trace("mouseClickHandler");
+ //_variableDO.printArray();
+ //trace("Number of Children in parent: " + this.parent.numChildren + this.parent.parent.name);
+ //trace("My Index in parent ChildList: " + this.parent.getChildIndex(this));
+
+ var receivePopup:ReceivePopup = new ReceivePopup();
+ receivePopup.setReceiveDO(receiveDO);
+ receivePopup.modifyable = true;
+ // bpel.editor.gridcc.controller.WorkflowManager.getInstance().getBPELEditor()
+ PopUpManager.addPopUp(receivePopup,
+ this, true);
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Receive.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Reply.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Reply.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Reply.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,85 @@
+package bpel.editor.gridcc.view
+{
+ import mx.controls.Button;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.*;
+
+ import flash.events.MouseEvent;
+ import mx.managers.PopUpManager;
+
+ public class Reply extends Button
+ {
+ private var _replyDO:ReplyDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+
+
+ public function Reply(parentValue:CompositeActivity, replyDOValue:ReplyDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _replyDO = replyDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ //this.label = "Reply";
+ this.label = _replyDO.getName();
+ this.name = _replyDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ // Add Action Listener in sub class if required
+ this.addEventListener(MouseEvent.CLICK, mouseClickHandler);
+
+ this.setStyle("color","red");
+ }
+
+ public function get replyDO():ReplyDO{
+ return _replyDO;
+ }
+
+ public function set replyDO(replyDOValue:ReplyDO):void{
+ _replyDO = replyDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+
+ private function mouseClickHandler(event:MouseEvent):void{
+ trace("mouseClickHandler");
+ //_variableDO.printArray();
+ //trace("Number of Children in parent: " + this.parent.numChildren + this.parent.parent.name);
+ //trace("My Index in parent ChildList: " + this.parent.getChildIndex(this));
+
+ var replyPopup:ReplyPopup = new ReplyPopup();
+ replyPopup.setReplyDO(replyDO);
+ replyPopup.modifyable = true;
+ // bpel.editor.gridcc.controller.WorkflowManager.getInstance().getBPELEditor()
+ PopUpManager.addPopUp(replyPopup, this, true);
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Reply.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Scope.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Scope.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Scope.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,32 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.ScopeDO;
+
+ public class Scope extends CompositeActivity
+ {
+ private var _dataObject:ScopeDO;
+
+ public function Scope(parentValue:UIComponent, name:String,
+ type:String, scopeDOValue:ScopeDO){
+ super(parentValue, name, WorkflowActivities.SCOPE);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = scopeDOValue;
+ }
+
+ public function get dataObject():ScopeDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:ScopeDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Scope.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Sequence.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Sequence.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Sequence.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,32 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.SequenceDO;
+
+ public class Sequence extends CompositeActivity
+ {
+ private var _dataObject:SequenceDO;
+
+ public function Sequence(parentValue:UIComponent, name:String,
+ type:String, sequenceDOValue:SequenceDO){
+ super(parentValue, name, WorkflowActivities.SEQUENCE);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = sequenceDOValue;
+ }
+
+ public function get dataObject():SequenceDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:SequenceDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Sequence.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Switch.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Switch.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Switch.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,32 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.SwitchDO;
+
+ public class Switch extends CompositeActivity
+ {
+ private var _dataObject:SwitchDO;
+
+ public function Switch(parentValue:UIComponent, name:String,
+ type:String, switchDOValue:SwitchDO){
+ super(parentValue, name, WorkflowActivities.SWITCH);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = switchDOValue;
+ }
+
+ public function get dataObject():SwitchDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:SwitchDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Switch.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Terminate.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Terminate.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Terminate.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,69 @@
+package bpel.editor.gridcc.view
+{
+ import mx.controls.Button;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.TerminateDO;
+
+ import flash.events.MouseEvent;
+ import flash.events.FocusEvent;
+ import mx.managers.PopUpManager;
+
+ public class Terminate extends Button
+ {
+ private var _terminateDO:TerminateDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+
+
+ public function Terminate(parentValue:CompositeActivity, terminateDOValue:TerminateDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _terminateDO = terminateDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ //this.label = "Name Asif";
+ this.label =_terminateDO.getName();
+ this.name =_terminateDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ //this.setStyle("color","blue");
+ }
+
+ public function get terminateDO():TerminateDO{
+ return _terminateDO;
+ }
+
+ public function set terminateDO(terminateDOValue:TerminateDO):void{
+ _terminateDO = terminateDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate;
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Terminate.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variable.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variable.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variable.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,80 @@
+package bpel.editor.gridcc.view
+{
+ //import mx.core.UIComponent;
+ //import mx.core.Container;
+ import mx.controls.Button;
+ import flash.events.MouseEvent;
+ import mx.managers.PopUpManager;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.*;
+
+ public class Variable extends Button
+ {
+ private var _variableDO:VariableDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+ public function Variable(parentValue:CompositeActivity, variableDOValue:VariableDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _variableDO = variableDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ //this.label = "Variable";
+ this.label =_variableDO.getName();
+ this.name =_variableDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ // Add Action Listener in sub class if required
+ this.addEventListener(MouseEvent.CLICK, mouseClickHandler);
+
+ //this.setStyle("color","blue");
+ }
+
+ public function get variableDO():VariableDO{
+ return _variableDO;
+ }
+
+ public function set variableDO(variableDOValue:VariableDO):void{
+ _variableDO = variableDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+
+ private function mouseClickHandler(event:MouseEvent):void {
+
+ var variablePopup:VariablePopup = new VariablePopup();
+ variablePopup.setVariableDO(variableDO);
+ variablePopup.modifyable = true;
+ PopUpManager.addPopUp(variablePopup, this, true);
+
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variable.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variables.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variables.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variables.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,32 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+ //import mx.containers.Canvas;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.VariablesDO;
+
+ public class Variables extends CompositeActivity
+ {
+ private var _dataObject:VariablesDO;
+
+ public function Variables(parentValue:UIComponent, name:String, type:String, variablesDOValue:VariablesDO){
+ //trace("Variables: " + name + " " + type);
+ super(parentValue, name, WorkflowActivities.VARIABLES);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = variablesDOValue;
+ }
+
+ public function get dataObject():VariablesDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:VariablesDO):void {
+ _dataObject = value;
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Variables.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Wait.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Wait.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Wait.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,85 @@
+package bpel.editor.gridcc.view
+{
+ import mx.controls.Button;
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.constant.VisualCoordinateConstant;
+ import bpel.editor.gridcc.data.*;
+
+ import flash.events.MouseEvent;
+ import flash.events.FocusEvent;
+ import mx.managers.PopUpManager;
+
+ public class Wait extends Button
+ {
+ private var _waitDO:WaitDO;
+
+ private var _activityYCoordinate:int;
+
+ private var _parentActivity:CompositeActivity;
+
+
+
+ public function Wait(parentValue:CompositeActivity, waitDOValue:WaitDO, yCoordinate:int){
+ super();
+ _parentActivity = parentValue
+ _waitDO = waitDOValue;
+ _activityYCoordinate = yCoordinate;
+ }
+
+ override protected function createChildren():void {
+ super.createChildren();
+
+ //this.label = "Name Asif";
+ this.label =_waitDO.getName();
+ this.name =_waitDO.getName();
+
+ this.height = VisualCoordinateConstant.buttonHeight;
+ this.width = VisualCoordinateConstant.buttonWidth;
+
+ this.y = _activityYCoordinate;
+ this.x = (_parentActivity.width - this.width)/2
+
+ // Add Action Listener in sub class if required
+ this.addEventListener(MouseEvent.CLICK, mouseClickHandler);
+ //this.addEventListener(FocusEvent.FOCUS_IN, mouseClickHandler);
+
+ //this.setStyle("color","blue");
+ }
+
+ public function get waitDO():WaitDO{
+ return _waitDO;
+ }
+
+ public function set waitDO(waitDOValue:WaitDO):void{
+ _waitDO = waitDOValue;
+ }
+
+ public function get activityYCoordinate():int {
+ return _activityYCoordinate
+ }
+
+ public function set activityYCoordinate(value:int):void {
+ activityYCoordinate = value;
+ }
+
+ public function get parentActivity():CompositeActivity {
+ return _parentActivity;
+ }
+
+ public function set parentAcitivity(value:CompositeActivity):void {
+ _parentActivity = value;
+ }
+
+ private function mouseClickHandler(event:MouseEvent):void{
+ //trace("mouseClickHandler");
+ //_variableDO.printArray();
+ //trace("Number of Children in parent: " + this.parent.numChildren + this.parent.parent.name);
+ //trace("My Index in parent ChildList: " + this.parent.getChildIndex(this));
+ var waitPopup:WaitPopup = new WaitPopup();
+ waitPopup.setWaitDO(waitDO);
+ waitPopup.modifyable = true;
+
+ PopUpManager.addPopUp(waitPopup, this, true);
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/Wait.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/While.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/While.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/While.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,33 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.WhileDO;
+
+ public class While extends CompositeActivity
+ {
+ private var _dataObject:WhileDO;
+
+ public function While(parentValue:UIComponent, name:String,
+ type:String, whileDOValue:WhileDO){
+ super(parentValue, name, WorkflowActivities.WHILE);
+
+ super.dragable = false;
+
+
+ setStyle("backgroundColour","#FFBBFF");
+
+ _dataObject = whileDOValue;
+ }
+
+ public function get dataObject():WhileDO {
+ return _dataObject;
+ }
+
+ public function set dataObject(value:WhileDO):void {
+ _dataObject = value;
+ }
+
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/While.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/WorkflowParser.as
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/WorkflowParser.as (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/WorkflowParser.as 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,263 @@
+package bpel.editor.gridcc.view
+{
+ import mx.core.UIComponent;
+
+ import mx.core.Container;
+ import mx.containers.Panel;
+ import mx.containers.Canvas;
+ import mx.controls.Button;
+
+ import bpel.editor.gridcc.constant.WorkflowActivities;
+ import bpel.editor.gridcc.data.*;
+ import mx.core.Application;
+
+ public class WorkflowParser
+ {
+ /**
+ * The Singleton instance of WorkflowParser
+ */
+ protected static var instance:WorkflowParser;
+ //private var rootParent:Canvas;
+ private var rootParent:Canvas;
+
+ private var tempContainer:Process;
+
+ /**
+ * Constructor
+ *
+ * Instantiates Singleton instance of WorkflowParser
+ */
+ public function WorkflowParser()
+ {
+ if (WorkflowParser.instance == null)
+ {
+ WorkflowParser.instance = this;
+
+ }
+ }
+
+ /**
+ * Determines if the singleton instance of WorkflowParser
+ * has been instantiated, if not an instance is instantiated
+ * and returned in subsequent calls to getInstance();
+ *
+ * @return Singleton instance of WorkflowParser
+ */
+ public static function getInstance():WorkflowParser
+ {
+ if (instance == null)
+ {
+ instance = new WorkflowParser();
+ }
+ return instance;
+ }
+
+ public function parseWorkflow(workflowInstance:XML, widthValue:Number):CompositeActivity {
+
+ var attNamesList:XMLList = workflowInstance.@*;
+
+ var ns:Array = workflowInstance.namespaceDeclarations();
+
+ var tempProcess:Process = createProcessVisualObject(attNamesList, ns);
+
+ parseElements(workflowInstance, tempProcess);
+
+ return tempProcess;
+ }
+
+ private function parseElements(node:XML, parent:CompositeActivity):void{
+
+ var verticalGap:Number = 10;
+ var tempComponentYPosition:Number = verticalGap;
+ var tempActivityType:String;
+
+ for each( var element:XML in node.elements() ){
+ //trace(element.children().length() + " " + element. at name + " " + element.localName());
+
+ if(element.children().length() > 0){
+ var tempContainer:CompositeActivity;
+ switch(element.localName()){
+
+ case WorkflowActivities.PARTNERLINKS:
+ trace(WorkflowActivities.PARTNERLINKS);
+
+ tempContainer = new PartnerLinks(parent, element.localName(), element.localName(), null);
+ tempActivityType = WorkflowActivities.PARTNERLINKS;
+ break;
+
+ case WorkflowActivities.VARIABLES:
+
+ trace(WorkflowActivities.VARIABLES);
+
+ tempContainer = new Variables(parent, element.localName(), element.localName(), null);
+ tempContainer.setStyle("backgroundColour","#FFBBFF");
+ tempActivityType = WorkflowActivities.VARIABLES;
+ break;
+
+ case WorkflowActivities.SEQUENCE:
+ trace(WorkflowActivities.SEQUENCE);
+
+ tempContainer = new Sequence(parent, element. at name, element.localName(), null);
+ tempActivityType = WorkflowActivities.SEQUENCE;
+ break;
+ }
+
+ // Starting width for any activity
+ // endups for the innermost composite activity
+ tempContainer.resetWidth(300);
+
+
+ // Temp Container's Y position
+ tempContainer.y = tempComponentYPosition ;
+
+ //trace("tempComponentYPosition: " + element.localName() +" : " + tempComponentYPosition)
+ parseElements(element, tempContainer);
+
+ // set Y position for next component
+ tempComponentYPosition = tempContainer.height + tempComponentYPosition + verticalGap;
+ //trace("tempComponentYPosition: " + element.localName() +": " + tempComponentYPosition);
+
+ // If not direct child of root Process
+ //if(parent != null){
+
+ // set the height of the parent activity
+
+ //parent.height = tempComponentYPosition + verticalGap;
+ parent.resetHeight(tempComponentYPosition + verticalGap + 45);
+
+ // Increment the Width of the Parent if required
+ if(parent.width <= tempContainer.width)
+ //parent.width = tempContainer.width + 20;
+ parent.resetWidth(tempContainer.width + 80);
+
+ // set the X poisition of current activity in the middle
+ tempContainer.x = ((parent.width - tempContainer.width)/2);
+
+ parent.addNewActivity(tempContainer);
+ //}
+ //tempContainer.setStyle("borderStyle","solid");
+
+ }else {
+ if(element.localName() == "variable"){
+ var tempVariable:Variable = new Variable(parent, null, tempComponentYPosition);
+ parent.addNewActivity(tempVariable);
+ }
+ else if (element.localName() == "partnerLink"){
+ var tempPartnerLink:PartnerLink = new PartnerLink(parent, null, tempComponentYPosition);
+ parent.addNewActivity(tempPartnerLink);
+ }
+ else if (element.localName() == "reply"){
+ var tempReply:Reply = new Reply(parent, null, tempComponentYPosition);
+ parent.addNewActivity(tempReply);
+ }
+ else if (element.localName() == "receive"){
+ var tempReceive:Receive = new Receive(parent, null, tempComponentYPosition);
+ parent.addNewActivity(tempReceive);
+ }
+ else{
+ var tempButton:Button = new Button();
+ tempButton.label = element.localName();
+ tempButton.name = element. at name;
+ tempButton.height = 75;
+ tempButton.y = tempComponentYPosition;
+
+ tempButton.width = 85;
+ tempButton.x = (parent.width - tempButton.width)/2;
+ parent.addNewActivity(tempButton);
+ }
+ // set Y position for next component
+ tempComponentYPosition = tempComponentYPosition + 75 + verticalGap
+ //trace("tempComponentYPosition: " + element.localName() +": " + tempComponentYPosition);
+
+ //parent.height = tempComponentYPosition + verticalGap;
+ parent.resetHeight(tempComponentYPosition + verticalGap + 45);
+ //parent.resetHeight(parent.activityContainer.height + verticalGap);
+
+ }
+ }
+ }
+
+ public function computeAndAddChild(parentType:String, parentName:String, childType:String, childName:String):void{
+ switch(childType){
+
+ case WorkflowActivities.VARIABLE:
+ var tempButton:Button = new Button();
+ tempButton.label = childName;
+ tempButton.name = childName;
+ tempButton.height = 75;
+ tempButton.width = 85;
+ tempButton.y = getVariablesView().height - 50;
+ tempButton.x = (getVariablesView().width - tempButton.width)/2;
+ getVariablesView().height = getVariablesView().height + tempButton.height + 10;
+ getVariablesView().activityContainer.height = getVariablesView().activityContainer.height + tempButton.height + 10;
+ getVariablesView().addNewActivity(tempButton);
+ break;
+
+ default:
+ trace ("Not yet implemented");
+
+ }
+ redrawActivities();
+ }
+
+
+ private function createProcessVisualObject(attributesList:XMLList, nsArray:Array):Process{
+ var processDO:ProcessDO = ProcessDO.getInstance();
+ var porceessName:String = processDO.populateAttributes(attributesList);
+ processDO.populateNS(nsArray);
+ //if()
+ tempContainer = new Process(null, porceessName, "process", processDO);
+ return tempContainer;
+ }
+
+ private function getVariablesView():Variables {
+ var tempArray:Array = tempContainer.subActivitiesArray;
+ var tempVariablesView:Variables;
+
+ trace("tempArray[1]: " + tempArray[1]);
+ if(tempArray[1]is Variables){
+ trace ("I have found Variables")
+ tempVariablesView = Variables(tempArray[1]);
+ }
+ return tempVariablesView;
+ }
+
+ private function redrawActivities():void {
+ var tempprocessCanvas:Canvas = tempContainer.activityContainer;
+ var newYCordinate:int = 10;
+ for (var index:int=0; index < tempprocessCanvas.numChildren; index++){
+ tempprocessCanvas.getChildAt(index).y = newYCordinate;
+ newYCordinate = newYCordinate + tempprocessCanvas.getChildAt(index).height + 20;
+ }
+ findActivity(tempContainer, "Asif");
+ }
+ /*
+ private function destroyProcessView(tempParentContainer:CompositeActivity):void{
+ if(tempParentContainer){
+ var tempCanvas:Canvas = tempParentContainer.activityContainer;
+
+ for(var index:int = tempCanvas.numChildren -1; index > 0; index--){
+ if(tempCanvas.getChildAt(index) is CompositeActivity){
+ destroyProcessView(CompositeActivity(tempCanvas.getChildAt(index)));
+ }
+ tempCanvas.getChildAt(index) = null;
+ }
+ }
+
+ }*/
+
+ private function findActivity(parentActivity:CompositeActivity, activityName:String):void {
+
+ var tempprocessCanvas:Canvas = parentActivity.activityContainer;
+ var indention:String = " ";
+ for (var index:int=0; index < tempprocessCanvas.numChildren; index++){
+ trace(indention + tempprocessCanvas.getChildAt(index).name);
+ if(tempprocessCanvas.getChildAt(index) is CompositeActivity){
+ findActivity(CompositeActivity(tempprocessCanvas.getChildAt(index)), activityName);
+ }
+ indention = indention + " ";
+ }
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/bpel/editor/gridcc/view/WorkflowParser.as
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/AC_OETags.js
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/AC_OETags.js (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/AC_OETags.js 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,269 @@
+// Flash Player Version Detection - Rev 1.5
+// Detect Client Browser type
+// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
+var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
+var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
+var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
+
+function ControlVersion()
+{
+ var version;
+ var axo;
+ var e;
+
+ // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
+
+ try {
+ // version will be set for 7.X or greater players
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+ version = axo.GetVariable("$version");
+ } catch (e) {
+ }
+
+ if (!version)
+ {
+ try {
+ // version will be set for 6.X players only
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+
+ // installed player is some revision of 6.0
+ // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
+ // so we have to be careful.
+
+ // default to the first public version
+ version = "WIN 6,0,21,0";
+
+ // throws if AllowScripAccess does not exist (introduced in 6.0r47)
+ axo.AllowScriptAccess = "always";
+
+ // safe to call for 6.0r47 or greater
+ version = axo.GetVariable("$version");
+
+ } catch (e) {
+ }
+ }
+
+ if (!version)
+ {
+ try {
+ // version will be set for 4.X or 5.X player
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
+ version = axo.GetVariable("$version");
+ } catch (e) {
+ }
+ }
+
+ if (!version)
+ {
+ try {
+ // version will be set for 3.X player
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
+ version = "WIN 3,0,18,0";
+ } catch (e) {
+ }
+ }
+
+ if (!version)
+ {
+ try {
+ // version will be set for 2.X player
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
+ version = "WIN 2,0,0,11";
+ } catch (e) {
+ version = -1;
+ }
+ }
+
+ return version;
+}
+
+// JavaScript helper required to detect Flash Player PlugIn version information
+function GetSwfVer(){
+ // NS/Opera version >= 3 check for Flash plugin in plugin array
+ var flashVer = -1;
+
+ if (navigator.plugins != null && navigator.plugins.length > 0) {
+ if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
+ var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
+ var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
+ var descArray = flashDescription.split(" ");
+ var tempArrayMajor = descArray[2].split(".");
+ var versionMajor = tempArrayMajor[0];
+ var versionMinor = tempArrayMajor[1];
+ if ( descArray[3] != "" ) {
+ tempArrayMinor = descArray[3].split("r");
+ } else {
+ tempArrayMinor = descArray[4].split("r");
+ }
+ var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
+ var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
+ }
+ }
+ // MSN/WebTV 2.6 supports Flash 4
+ else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
+ // WebTV 2.5 supports Flash 3
+ else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
+ // older WebTV supports Flash 2
+ else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
+ else if ( isIE && isWin && !isOpera ) {
+ flashVer = ControlVersion();
+ }
+ return flashVer;
+}
+
+// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
+function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
+{
+ versionStr = GetSwfVer();
+ if (versionStr == -1 ) {
+ return false;
+ } else if (versionStr != 0) {
+ if(isIE && isWin && !isOpera) {
+ // Given "WIN 2,0,0,11"
+ tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
+ tempString = tempArray[1]; // "2,0,0,11"
+ versionArray = tempString.split(","); // ['2', '0', '0', '11']
+ } else {
+ versionArray = versionStr.split(".");
+ }
+ var versionMajor = versionArray[0];
+ var versionMinor = versionArray[1];
+ var versionRevision = versionArray[2];
+
+ // is the major.revision >= requested major.revision AND the minor version >= requested minor
+ if (versionMajor > parseFloat(reqMajorVer)) {
+ return true;
+ } else if (versionMajor == parseFloat(reqMajorVer)) {
+ if (versionMinor > parseFloat(reqMinorVer))
+ return true;
+ else if (versionMinor == parseFloat(reqMinorVer)) {
+ if (versionRevision >= parseFloat(reqRevision))
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+function AC_AddExtension(src, ext)
+{
+ if (src.indexOf('?') != -1)
+ return src.replace(/\?/, ext+'?');
+ else
+ return src + ext;
+}
+
+function AC_Generateobj(objAttrs, params, embedAttrs)
+{
+ var str = '';
+ if (isIE && isWin && !isOpera)
+ {
+ str += '<object ';
+ for (var i in objAttrs)
+ str += i + '="' + objAttrs[i] + '" ';
+ for (var i in params)
+ str += '><param name="' + i + '" value="' + params[i] + '" /> ';
+ str += '></object>';
+ } else {
+ str += '<embed ';
+ for (var i in embedAttrs)
+ str += i + '="' + embedAttrs[i] + '" ';
+ str += '> </embed>';
+ }
+
+ document.write(str);
+}
+
+function AC_FL_RunContent(){
+ var ret =
+ AC_GetArgs
+ ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
+ , "application/x-shockwave-flash"
+ );
+ AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
+}
+
+function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
+ var ret = new Object();
+ ret.embedAttrs = new Object();
+ ret.params = new Object();
+ ret.objAttrs = new Object();
+ for (var i=0; i < args.length; i=i+2){
+ var currArg = args[i].toLowerCase();
+
+ switch (currArg){
+ case "classid":
+ break;
+ case "pluginspage":
+ ret.embedAttrs[args[i]] = args[i+1];
+ break;
+ case "src":
+ case "movie":
+ args[i+1] = AC_AddExtension(args[i+1], ext);
+ ret.embedAttrs["src"] = args[i+1];
+ ret.params[srcParamName] = args[i+1];
+ break;
+ case "onafterupdate":
+ case "onbeforeupdate":
+ case "onblur":
+ case "oncellchange":
+ case "onclick":
+ case "ondblClick":
+ case "ondrag":
+ case "ondragend":
+ case "ondragenter":
+ case "ondragleave":
+ case "ondragover":
+ case "ondrop":
+ case "onfinish":
+ case "onfocus":
+ case "onhelp":
+ case "onmousedown":
+ case "onmouseup":
+ case "onmouseover":
+ case "onmousemove":
+ case "onmouseout":
+ case "onkeypress":
+ case "onkeydown":
+ case "onkeyup":
+ case "onload":
+ case "onlosecapture":
+ case "onpropertychange":
+ case "onreadystatechange":
+ case "onrowsdelete":
+ case "onrowenter":
+ case "onrowexit":
+ case "onrowsinserted":
+ case "onstart":
+ case "onscroll":
+ case "onbeforeeditfocus":
+ case "onactivate":
+ case "onbeforedeactivate":
+ case "ondeactivate":
+ case "type":
+ case "codebase":
+ case "id":
+ ret.objAttrs[args[i]] = args[i+1];
+ break;
+ case "width":
+ case "height":
+ case "align":
+ case "vspace":
+ case "hspace":
+ case "class":
+ case "title":
+ case "accesskey":
+ case "name":
+ case "tabindex":
+ ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
+ break;
+ default:
+ ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
+ }
+ }
+ ret.objAttrs["classid"] = classid;
+ if (mimeType) ret.embedAttrs["type"] = mimeType;
+ return ret;
+}
+
+
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/AC_OETags.js
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.htm
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.htm (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.htm 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,21 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<script type='text/javascript' language='JavaScript1.2' charset='utf-8'>
+var v = new top.Vars(top.getSearch(window));
+var fv = v.toString('$_');
+</script>
+</head>
+<body >
+<script type='text/javascript' language='JavaScript1.2' charset='utf-8'>
+document.writeln('<object id=\"utility\" name=\" \" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"" + activexDownloadURL + "#version=7,0,14,0\" width=\"100\" height=\"50\">');
+document.writeln('<param name=\"movie\" value=\"history.swf\" />');
+document.writeln('<param name=\"FlashVars\" value=\"'+fv+'&$_lconid='+top.lc_id+'\"/>');
+document.writeln('<param name=\"quality\" value=\"high\" />');
+document.writeln('<param name=\"bgcolor\" value=\"#FFFFFF\" />');
+document.writeln('<param name=\"profile\" value=\"false\" />');
+document.writeln('<embed id=\"utilityEmbed\" name=\"history.swf\" src=\"history.swf\" type=\"application/x-shockwave-flash\" flashvars=\"'+fv+'&$_lconid='+top.lc_id+'\" profile=\"false\" quality=\"high\" bgcolor=\"#FFFFFF\" width=\"100\" height=\"50\" align=\"\" pluginspage=\"" + pluginDownloadURL + "\"></embed>');
+document.writeln('</object>');
+</script>
+</body>
+</html>
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.htm
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.js
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.js (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.js 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,48 @@
+// $Revision: 1.49 $
+// Vars
+Vars = function(qStr) {
+ this.numVars = 0;
+ if(qStr != null) {
+ var nameValue, name;
+ var pairs = qStr.split('&');
+ var pairLen = pairs.length;
+ for(var i = 0; i < pairLen; i++) {
+ var pair = pairs[i];
+ if( (pair.indexOf('=')!= -1) && (pair.length > 3) ) {
+ var nameValue = pair.split('=');
+ var name = nameValue[0];
+ var value = nameValue[1];
+ if(this[name] == null && name.length > 0 && value.length > 0) {
+ this[name] = value;
+ this.numVars++;
+ }
+ }
+ }
+ }
+}
+Vars.prototype.toString = function(pre) {
+ var result = '';
+ if(pre == null) { pre = ''; }
+ for(var i in this) {
+ if(this[i] != null && typeof(this[i]) != 'object' && typeof(this[i]) != 'function' && i != 'numVars') {
+ result += pre + i + '=' + this[i] + '&';
+ }
+ }
+ if(result.length > 0) result = result.substr(0, result.length-1);
+ return result;
+}
+function getSearch(wRef) {
+ var searchStr = '';
+ if(wRef.location.search.length > 1) {
+ searchStr = new String(wRef.location.search);
+ searchStr = searchStr.substring(1, searchStr.length);
+ }
+ return searchStr;
+}
+var lc_id = Math.floor(Math.random() * 100000).toString(16);
+if (this != top)
+{
+ top.Vars = Vars;
+ top.getSearch = getSearch;
+ top.lc_id = lc_id;
+}
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.js
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/history.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/index.template.html
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/index.template.html (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/index.template.html 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,117 @@
+<!-- saved from url=(0014)about:internet -->
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>${title}</title>
+<script src="AC_OETags.js" language="javascript"></script>
+<style>
+body { margin: 0px; overflow:hidden }
+</style>
+<script language="JavaScript" type="text/javascript">
+<!--
+// -----------------------------------------------------------------------------
+// Globals
+// Major version of Flash required
+var requiredMajorVersion = ${version_major};
+// Minor version of Flash required
+var requiredMinorVersion = ${version_minor};
+// Minor version of Flash required
+var requiredRevision = ${version_revision};
+
+var myServletNameIs = "servletName"
+var myWorkflowNameIs = "workflowName"
+var myDirNameIs = "dirName"
+var myXXXNameIs = "XXXXName"
+// -----------------------------------------------------------------------------
+// -->
+</script>
+</head>
+
+<body scroll="no">
+<script language="JavaScript" type="text/javascript" src="history.js"></script>
+<script language="JavaScript" type="text/javascript">
+<!--
+// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
+var hasProductInstall = DetectFlashVer(6, 0, 65);
+
+
+// Version check based upon the values defined in globals
+var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
+
+
+// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
+if ( hasProductInstall && !hasRequestedVersion ) {
+ // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
+ // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
+ // DO NOT MODIFY THE FOLLOWING FOUR LINES
+ // Location visited after installation is complete if installation is required
+ var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
+ var MMredirectURL = window.location;
+ document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+ var MMdoctitle = document.title;
+
+ AC_FL_RunContent(
+ "src", "playerProductInstall",
+ "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
+ "width", "${width}",
+ "height", "${height}",
+ "align", "middle",
+ "id", "${application}",
+ "quality", "high",
+ "bgcolor", "${bgcolor}",
+ "name", "${application}",
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+} else if (hasRequestedVersion) {
+ // if we've detected an acceptable version
+ // embed the Flash Content SWF when all tests are passed
+ AC_FL_RunContent(
+ "src", "${swf}",
+ "width", "${width}",
+ "height", "${height}",
+ "align", "middle",
+ "id", "${application}",
+ "quality", "high",
+ "bgcolor", "${bgcolor}",
+ "name", "${application}",
+ "flashvars",'myServletNameIs=' + myServletNameIs + '&myWorkflowNameIs=' + myWorkflowNameIs + '&myDirNameIs=' + myDirNameIs + '&historyUrl=history.htm%3F&lconid=' + lc_id + '',
+ "allowScriptAccess","sameDomain",
+ "type", "application/x-shockwave-flash",
+ "pluginspage", "http://www.adobe.com/go/getflashplayer"
+ );
+ } else { // flash is too old or we can't detect the plugin
+ var alternateContent = 'Alternate HTML content should be placed here. '
+ + 'This content requires the Adobe Flash Player. '
+ + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
+ document.write(alternateContent); // insert non-flash content
+ }
+// -->
+</script>
+<noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ id="${application}" width="${width}" height="${height}"
+ codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="FlashVars" value="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs />
+ <param name="FlashVars" value="one=1&two=2" />
+ <embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
+ FlashVars="one=1&two=2"
+ width="${width}" height="${height}" name="${application}" align="middle"
+ play="true"
+ loop="false"
+ quality="high"
+ FlashVars="myServletNameIs=" + myServletNameIs +"'&myWorkflowNameIs=" + myWorkflowNameIs +"&myDirNameIs=" + myDirNameIs
+ allowScriptAccess="sameDomain"
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.adobe.com/go/getflashplayer">
+ </embed>
+ </object>
+</noscript>
+<iframe name="_history" src="history.htm" frameborder="0" scrolling="no" width="22" height="0"></iframe>
+</body>
+</html>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/index.template.html
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/playerProductInstall.swf
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/html-template/playerProductInstall.swf
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/ArrowDown.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/ArrowDown.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/BPEL.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/BPEL.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/DownArrow.gif
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/DownArrow.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/QoS.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/QoS.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/QoSLarge.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/QoSLarge.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/WSDL.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/WSDL.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/process.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/images/process.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Asynchronous.wsdl
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Asynchronous.wsdl (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Asynchronous.wsdl 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="DUMMY_PROCESS"
+ targetNamespace="http://gridcc.ac.uk/DUMMY_PROCESS"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:client="http://gridcc.ac.uk/DUMMY_PROCESS"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
+
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <!--
+ <import namespace="http://gridcc.ac.uk/DUMMY_PROCESS" schemaLocation="DUMMY_PROCESS.xsd" />
+ -->
+ </schema>
+ </types>
+
+ <message name="DUMMY_PROCESSRequestMessage">
+ <part name="payload" element="type="xsd:string"/>
+ </message>
+
+ <message name="DUMMY_PROCESSResponseMessage">
+ <part name="payload" element="type="xsd:string"/>
+ </message>
+
+ <!-- portType implemented by the DUMMY_PROCESS BPEL process -->
+ <portType name="DUMMY_PROCESS_PT">
+ <operation name="initiate">
+ <input message="client:DUMMY_PROCESSRequestMessage"/>
+ </operation>
+ </portType>
+
+ <!-- portType implemented by the requester of BPEL process
+ for asynchronous callback purposes -->
+ <portType name="DUMMY_PROCESSCallback">
+ <operation name="onResult">
+ <input message="client:DUMMY_PROCESSResponseMessage"/>
+ </operation>
+ </portType>
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ the partnerLinkType binds the provider and
+ requester portType into an asynchronous conversation.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="DUMMY_PROCESS_PLT">
+ <plnk:role name="DUMMY_PROCESSProvider_PT">
+ <plnk:portType name="client:DUMMY_PROCESS"/>
+ </plnk:role>
+ <plnk:role name="DUMMY_PROCESSRequester">
+ <plnk:portType name="client:DUMMY_PROCESSCallback"/>
+ </plnk:role>
+ </plnk:partnerLinkType>
+</definitions>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Asynchronous.wsdl
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Synchronous.wsdl
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Synchronous.wsdl (rev 0)
+++ labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Synchronous.wsdl 2009-09-24 12:19:08 UTC (rev 29451)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="DUMMY_PROCESS"
+ targetNamespace="http://gridcc.org/workflows/DUMMY_PROCESS"
+ xmlns:client="http://gridcc.org/workflows/DUMMY_PROCESS"
+ xmlns:hdtns="http://gridcc.org/wsdl/workflows/headerTypes"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
+
+ <types>
+ <!--
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://gridcc.ac.uk/DUMMY_PROCESS" schemaLocation="DUMMY_PROCESS.xsd" />
+ </schema>
+ -->
+ <xsd:schema targetNamespace="http://gridcc.org/wsdl/workflows/headerTypes"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:element name="TriggerID">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="part1" type="xs:string"/>
+ <xsd:element name="part2" type="xs:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SimpleTriggerID" type="xs:string"/>
+ </xsd:schema>
+ </types>
+
+ <message name="DUMMY_PROCESSRequestMessage">
+ <part name="FreePart" type="xs:string"/>
+
+ <!--
+ <part name="IE_URL" type="xs:string"/>
+ <part name="username" type="xs:string"/>
+ <part name="password" type="xs:string"/>
+ -->
+ <!-- For Workflow Specific Elements Start -->
+
+ <!-- For Workflow Specific Elements End -->
+
+ <part name="LoopCount" type="xs:integer"/>
+
+ <!-- For Testing Only -->
+ <part name="payload" type="xs:string"/>
+ </message>
+
+ <message name="DUMMY_PROCESSResponseMessage">
+ <part name="payload" type="xs:string"/>
+ </message>
+
+ <!-- portType implemented by the BPEL process -->
+ <portType name="DUMMY_PROCESS_PT">
+ <operation name="process">
+ <input message="client:DUMMY_PROCESSRequestMessage" />
+ <output message="client:DUMMY_PROCESSResponseMessage"/>
+ </operation>
+ </portType>
+
+ <plnk:partnerLinkType name="DUMMY_PROCESS_PLT" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
+ <plnk:role name="DUMMY_PROCESSProvider">
+ <plnk:portType name="client:DUMMY_PROCESS_PT"/>
+ </plnk:role>
+ </plnk:partnerLinkType>
+</definitions>
Property changes on: labs/jbossrules/trunk/drools-guvnor/bpel-editor/wsdl/Synchronous.wsdl
___________________________________________________________________
Name: svn:executable
+ *
More information about the jboss-svn-commits
mailing list