savara SVN: r467 - tags/jbosstools.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-11-16 09:51:19 -0500 (Tue, 16 Nov 2010)
New Revision: 467
Added:
tags/jbosstools/1.1.x-jbt3.2.0.beta2/
Log:
Re-tagging to get additional fixes in before beta2 codefreeze.
Copied: tags/jbosstools/1.1.x-jbt3.2.0.beta2 (from rev 466, branches/1.1.x)
15 years, 5 months
savara SVN: r466 - tags/jbosstools.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-11-16 09:48:08 -0500 (Tue, 16 Nov 2010)
New Revision: 466
Added:
tags/jbosstools/1.1.x-jbt3.2.0.beta2-OLD/
Removed:
tags/jbosstools/1.1.x-jbt3.2.0.beta2/
Log:
Re-tagging to get additional fixes in before beta2 codefreeze.
Copied: tags/jbosstools/1.1.x-jbt3.2.0.beta2-OLD (from rev 465, tags/jbosstools/1.1.x-jbt3.2.0.beta2)
15 years, 5 months
Build failed in Hudson: jbosstools-savara-1.1.x #7
by jboss-qa-internal@redhat.com
See <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/7/changes>
Changes:
[nickboldt] use gbrown's suggested distributionManagement instead
[nickboldt] update input URL for savara
------------------------------------------
[...truncated 5861 lines...]
[INFO] artifact org.eclipse.equinox:registry: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:expressions: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:registry: checking for updates from central
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:osgi: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact com.ibm:icu: checking for updates from jboss-deprecated
[INFO] artifact com.ibm:icu: checking for updates from jboss-developer-repository-group
[INFO] artifact com.ibm:icu: checking for updates from jboss-public-repository-group
[INFO] artifact com.ibm:icu: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse:text: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:text: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:text: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:text: checking for updates from central
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:commands: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse:text: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:text: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:text: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:text: checking for updates from central
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from central
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.emf:common: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact com.ibm:icu: checking for updates from jboss-deprecated
[INFO] artifact com.ibm:icu: checking for updates from jboss-developer-repository-group
[INFO] artifact com.ibm:icu: checking for updates from jboss-public-repository-group
[INFO] artifact com.ibm:icu: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] Expanding: <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/m2-repos...> into <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...>
[INFO]
[INFO] --- maven-jdocbook-plugin:2.2.3:generate (generate-docbook) @ samplesguide ---
[INFO] Processing en-US -> pdf
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...]>
[INFO] Processing en-US -> html
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...]>
[INFO] Processing en-US -> html_single
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...]>
[INFO]
[INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide >>>
[INFO]
[INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide <<<
[INFO]
[INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide ---
[INFO] No sources in project. Archive not created.
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ samplesguide ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...> to <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/m2-repos...>
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...> to <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/m2-repos...>
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Savara::Distribution 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-source-plugi...
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (952 B at 1.2 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-source-plugi... (632 B at 0.7 KB/sec)
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plu...
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (1010 B at 1.2 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plu... (773 B at 0.9 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ distribution ---
[INFO] Deleting <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...>
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-2:single (bin) @ distribution ---
[INFO] Reading assembly descriptor: src/main/assembly/bin.xml
[INFO] Processing DependencySet (output=modules)
[WARNING] Cannot include project artifact: org.jboss.savara:distribution:pom:1.1.0-SNAPSHOT; it doesn't have an associated file or directory.
[INFO] Building zip: <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/7/artifact/...>
[WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.
Instead of attaching the assembly file: <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...,> it will become the file for main project artifact.
NOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-2:single (distribution-package-source) @ distribution ---
[INFO] Reading assembly descriptor: src/main/assembly/src.xml
[INFO] Building zip: <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/7/artifact/...>
[WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.
Instead of attaching the assembly file: <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...,> it will become the file for main project artifact.
NOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!
[WARNING] Replacing pre-existing project main-artifact file: <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/7/artifact/...>
with assembly file: <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/7/artifact/...>
[INFO]
[INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ distribution >>>
[INFO]
[INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ distribution <<<
[INFO]
[INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ distribution ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ distribution ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...> to <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/m2-repos...>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Savara ............................................ SUCCESS [4.260s]
[INFO] Savara::Validators ................................ SUCCESS [2.528s]
[INFO] Savara::Validators::JBoss ......................... SUCCESS [3.446s]
[INFO] Savara::Validators::JBoss::Common ................. SUCCESS [3:55.908s]
[INFO] Savara::Validators::JBoss::ESB .................... SUCCESS [13.697s]
[INFO] Savara::Validators::JBoss::WS-Native .............. SUCCESS [3:26.326s]
[INFO] Savara::Tools ..................................... SUCCESS [0.197s]
[INFO] Savara::Tools::Plugins ............................ SUCCESS [0.014s]
[INFO] Savara::Tools::Plugins::ScribbleCore .............. SUCCESS [13.999s]
[INFO] Savara::Tools::Plugins::ContractModel ............. SUCCESS [5.519s]
[INFO] Savara::Tools::Plugins::ScribbleConversationModel . SUCCESS [6.763s]
[INFO] Savara::Tools::Plugins::ScribbleConversationParser SUCCESS [5.785s]
[INFO] Savara::Tools::Plugins::ScribbleExpressionXPath ... SUCCESS [5.249s]
[INFO] Savara::Tools::Plugins::ScribbleEclipse ........... SUCCESS [8.022s]
[INFO] Savara::Tools::Plugins::Pi4SOACDM ................. SUCCESS [6.620s]
[INFO] Savara::Tools::Plugins::ProtocolContract .......... SUCCESS [4.607s]
[INFO] Savara::Tools::Plugins::ToolsTAPModel ............. SUCCESS [5.187s]
[INFO] Savara::Tools::Plugins::ToolsTAPValidation ........ SUCCESS [9.994s]
[INFO] Savara::Tools::Plugins::ToolsTAPValidation ........ SUCCESS [4.997s]
[INFO] Savara::Tools::Plugins::ScribbleLangModel ......... SUCCESS [4.665s]
[INFO] Savara::Tools::Plugins::ToolsWSDL ................. SUCCESS [8.259s]
[INFO] Savara::Tools::Plugins::ToolsBPEL ................. SUCCESS [8.696s]
[INFO] Savara::Tools::Plugins::ToolsValidator ............ SUCCESS [5.618s]
[INFO] Savara::Tools::Plugins::ToolsBPMN ................. SUCCESS [11.215s]
[INFO] Savara::Tools::Plugins::ToolsMonitor .............. SUCCESS [8.075s]
[INFO] Savara::Tools::Plugins::ScribbleConformance ....... SUCCESS [5.509s]
[INFO] Savara::Tools::Plugins::ScribbleConversationComparator SUCCESS [5.886s]
[INFO] Savara::Tools::Plugins::ScribbleConversationExportText SUCCESS [5.483s]
[INFO] Savara::Tools::Plugins::ScribbleConversationProjector SUCCESS [7.504s]
[INFO] Savara::Tools::Plugins::ScribbleConversationValidation SUCCESS [6.238s]
[INFO] Savara::Tools::Features ........................... SUCCESS [0.019s]
[INFO] Savara::Tools::Features::ScribbleProtocol ......... SUCCESS [4.299s]
[INFO] Savara::Tools::Features::SavaraTools .............. SUCCESS [3.569s]
[INFO] Savara::Tools::Tests .............................. SUCCESS [0.012s]
[INFO] Savara::Tools::Tests::ProtocolContract ............ FAILURE [26.452s]
[INFO] Savara::Tools::Tests::ToolsWSDL ................... FAILURE [19.096s]
[INFO] Savara::Tools::Site ............................... SUCCESS [11.093s]
[INFO] Savara::Docs ...................................... SUCCESS [3.115s]
[INFO] Savara::Docs::UserGuide ........................... SUCCESS [15:17.103s]
[INFO] Savara::Docs::GettingStartedGuide ................. SUCCESS [13:08.630s]
[INFO] Savara::Docs::SamplesGuide ........................ SUCCESS [12:05.925s]
[INFO] Savara::Distribution .............................. SUCCESS [25.047s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56:14.530s
[INFO] Finished at: Fri Nov 12 16:43:23 EST 2010
[INFO] Final Memory: 166M/648M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.tycho:maven-osgi-test-plugin:0.10.0:test (default-test) on project org.jboss.savara.protocol.contract.tests: There are test failures.
[ERROR]
[ERROR] Please refer to <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...> for the individual test results.
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal org.sonatype.tycho:maven-osgi-test-plugin:0.10.0:test (default-test) on project org.jboss.savara.tools.wsdl.tests: There are test failures.
[ERROR]
[ERROR] Please refer to <http://hudson.qa.jboss.com/hudson/job/jbosstools-savara-1.1.x/ws/sources/...> for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.jboss.savara.protocol.contract.tests
Terminating xvnc.
[jbosstools-savara-1.1.x] $ vncserver -kill :30
Killing Xvnc process ID 25580
Archiving artifacts
Recording test results
15 years, 5 months
Build failed in Hudson: savara #164
by jboss-qa-internal@redhat.com
See <http://hudson.qa.jboss.com/hudson/job/savara/164/changes>
Changes:
[nickboldt] use gbrown's suggested distributionManagement instead
[nickboldt] update input URL for savara
[objectiser] Enabled BPEL generator tests in the Tycho build, but parser tests are throwing exceptions under Tycho currently (SAVARA-151).
------------------------------------------
[...truncated 6674 lines...]
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:expressions: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:registry: checking for updates from central
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:osgi: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact com.ibm:icu: checking for updates from jboss-deprecated
[INFO] artifact com.ibm:icu: checking for updates from jboss-developer-repository-group
[INFO] artifact com.ibm:icu: checking for updates from jboss-public-repository-group
[INFO] artifact com.ibm:icu: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse:text: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:text: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:text: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:text: checking for updates from central
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:commands: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse:text: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:text: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:text: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:text: checking for updates from central
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from central
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.emf:common: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact com.ibm:icu: checking for updates from jboss-deprecated
[INFO] artifact com.ibm:icu: checking for updates from jboss-developer-repository-group
[INFO] artifact com.ibm:icu: checking for updates from jboss-public-repository-group
[INFO] artifact com.ibm:icu: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] Expanding: <http://hudson.qa.jboss.com/hudson/job/savara/ws/m2-repository/org/jboss/j...> into <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/docs/samplesguide...>
[INFO]
[INFO] --- maven-jdocbook-plugin:2.2.3:generate (generate-docbook) @ samplesguide ---
[INFO] Processing en-US -> pdf
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/docs/samplesguide...]>
[INFO] Processing en-US -> html
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/docs/samplesguide...]>
[INFO] Processing en-US -> html_single
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/docs/samplesguide...]>
[INFO]
[INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide >>>
[INFO]
[INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide <<<
[INFO]
[INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide ---
[INFO] No sources in project. Archive not created.
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ samplesguide ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/docs/samplesguide...> to <http://hudson.qa.jboss.com/hudson/job/savara/ws/m2-repository/org/jboss/s...>
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/docs/samplesguide...> to <http://hudson.qa.jboss.com/hudson/job/savara/ws/m2-repository/org/jboss/s...>
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Savara::Distribution 1.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-source-plugi...
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-source-plugi... (632 B at 0.6 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (952 B at 0.3 KB/sec)
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plu...
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plu... (773 B at 0.8 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (1010 B at 0.1 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ distribution ---
[INFO] Deleting <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/distribution/target>
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-2:single (bin) @ distribution ---
[INFO] Reading assembly descriptor: src/main/assembly/bin.xml
[INFO] Processing DependencySet (output=modules)
[WARNING] Cannot include project artifact: org.jboss.savara:distribution:pom:1.2.0-SNAPSHOT; it doesn't have an associated file or directory.
[INFO] Building zip: <http://hudson.qa.jboss.com/hudson/job/savara/164/artifact/sources/distrib...>
[WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.
Instead of attaching the assembly file: <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/distribution/targ...,> it will become the file for main project artifact.
NOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-2:single (distribution-package-source) @ distribution ---
[INFO] Reading assembly descriptor: src/main/assembly/src.xml
[INFO] Building zip: <http://hudson.qa.jboss.com/hudson/job/savara/164/artifact/sources/distrib...>
[WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.
Instead of attaching the assembly file: <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/distribution/targ...,> it will become the file for main project artifact.
NOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!
[WARNING] Replacing pre-existing project main-artifact file: <http://hudson.qa.jboss.com/hudson/job/savara/164/artifact/sources/distrib...>
with assembly file: <http://hudson.qa.jboss.com/hudson/job/savara/164/artifact/sources/distrib...>
[INFO]
[INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ distribution >>>
[INFO]
[INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ distribution <<<
[INFO]
[INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ distribution ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ distribution ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/distribution/pom.xml> to <http://hudson.qa.jboss.com/hudson/job/savara/ws/m2-repository/org/jboss/s...>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Savara ............................................ SUCCESS [6.920s]
[INFO] Savara::Validators ................................ SUCCESS [1.946s]
[INFO] Savara::Validators::JBoss ......................... SUCCESS [1.745s]
[INFO] Savara::Validators::JBoss::Common ................. SUCCESS [3:33.248s]
[INFO] Savara::Validators::JBoss::ESB .................... SUCCESS [3:15.070s]
[INFO] Savara::Validators::JBoss::WS-Native .............. SUCCESS [14.254s]
[INFO] Savara::Tools ..................................... SUCCESS [0.075s]
[INFO] Savara::Tools::Plugins ............................ SUCCESS [0.008s]
[INFO] Savara::Tools::Plugins::ScribbleCore .............. SUCCESS [9.894s]
[INFO] Savara::Tools::Plugins::ContractModel ............. SUCCESS [6.536s]
[INFO] Savara::Tools::Plugins::ScribbleConversationModel . SUCCESS [5.154s]
[INFO] Savara::Tools::Plugins::ScribbleConversationParser SUCCESS [4.772s]
[INFO] Savara::Tools::Plugins::ScribbleExpressionXPath ... SUCCESS [6.495s]
[INFO] Savara::Tools::Plugins::ScribbleEclipse ........... SUCCESS [13.508s]
[INFO] Savara::Tools::Plugins::Pi4SOACDM ................. SUCCESS [10.076s]
[INFO] Savara::Tools::Plugins::ProtocolContract .......... SUCCESS [6.376s]
[INFO] Savara::Tools::Plugins::ToolsTAPModel ............. SUCCESS [5.482s]
[INFO] Savara::Tools::Plugins::ToolsTAPValidation ........ SUCCESS [5.843s]
[INFO] Savara::Tools::Plugins::ToolsTAPValidation ........ SUCCESS [5.428s]
[INFO] Savara::Tools::Plugins::ScribbleLangModel ......... SUCCESS [6.071s]
[INFO] Savara::Tools::Plugins::ToolsWSDL ................. SUCCESS [4.825s]
[INFO] Savara::Tools::Plugins::ToolsBPEL ................. SUCCESS [7.263s]
[INFO] Savara::Tools::Plugins::ToolsValidator ............ SUCCESS [3.435s]
[INFO] Savara::Tools::Plugins::ToolsBPMN ................. SUCCESS [7.922s]
[INFO] Savara::Tools::Plugins::ToolsMonitor .............. SUCCESS [5.565s]
[INFO] Savara::Tools::Plugins::ScribbleConformance ....... SUCCESS [6.272s]
[INFO] Savara::Tools::Plugins::ScribbleConversationComparator SUCCESS [5.000s]
[INFO] Savara::Tools::Plugins::ScribbleConversationExportText SUCCESS [5.482s]
[INFO] Savara::Tools::Plugins::ScribbleConversationProjector SUCCESS [5.923s]
[INFO] Savara::Tools::Plugins::ScribbleConversationValidation SUCCESS [6.036s]
[INFO] Savara::Tools::Features ........................... SUCCESS [0.009s]
[INFO] Savara::Tools::Features::ScribbleProtocol ......... SUCCESS [4.221s]
[INFO] Savara::Tools::Features::SavaraTools .............. SUCCESS [5.280s]
[INFO] Savara::Tools::Tests .............................. SUCCESS [0.007s]
[INFO] Savara::Tools::Tests::ProtocolContract ............ FAILURE [1:39.326s]
[INFO] Savara::Tools::Tests::ToolsBPEL ................... FAILURE [13.677s]
[INFO] Savara::Tools::Tests::ToolsWSDL ................... FAILURE [13.782s]
[INFO] Savara::Tools::Site ............................... SUCCESS [5.835s]
[INFO] Savara::Docs ...................................... SUCCESS [5.856s]
[INFO] Savara::Docs::UserGuide ........................... SUCCESS [14:11.382s]
[INFO] Savara::Docs::GettingStartedGuide ................. SUCCESS [13:41.779s]
[INFO] Savara::Docs::SamplesGuide ........................ SUCCESS [14:43.850s]
[INFO] Savara::Distribution .............................. SUCCESS [21.006s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 57:32.472s
[INFO] Finished at: Fri Nov 12 15:25:00 EST 2010
[INFO] Final Memory: 248M/732M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.tycho:maven-osgi-test-plugin:0.10.0:test (default-test) on project org.jboss.savara.protocol.contract.tests: There are test failures.
[ERROR]
[ERROR] Please refer to <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/tools/tests/org.j...> for the individual test results.
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal org.sonatype.tycho:maven-osgi-test-plugin:0.10.0:test (default-test) on project org.jboss.savara.tools.bpel.tests: There are test failures.
[ERROR]
[ERROR] Please refer to <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/tools/tests/org.j...> for the individual test results.
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal org.sonatype.tycho:maven-osgi-test-plugin:0.10.0:test (default-test) on project org.jboss.savara.tools.wsdl.tests: There are test failures.
[ERROR]
[ERROR] Please refer to <http://hudson.qa.jboss.com/hudson/job/savara/ws/sources/tools/tests/org.j...> for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.jboss.savara.protocol.contract.tests
Terminating xvnc.
[savara] $ vncserver -kill :15
Killing Xvnc process ID 18574
Archiving artifacts
Recording test results
15 years, 5 months
Build failed in Hudson: savara-1.1.x #72
by jboss-qa-internal@redhat.com
See <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/72/changes>
Changes:
[nickboldt] use gbrown's suggested distributionManagement instead
[nickboldt] update input URL for savara
------------------------------------------
[...truncated 5863 lines...]
[INFO] artifact org.eclipse.equinox:registry: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:expressions: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:expressions: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:registry: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:registry: checking for updates from central
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:osgi: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:osgi: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact com.ibm:icu: checking for updates from jboss-deprecated
[INFO] artifact com.ibm:icu: checking for updates from jboss-developer-repository-group
[INFO] artifact com.ibm:icu: checking for updates from jboss-public-repository-group
[INFO] artifact com.ibm:icu: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse:text: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:text: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:text: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:text: checking for updates from central
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:commands: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:commands: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.equinox:common: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filebuffers: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse:text: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse:text: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse:text: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse:text: checking for updates from central
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:filesystem: checking for updates from central
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.wst.common:uriresolver: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.emf:common: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.emf:common: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact com.ibm:icu: checking for updates from jboss-deprecated
[INFO] artifact com.ibm:icu: checking for updates from jboss-developer-repository-group
[INFO] artifact com.ibm:icu: checking for updates from jboss-public-repository-group
[INFO] artifact com.ibm:icu: checking for updates from central
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:runtime: checking for updates from central
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-deprecated
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-developer-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from jboss-public-repository-group
[INFO] artifact org.eclipse.core:resources: checking for updates from central
[INFO] Expanding: <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/m2-repository/org/j...> into <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/docs/sample...>
[INFO]
[INFO] --- maven-jdocbook-plugin:2.2.3:generate (generate-docbook) @ samplesguide ---
[INFO] Processing en-US -> pdf
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/docs/sample...]>
[INFO] Processing en-US -> html
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/docs/sample...]>
[INFO] Processing en-US -> html_single
redirecting output to file [<http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/docs/sample...]>
[INFO]
[INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide >>>
[INFO]
[INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide <<<
[INFO]
[INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ samplesguide ---
[INFO] No sources in project. Archive not created.
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ samplesguide ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/docs/sample...> to <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/m2-repository/org/j...>
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/docs/sample...> to <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/m2-repository/org/j...>
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Savara::Distribution 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-source-plugi...
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-source-plugi... (632 B at 0.6 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (952 B at 0.8 KB/sec)
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plu...
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plu... (773 B at 0.7 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (1010 B at 0.9 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ distribution ---
[INFO] Deleting <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/distributio...>
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-2:single (bin) @ distribution ---
[INFO] Reading assembly descriptor: src/main/assembly/bin.xml
[INFO] Processing DependencySet (output=modules)
[WARNING] Cannot include project artifact: org.jboss.savara:distribution:pom:1.1.0-SNAPSHOT; it doesn't have an associated file or directory.
[INFO] Building zip: <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/72/artifact/sources/di...>
[WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.
Instead of attaching the assembly file: <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/distributio...,> it will become the file for main project artifact.
NOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-2:single (distribution-package-source) @ distribution ---
[INFO] Reading assembly descriptor: src/main/assembly/src.xml
[INFO] Building zip: <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/72/artifact/sources/di...>
[WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.
Instead of attaching the assembly file: <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/distributio...,> it will become the file for main project artifact.
NOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!
[WARNING] Replacing pre-existing project main-artifact file: <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/72/artifact/sources/di...>
with assembly file: <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/72/artifact/sources/di...>
[INFO]
[INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ distribution >>>
[INFO]
[INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ distribution <<<
[INFO]
[INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ distribution ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ distribution ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/distributio...> to <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/m2-repository/org/j...>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Savara ............................................ SUCCESS [4.883s]
[INFO] Savara::Validators ................................ SUCCESS [1.904s]
[INFO] Savara::Validators::JBoss ......................... SUCCESS [3.322s]
[INFO] Savara::Validators::JBoss::Common ................. SUCCESS [3:57.367s]
[INFO] Savara::Validators::JBoss::ESB .................... SUCCESS [3:23.595s]
[INFO] Savara::Validators::JBoss::WS-Native .............. SUCCESS [26.010s]
[INFO] Savara::Tools ..................................... SUCCESS [0.184s]
[INFO] Savara::Tools::Plugins ............................ SUCCESS [0.049s]
[INFO] Savara::Tools::Plugins::ScribbleCore .............. SUCCESS [17.115s]
[INFO] Savara::Tools::Plugins::ContractModel ............. SUCCESS [5.751s]
[INFO] Savara::Tools::Plugins::ScribbleConversationModel . SUCCESS [5.963s]
[INFO] Savara::Tools::Plugins::ScribbleConversationParser SUCCESS [6.016s]
[INFO] Savara::Tools::Plugins::ScribbleExpressionXPath ... SUCCESS [8.895s]
[INFO] Savara::Tools::Plugins::ScribbleEclipse ........... SUCCESS [6.168s]
[INFO] Savara::Tools::Plugins::Pi4SOACDM ................. SUCCESS [10.084s]
[INFO] Savara::Tools::Plugins::ProtocolContract .......... SUCCESS [5.562s]
[INFO] Savara::Tools::Plugins::ToolsTAPModel ............. SUCCESS [6.365s]
[INFO] Savara::Tools::Plugins::ToolsTAPValidation ........ SUCCESS [5.245s]
[INFO] Savara::Tools::Plugins::ToolsTAPValidation ........ SUCCESS [5.560s]
[INFO] Savara::Tools::Plugins::ScribbleLangModel ......... SUCCESS [7.913s]
[INFO] Savara::Tools::Plugins::ToolsWSDL ................. SUCCESS [6.227s]
[INFO] Savara::Tools::Plugins::ToolsBPEL ................. SUCCESS [12.066s]
[INFO] Savara::Tools::Plugins::ToolsValidator ............ SUCCESS [5.428s]
[INFO] Savara::Tools::Plugins::ToolsBPMN ................. SUCCESS [7.923s]
[INFO] Savara::Tools::Plugins::ToolsMonitor .............. SUCCESS [8.001s]
[INFO] Savara::Tools::Plugins::ScribbleConformance ....... SUCCESS [6.988s]
[INFO] Savara::Tools::Plugins::ScribbleConversationComparator SUCCESS [9.231s]
[INFO] Savara::Tools::Plugins::ScribbleConversationExportText SUCCESS [6.695s]
[INFO] Savara::Tools::Plugins::ScribbleConversationProjector SUCCESS [6.971s]
[INFO] Savara::Tools::Plugins::ScribbleConversationValidation SUCCESS [9.221s]
[INFO] Savara::Tools::Features ........................... SUCCESS [0.043s]
[INFO] Savara::Tools::Features::ScribbleProtocol ......... SUCCESS [8.314s]
[INFO] Savara::Tools::Features::SavaraTools .............. SUCCESS [4.382s]
[INFO] Savara::Tools::Tests .............................. SUCCESS [0.055s]
[INFO] Savara::Tools::Tests::ProtocolContract ............ FAILURE [32.113s]
[INFO] Savara::Tools::Tests::ToolsWSDL ................... FAILURE [24.327s]
[INFO] Savara::Tools::Site ............................... SUCCESS [14.171s]
[INFO] Savara::Docs ...................................... SUCCESS [3.937s]
[INFO] Savara::Docs::UserGuide ........................... SUCCESS [15:09.381s]
[INFO] Savara::Docs::GettingStartedGuide ................. SUCCESS [13:48.915s]
[INFO] Savara::Docs::SamplesGuide ........................ SUCCESS [11:54.987s]
[INFO] Savara::Distribution .............................. SUCCESS [36.312s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 55:57.500s
[INFO] Finished at: Fri Nov 12 16:43:29 EST 2010
[INFO] Final Memory: 156M/495M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.tycho:maven-osgi-test-plugin:0.10.0:test (default-test) on project org.jboss.savara.protocol.contract.tests: There are test failures.
[ERROR]
[ERROR] Please refer to <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/tools/tests...> for the individual test results.
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal org.sonatype.tycho:maven-osgi-test-plugin:0.10.0:test (default-test) on project org.jboss.savara.tools.wsdl.tests: There are test failures.
[ERROR]
[ERROR] Please refer to <http://hudson.qa.jboss.com/hudson/job/savara-1.1.x/ws/sources/tools/tests...> for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.jboss.savara.protocol.contract.tests
Terminating xvnc.
[savara-1.1.x] $ vncserver -kill :31
Killing Xvnc process ID 27062
Archiving artifacts
Recording test results
15 years, 5 months
Build failed in Hudson: pi4soa-3.1.x #33
by jboss-qa-internal@redhat.com
See <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/33/changes>
Changes:
[nickboldt] use gbrown's suggested distributionManagement instead
[nickboldt] update input URL for savara
------------------------------------------
[...truncated 502 lines...]
[INFO] ------------------------------------------------------------------------
[INFO] Building org.pi4soa.core.feature 3.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plug...
Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/... (515 B at 1.1 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plug... (503 B at 0.6 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (703 B at 0.7 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugi...
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/...
Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/... (474 B at 0.8 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugi... (556 B at 0.6 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (718 B at 0.8 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ org.pi4soa.core.feature ---
[INFO] Deleting <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....>
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:build-qualifier (default-build-qualifier) @ org.pi4soa.core.feature ---
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:validate-version (default-validate-version) @ org.pi4soa.core.feature ---
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:package-feature (default-package-feature) @ org.pi4soa.core.feature ---
[INFO] Building jar: <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....>
[INFO]
[INFO] --- tycho-p2-plugin:0.10.0:p2-metadata (default-p2-metadata) @ org.pi4soa.core.feature ---
[INFO]
[INFO] --- tycho-p2-plugin:0.10.0:feature-p2-metadata (default-feature-p2-metadata) @ org.pi4soa.core.feature ---
[WARNING] <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> does not exist or is not a directory
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ org.pi4soa.core.feature ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/j...>
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/j...>
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/j...>
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/j...>
[INFO]
[INFO] --- tycho-p2-plugin:0.10.0:update-local-index (default-update-local-index) @ org.pi4soa.core.feature ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building org.pi4soa.common.tests 3.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plug...
Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/... (515 B at 1.1 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (703 B at 1.0 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plug... (503 B at 0.2 KB/sec)
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/...
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-pl...
Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/... (485 B at 1.0 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (800 B at 1.0 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-pl... (632 B at 0.4 KB/sec)
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugi...
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/...
Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/... (474 B at 1.1 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (718 B at 1.0 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugi... (556 B at 0.4 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ org.pi4soa.common.tests ---
[INFO] Deleting <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....>
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:build-qualifier (default-build-qualifier) @ org.pi4soa.common.tests ---
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:validate-version (default-validate-version) @ org.pi4soa.common.tests ---
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.pi4soa.common.tests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....>
[INFO]
[INFO] --- maven-osgi-compiler-plugin:0.10.0:compile (default-compile) @ org.pi4soa.common.tests ---
[INFO] Using compile source roots from build.properties
[INFO] Compiling 26 source files to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....>
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ org.pi4soa.common.tests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....>
[INFO]
[INFO] --- maven-osgi-compiler-plugin:0.10.0:testCompile (default-testCompile) @ org.pi4soa.common.tests ---
[INFO] Using compile source roots from build.properties
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:package-plugin (default-package-plugin) @ org.pi4soa.common.tests ---
[INFO] Building jar: <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....>
[INFO]
[INFO] --- tycho-p2-plugin:0.10.0:p2-metadata (default-p2-metadata) @ org.pi4soa.common.tests ---
[INFO]
[INFO] --- maven-osgi-test-plugin:0.10.0:test (default-test) @ org.pi4soa.common.tests ---
[INFO] Adding repository (cached) http://download.jboss.org/jbosstools/updates/nightly/trunk/
[INFO] Adding repository (cached) http://download.jboss.org/jbosstools/builds/staging/jbosstools-tests/all/...
[INFO] Adding repository (cached) file://home/hudson/static_build_env/jbds/target-platform/e361-wtp322.target/
[INFO] Expected eclipse log file: <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....>
[INFO] Command line:
/bin/sh -c cd <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> && /qa/tools/opt/x86_64/jdk1.6.0_20/jre/bin/java -Dosgi.noShutdown=false -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m
-Dusage_reporting_enabled=false -jar <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/p2/os...> -data <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> -dev <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> -install <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> -configuration <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> -application org.sonatype.tycho.surefire.osgibooter.uitest -testproperties <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> -testApplication org.eclipse.ui.ide.workbench -product org.eclipse.sdk.ide
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
/bin/sh: line 1: -Dusage_reporting_enabled=false: command not found
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping org.pi4soa.cdl.tests
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping org.pi4soa.service.tests
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping org.pi4soa.tests.feature
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building org.pi4soa.site 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plug...
Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/... (515 B at 1.0 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (703 B at 0.9 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plug... (503 B at 0.3 KB/sec)
Downloading: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma...
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugi...
Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/... (474 B at 1.0 KB/sec)
Downloaded: https://repository.jboss.org/nexus/content/groups/developer/org/apache/ma... (718 B at 0.9 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugi... (556 B at 0.4 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ org.pi4soa.site ---
[INFO] Deleting <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/target>
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:build-qualifier (default-build-qualifier) @ org.pi4soa.site ---
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:update-site (default-update-site) @ org.pi4soa.site ---
[INFO]
[INFO] --- tycho-p2-plugin:0.10.0:update-site-p2-metadata (default-update-site-p2-metadata) @ org.pi4soa.site ---
[INFO] Command line:
/bin/sh -c cd <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site> && /qa/tools/opt/x86_64/jdk1.6.0_20/jre/bin/java -jar <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/s...> -nosplash -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -source <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/target...> -metadataRepository <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/target...> -metadataRepositoryName org.pi4soa.site -artifactRepository <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/target...> -artifactRepositoryName 'org.pi4soa.site Artifacts' -noDefaultIUs -compress
Generating metadata for ..
Generation completed with success [0 seconds].
[INFO]
[INFO] --- maven-osgi-packaging-plugin:0.10.0:update-site-packaging (default-update-site-packaging) @ org.pi4soa.site ---
[INFO] Building zip: <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/target...>
[INFO] Building zip: <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/target...>
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ org.pi4soa.site ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/target...> to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/j...>
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/pom.xml> to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/j...>
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/site/target...> to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/j...>
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building org.pi4soa 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ org.pi4soa ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ org.pi4soa ---
[INFO] Installing <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/pom.xml> to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/m2-repository/org/j...>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] org.pi4soa.common ................................. SUCCESS [12.941s]
[INFO] org.pi4soa.cdl .................................... SUCCESS [11.469s]
[INFO] org.pi4soa.service ................................ SUCCESS [10.014s]
[INFO] org.pi4soa.designer ............................... SUCCESS [8.489s]
[INFO] org.pi4soa.scenario ............................... SUCCESS [10.875s]
[INFO] org.pi4soa.scenario.designer ...................... SUCCESS [6.091s]
[INFO] org.pi4soa.core.feature ........................... SUCCESS [2.846s]
[INFO] org.pi4soa.common.tests ........................... FAILURE [12.998s]
[INFO] org.pi4soa.cdl.tests .............................. SKIPPED
[INFO] org.pi4soa.service.tests .......................... SKIPPED
[INFO] org.pi4soa.tests.feature .......................... SKIPPED
[INFO] org.pi4soa.site ................................... SUCCESS [7.315s]
[INFO] org.pi4soa ........................................ SUCCESS [0.094s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:45.310s
[INFO] Finished at: Fri Nov 12 15:48:39 EST 2010
[INFO] Final Memory: 105M/581M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.tycho:maven-osgi-test-plugin:0.10.0:test (default-test) on project org.pi4soa.common.tests: There are test failures.
[ERROR]
[ERROR] Please refer to <http://hudson.qa.jboss.com/hudson/job/pi4soa-3.1.x/ws/sources/org.pi4soa....> for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.pi4soa.common.tests
Terminating xvnc.
[pi4soa-3.1.x] $ vncserver -kill :29
Killing Xvnc process ID 6733
Archiving artifacts
Recording test results
15 years, 5 months
savara SVN: r465 - in trunk/tools: plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component and 24 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-11-12 14:20:56 -0500 (Fri, 12 Nov 2010)
New Revision: 465
Added:
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/.classpath
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/.project
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/META-INF/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/META-INF/MANIFEST.MF
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/build.properties
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/pom.xml
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/GeneratorTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Broker.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Buyer.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)CreditAgency.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Supplier.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierQuoteEngine.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierTxnProcessor.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Buyer.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)CreditAgency.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Store.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Buyer.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Seller.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/PurchaseGoods.cdm
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/change/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteractionTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/BPELActivityTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/BPELElementTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CatchAllTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CatchTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CompensationHandlerTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ConditionTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ElseIfTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ElseTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/EventHandlersTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ExitTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/FaultHandlersTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/FlowTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ForEachTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/IfTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/InvokeTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnAlarmTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnEventTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnMessageTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/PartnerLinkTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/PickTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ProcessTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ReceiveTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/RepeatUntilTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ReplyTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/RethrowTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ScopeTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/SequenceTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TerminationHandlerTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestAbstractInteraction.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestBPELActivity.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestBPELElement.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ThrowTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/VariableTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/WaitTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/WhileTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/util/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/util/InteractionUtilTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/ParserTest.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)Broker.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)Buyer.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)CreditAgency.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)SupplierQuoteEngine.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)SupplierTxnProcessor.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/LoanApprovalService(a)Service.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)Buyer.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)CreditAgency.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)Store.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ReqRespFault(a)Buyer.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ReqRespFault(a)Seller.scv
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/LoanApprovalService(a)Service.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/AllTests.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/osgi/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/osgi/Activator.java
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/util/
trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/util/XMLUtilsTest.java
Modified:
trunk/tools/plugins/org.jboss.savara.tools.bpel/META-INF/MANIFEST.MF
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/BPELElement.java
trunk/tools/tests/org.jboss.savara.tools.wsdl.tests/META-INF/MANIFEST.MF
trunk/tools/tests/pom.xml
Log:
Enabled BPEL generator tests in the Tycho build, but parser tests are throwing exceptions under Tycho currently (SAVARA-151).
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/META-INF/MANIFEST.MF 2010-11-12 12:21:09 UTC (rev 464)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/META-INF/MANIFEST.MF 2010-11-12 19:20:56 UTC (rev 465)
@@ -38,3 +38,7 @@
org.jboss.savara.tools.bpel.model.change.SpawnModelChangeRule,
org.jboss.savara.tools.bpel.model.change.ConversationInteractionModelChangeRule,
org.jboss.savara.tools.bpel.editor.BPELEditorManager
+Export-Package: org.jboss.savara.tools.bpel.model;x-friends:="org.jboss.savara.tools.bpel.tests",
+ org.jboss.savara.tools.bpel.model.change;x-friends:="org.jboss.savara.tools.bpel.tests",
+ org.jboss.savara.tools.bpel.model.component;x-friends:="org.jboss.savara.tools.bpel.tests",
+ org.jboss.savara.tools.bpel.util;x-friends:="org.jboss.savara.tools.bpel.tests"
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/BPELElement.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/BPELElement.java 2010-11-12 12:21:09 UTC (rev 464)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/BPELElement.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -157,7 +157,7 @@
* @param name The name
* @return The element, or null if not found
*/
- protected org.w3c.dom.Element findChildElement(String name) {
+ public org.w3c.dom.Element findChildElement(String name) {
org.w3c.dom.Element ret=null;
org.w3c.dom.NodeList nl=getDOMElement().getChildNodes();
@@ -181,7 +181,7 @@
*
* @return The child BPEL activity, or null if not found
*/
- protected BPELActivity findChildActivity() {
+ public BPELActivity findChildActivity() {
BPELActivity ret=null;
org.w3c.dom.NodeList nl=getDOMElement().getChildNodes();
@@ -210,7 +210,7 @@
* @return The list of child elements of the type specified
* by the supplied class
*/
- protected java.util.List<BPELElement> findChildElements(Class<? extends BPELElement> cls) {
+ public java.util.List<BPELElement> findChildElements(Class<? extends BPELElement> cls) {
return(findChildElements(getDOMElement(), cls));
}
@@ -223,7 +223,7 @@
* @return The list of child elements of the type specified
* by the supplied class
*/
- protected java.util.List<BPELElement> findChildElements(org.w3c.dom.Element root,
+ public java.util.List<BPELElement> findChildElements(org.w3c.dom.Element root,
Class<? extends BPELElement> cls) {
java.util.List<BPELElement> ret=new java.util.Vector<BPELElement>();
@@ -262,7 +262,7 @@
* @param newelem The new element
* @param insertBefore Optional location to insert new element
*/
- protected void setChildElement(org.w3c.dom.Element existing,
+ public void setChildElement(org.w3c.dom.Element existing,
BPELElement newelem, org.w3c.dom.Node insertBefore) {
setChildElement(getDOMElement(), existing, newelem, insertBefore);
@@ -286,7 +286,7 @@
* @param newelem The new element
* @param insertBefore Optional location to insert new element
*/
- protected void setChildElement(org.w3c.dom.Element root,
+ public void setChildElement(org.w3c.dom.Element root,
org.w3c.dom.Element existing,
BPELElement newelem, org.w3c.dom.Node insertBefore) {
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/.classpath
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/.classpath (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/.classpath 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/.project
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/.project (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/.project 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.savara.tools.bpel.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/META-INF/MANIFEST.MF (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/META-INF/MANIFEST.MF 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Boss SAVARA Tools BPEL Tests Plug-in
+Bundle-SymbolicName: org.jboss.savara.tools.bpel.tests
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.jboss.savara.tools.bpel.tests.osgi.Activator
+Bundle-Vendor: www.jboss.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.osgi.framework
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.scribble.conversation.model;bundle-version="[1.0.0,2.0.0)",
+ org.scribble.core;bundle-version="[1.0.0,2.0.0)",
+ org.scribble.lang.model;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.core.resources,
+ org.scribble.eclipse;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jdt.core,
+ org.junit,
+ org.scribble.conversation.parser;bundle-version="[1.0.0,2.0.0)",
+ org.apache.commons.logging,
+ org.scribble.expression.xpath;bundle-version="[1.0.0,2.0.0)",
+ org.jboss.savara.pi4soa.cdm;resolution:=optional,
+ org.jboss.savara.tools.bpel,
+ org.jboss.savara.contract.model,
+ org.jboss.savara.tools.wsdl,
+ org.eclipse.ui.ide,
+ org.eclipse.jst.common.frameworks,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.common.project.facet.core,
+ org.scribble.conversation.projector;bundle-version="[1.0.0,2.0.0)"
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/build.properties
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/build.properties (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/build.properties 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,12 @@
+source.. = src/java/
+output.. = classes/
+bin.includes = META-INF/,\
+ .,\
+ test.xml
+src.includes = test.xml,\
+ src/,\
+ build.properties,\
+ META-INF/,\
+ .settings/,\
+ .project,\
+ .classpath
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/pom.xml
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/pom.xml (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/pom.xml 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,16 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.savara.tools</groupId>
+ <artifactId>org.jboss.savara.tools.bpel.tests</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+ <name>Savara::Tools::Tests::ToolsBPEL</name>
+
+ <parent>
+ <groupId>org.jboss.savara.tools</groupId>
+ <artifactId>tests</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+
+</project>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/GeneratorTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/GeneratorTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/GeneratorTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,312 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.generator;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import org.jboss.savara.tools.bpel.model.BPELNotation;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.util.XMLUtils;
+import org.jboss.savara.pi4soa.cdm.model.CDMNotation;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.Definition;
+import org.scribble.model.ModelReference;
+import org.scribble.model.SubDefinitionPath;
+import org.scribble.model.change.ModelGenerator;
+
+public class GeneratorTest {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Choreography->BPEL Generator Tests");
+
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker", "Broker"));
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker", "Buyer"));
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker", "CreditAgency"));
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker",
+ new SubDefinitionPath(new String[]{"CompleteTransaction"}),
+ "SupplierTxnProcessor"));
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker",
+ new SubDefinitionPath(new String[]{"RequestForQuote"}),
+ "SupplierQuoteEngine"));
+ suite.addTest(new ChoreographyToBPELTester("PurchaseGoods", "Buyer"));
+ suite.addTest(new ChoreographyToBPELTester("PurchaseGoods", "CreditAgency"));
+ suite.addTest(new ChoreographyToBPELTester("PurchaseGoods", "Store"));
+ suite.addTest(new ChoreographyToBPELTester("ReqRespFault", "Buyer"));
+ suite.addTest(new ChoreographyToBPELTester("ReqRespFault", "Seller"));
+
+ return suite;
+ }
+
+ public static class ChoreographyToBPELTester extends TestCase {
+
+ /**
+ * This constructor is initialized with the test
+ * name.
+ *
+ * @param name The test name
+ * @param role The role
+ */
+ public ChoreographyToBPELTester(String name,
+ String role) {
+ super(name+"@"+role);
+ m_name = name;
+ m_role = role;
+ }
+
+ /**
+ * This constructor is initialized with the test
+ * name.
+ *
+ * @param name The test name
+ * @param role The role
+ */
+ public ChoreographyToBPELTester(String name,
+ SubDefinitionPath sdp, String role) {
+ super(name+sdp.toString()+"@"+role);
+ m_name = name;
+ m_subDefinitionPath = sdp;
+ m_role = role;
+ }
+
+ /**
+ * This method runs the test.
+ *
+ * @param result The test result
+ */
+ public void run(TestResult result) {
+ result.startTest(this);
+
+ String filename="testmodels/"+m_name+".cdm";
+
+ java.io.InputStream is=
+ ChoreographyToBPELTester.class.getResourceAsStream(filename);
+
+ if (is == null) {
+ result.addError(this,
+ new Throwable("Unable to locate resource: "+filename));
+ } else {
+ org.scribble.parser.Parser p=new org.scribble.parser.DefaultParser();
+ org.scribble.model.ModelReference ref=
+ new org.scribble.model.ModelReference(CDMNotation.NOTATION_CODE);
+ org.scribble.model.admin.DefaultModelListener l=
+ new org.scribble.model.admin.DefaultModelListener();
+
+ org.scribble.model.Model model=p.parse(ref, is, l, null);
+
+ if (model == null) {
+ result.addError(this, new Throwable("Model is null"));
+ } else {
+ org.scribble.projector.Projector projector=
+ new org.scribble.projector.DefaultProjector();
+
+ org.scribble.model.Role role=null;
+
+ // Obtain role from definition
+ java.util.List<Definition> defns=model.getDefinitions();
+ Definition defn=null;
+
+ if (defns.size() == 1) {
+ defn = defns.get(0);
+ }
+
+ // Check if subpath definition defined
+ if (m_subDefinitionPath != null) {
+ defn = defn.getSubDefinition(m_subDefinitionPath);
+ }
+
+ java.util.List<org.scribble.model.Role> roles=defn.getRoles();
+ //new org.scribble.model.Role(m_role);
+
+ for (int i=0; role == null && i < roles.size(); i++) {
+ if (roles.get(i).getName().equals(m_role)) {
+ role = roles.get(i);
+ }
+ }
+
+ if (role == null) {
+ result.addError(this,
+ new Throwable("Role '"+m_role+"' not found"));
+ } else {
+ org.scribble.model.Model projected=
+ projector.project(ref, model,
+ m_subDefinitionPath, role, l);
+
+ /* Currently if a 'fail' is performed in Tycho build, it
+ * hangs the build.
+ if (l.getErrors().size() > 0) {
+ fail("Projection has errors: "+l.getErrors());
+ } else if (projected == null) {
+ fail("Projected model is null, for "+filename+" role "+role);
+ }
+ */
+
+ ModelGenerator generator=(ModelGenerator)
+ RegistryFactory.getRegistry().getExtension(
+ ModelGenerator.class, null);
+
+ defns = projected.getDefinitions();
+ defn = null;
+
+ if (defns.size() == 1) {
+ defn = defns.get(0);
+ }
+
+ if (generator != null && defn != null) {
+ ModelReference targetRef=
+ new ModelReference(BPELNotation.NOTATION_CODE);
+ targetRef.setAlias(m_name);
+ targetRef.setLocatedRole(m_role);
+
+ DefaultBPELLanguageModel target=
+ new DefaultBPELLanguageModel(targetRef);
+
+ generator.generate(targetRef, role,
+ target, projected);
+
+ if (target.getBPELProcess().getDOMElement() != null) {
+ try {
+ String text=XMLUtils.toText(target.getBPELProcess().getDOMElement());
+ checkResults(result, text);
+ } catch(Exception e) {
+ result.addError(this, e);
+ }
+ } else {
+ result.addError(this,
+ new Throwable("No BPEL generated"));
+ }
+
+ } else {
+ result.addError(this,
+ new Throwable("Unable to find Model Generator"));
+ }
+ }
+ }
+ }
+
+ result.endTest(this);
+ }
+
+ /**
+ * This method checks the generated BPEL against a
+ * previously stored correct version.
+ *
+ * @param result The test result
+ * @param bpel The BPEL
+ */
+ protected void checkResults(TestResult result, String bpel) {
+ boolean f_valid=false;
+
+ String filename="results/"+m_name+"@"+m_role+".bpel";
+
+ java.io.InputStream is=
+ ChoreographyToBPELTester.class.getResourceAsStream(filename);
+
+ if (is != null) {
+
+ try {
+ byte[] b=new byte[is.available()];
+
+ is.read(b);
+
+ is.close();
+
+ String orig=new String(b);
+
+ if (orig.equals(bpel) == false) {
+ result.addError(this,
+ new Throwable("Generated Conversation does not match stored version"));
+ } else {
+ f_valid = true;
+ }
+ } catch(Exception e) {
+ result.addError(this, e);
+ }
+ } else {
+ result.addError(this,
+ new Throwable("Resulting BPEL '"+filename+
+ "' not found for comparison"));
+ }
+
+ if (f_valid == false) {
+ String bpelfile="testmodels/"+m_name+".cdm";
+
+ java.net.URL url=ChoreographyToBPELTester.class.getResource(bpelfile);
+
+ try {
+ url = org.eclipse.core.runtime.FileLocator.toFileURL(url);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ if (url != null) {
+ // URL will point to copy of test models in the classes folder, so need
+ // to obtain reference back to source version
+ java.io.File f=null;
+
+ if (url.getFile().indexOf("classes") != -1) {
+ f = new java.io.File(url.getFile().replaceFirst("classes","src/plugintest"));
+ } else if (url.getFile().indexOf("bin") != -1) {
+ f = new java.io.File(url.getFile().replaceFirst("bin","src/plugintest"));
+ } else {
+ result.addError(this, new Exception("Could not locate results folder to record expected result"));
+ }
+
+ if (f != null && f.exists()) {
+ f = f.getParentFile().getParentFile();
+
+ java.io.File resultsDir=new java.io.File(f, "results");
+
+ if (resultsDir.exists() == false) {
+ resultsDir.mkdirs();
+ }
+
+ java.io.File resultFile=new java.io.File(resultsDir,
+ m_name+"@"+m_role+".expected");
+
+ if (resultFile.exists() == false) {
+ try {
+ java.io.FileOutputStream fos=new java.io.FileOutputStream(resultFile);
+
+ fos.write(bpel.getBytes());
+
+ fos.flush();
+ fos.close();
+
+ } catch(Exception e){
+ result.addError(this, e);
+ }
+ } else {
+ System.err.println("NOTE: Expected output '"+resultFile+
+ "' already exists - not being overwritten");
+ }
+ } else {
+ result.addError(this, new Throwable("Unable to obtain URL for CDM model source '"+
+ m_name+"': "+url));
+ }
+ }
+ }
+ }
+
+ private String m_name=null;
+ private SubDefinitionPath m_subDefinitionPath=null;
+ private String m_role=null;
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Broker.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Broker.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Broker.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,66 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BrokerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <partnerLinks>
+ <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="brk:BuyerToBrokerServiceLT"/>
+ <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="brk:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
+ <partnerLink name="BrokerToCreditAgency" partnerLinkType="brk:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+ <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="brk:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+ <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+ <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+ <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+ <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+ <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+ <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+ <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+ <variable messageType="brk:rejectedFault" name="rejectedFaultVar"/>
+ <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryRequestVar"/>
+ <while>
+ <sequence>
+ <scope>
+ <sequence>
+ <invoke inputVariable="getQuoteRequestVar" name="Send_requestForQuote" operation="getQuote" outputVariable="getQuoteResponseVar" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </while>
+ <reply name="Send_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
+ <pick>
+ <onMessage operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyRequestVar">
+ <sequence>
+ <scope>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="cay:invalidCreditFault" faultName="cay:invalidCredit" faultVariable="invalidCreditFaultVar">
+ <sequence>
+ <reply faultName="brk:rejected" name="Send_orderRejected" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="rejectedFaultVar"/>
+ </sequence>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior"/>
+ <invoke inputVariable="confirmRequestVar" name="Send_orderConfirmed" operation="confirm" outputVariable="confirmResponseVar" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior"/>
+ <reply name="Send_bookingReference" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyResponseVar"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </scope>
+ </sequence>
+ </onMessage>
+ <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="cancelRequestVar">
+ <sequence/>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Buyer.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Buyer.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Buyer.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,43 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
+ <partnerLinks>
+ <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="byr:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+ <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+ <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+ <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+ <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
+ </variables>
+ <sequence>
+ <invoke inputVariable="makeEnquiryRequestVar" name="Send_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ <receive name="Receive_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
+ <if>
+ <sequence>
+ <scope>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="brk:rejectedFault" faultName="brk:rejected" faultVariable="rejectedFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="buyRequestVar" name="Send_buy" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </scope>
+ </sequence>
+ <else>
+ <sequence>
+ <invoke inputVariable="cancelRequestVar" name="Send_cancel" operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)CreditAgency.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)CreditAgency.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)CreditAgency.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,36 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common@CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgencyArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <partnerLinks>
+ <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="cay:BrokerToCreditAgencyServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="cay:invalidCreditFault" name="invalidCreditFaultVar"/>
+ </variables>
+ <sequence>
+ <pick>
+ <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditRequestVar">
+ <sequence>
+ <scope>
+ <sequence>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="cay:invalidCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="invalidCreditFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+ </scope>
+ </sequence>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Supplier.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Supplier.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Supplier.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,3 @@
+<process name="ESBBrokerProcess_Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <sequence/>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierQuoteEngine.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierQuoteEngine.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierQuoteEngine.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,15 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngineArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <partnerLinks>
+ <partnerLink myRole="SupplierBehavior" name="BrokerToSupplierQuoteEngine" partnerLinkType="spr:BrokerToSupplierQuoteEngineServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+ <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_requestForQuote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteRequestVar"/>
+ <reply name="Send_quote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteResponseVar"/>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierTxnProcessor.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierTxnProcessor.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierTxnProcessor.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,20 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <partnerLinks>
+ <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="spr:BrokerToSupplierTxnProcessorServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+ <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+ </variables>
+ <sequence>
+ <pick createInstance="yes">
+ <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmRequestVar">
+ <sequence>
+ <reply name="Send_bookingReference" operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmResponseVar"/>
+ </sequence>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Buyer.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Buyer.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Buyer.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,24 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Purchasing@Buyer" name="PurchaseGoodsProcess_Buyer" targetNamespace="http://www.jboss.org/savara/examples" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_BuyerArtifacts.wsdl" namespace="http://www.jboss.org/savara/examples"/>
+ <partnerLinks>
+ <partnerLink name="BuyerToStore" partnerLinkType="tns:BuyerToStoreLT" partnerRole="StoreRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="sto:buyRequest" name="buyRequestVar"/>
+ <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+ </variables>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="sto:BuyFailedFault" faultName="sto:BuyFailed" faultVariable="BuyFailedFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="buyRequestVar" name="Send_BuyRequest" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToStore" portType="sto:StoreInterface"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)CreditAgency.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)CreditAgency.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)CreditAgency.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,26 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Common@CreditAgency" name="PurchaseGoodsProcess_CreditAgency" targetNamespace="java:org.jboss.savara.examples.purchasing" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <partnerLinks>
+ <partnerLink myRole="CreditAgencyInterface" name="StoreToCreditAgency" partnerLinkType="pur:StoreToCreditAgencyServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="pur:CreditCheckFailedFault" name="CreditCheckFailedFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditRequestVar"/>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="pur:CreditCheckFailed" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="CreditCheckFailedFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Store.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Store.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Store.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,32 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Purchasing@Store" name="PurchaseGoodsProcess_Store" targetNamespace="http://www.jboss.org/examples/store" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_StoreArtifacts.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <partnerLinks>
+ <partnerLink myRole="StoreInterface" name="BuyerToStore" partnerLinkType="sto:BuyerToStoreServiceLT"/>
+ <partnerLink name="StoreToCreditAgency" partnerLinkType="sto:StoreToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="sto:buyRequest" name="buyRequestVar"/>
+ <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+ <variable messageType="sto:BuyFailedFault" name="BuyFailedFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_BuyRequest" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyRequestVar"/>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="pur:CreditCheckFailedFault" faultName="pur:CreditCheckFailed" faultVariable="CreditCheckFailedFaultVar">
+ <sequence>
+ <reply faultName="sto:BuyFailed" name="Send_BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="BuyFailedFaultVar"/>
+ </sequence>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface"/>
+ <reply name="Send_BuyConfirmed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyResponseVar"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Buyer.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Buyer.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Buyer.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,23 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+ <partnerLinks>
+ <partnerLink name="BuyerToSeller" partnerLinkType="byr:BuyerToSellerLT" partnerRole="SellerRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+ </variables>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="slr:insufficientCreditFault" faultName="slr:insufficientCredit" faultVariable="insufficientCreditFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BuyerToSeller" portType="slr:SellerBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Seller.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Seller.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Seller.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,25 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess@Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_SellerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <partnerLinks>
+ <partnerLink myRole="SellerBehavior" name="BuyerToSeller" partnerLinkType="slr:BuyerToSellerServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="slr:insufficientCreditFault" name="insufficientCreditFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditRequestVar"/>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="slr:insufficientCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="insufficientCreditFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ESBBroker" name="ESBBroker" author="gary" version="0.2" targetNamespace="http://www.pi4soa.org/ESBBroker">
+ <typeDefinitions>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="tns" uRI="http://www.pi4soa.org/ESBBroker"/>
+ <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="brk" uRI="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="byr" uRI="http://www.pi4soa.org/ESBBroker/Buyer"/>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="cay" uRI="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="spr" uRI="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <informationTypes description="This is the information type BookingReference" name="BookingReference" elementName="bookingReference"/>
+ <informationTypes description="This is the information type Buy" name="Buy" elementName="buy"/>
+ <informationTypes description="This is the information type Cancel" name="Cancel" elementName="cancel"/>
+ <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
+ <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
+ <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
+ <informationTypes description="This is the information type Enquiry" name="Enquiry" typeName="" elementName="enquiry"/>
+ <informationTypes description="This is the information type OrderConfirmed" name="OrderConfirmed" elementName="orderConfirmed"/>
+ <informationTypes description="This is the information type OrderRejected" name="OrderRejected" elementName="orderRejected"/>
+ <informationTypes description="This is the information type Quote" name="Quote" elementName="quote"/>
+ <informationTypes description="This is the information type QuoteList" name="QuoteList" elementName="quoteList"/>
+ <informationTypes description="This is the information type RequestForQuote" name="RequestForQuote" elementName="requestForQuote"/>
+ <informationTypes description="This is the information type URIType" name="URIType"/>
+ <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/(a)informationTypes.12"/>
+ <roleTypes description="This is the role type Broker" name="Broker">
+ <behaviors description="This is the behavior BrokerBehavior" name="BrokerBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type Buyer" name="Buyer">
+ <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type CreditAgency" name="CreditAgency">
+ <behaviors description="This is the behavior CreditAgencyBehavior" name="CreditAgencyBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type Supplier" name="Supplier">
+ <behaviors description="This is the behavior SupplierBehavior" name="SupplierBehavior"/>
+ </roleTypes>
+ <relationshipTypes description="Relationship between Broker and CreditAgency" name="BrokerToCreditAgencyRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.2"/>
+ <relationshipTypes description="Relationship between Broker and Supplier" name="BrokerToSupplierRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.3"/>
+ <relationshipTypes description="Relationship between Buyer and Broker" name="BuyerToBrokerRel" firstRoleType="//@typeDefinitions/(a)roleTypes.1" secondRoleType="//@typeDefinitions/(a)roleTypes.0"/>
+ <participantTypes description="This is the participant type brk:Broker" name="brk:Broker" roleTypes="//@typeDefinitions/(a)roleTypes.0">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Broker" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type byr:Buyer" name="byr:Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.1">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Buyer" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type cay:CreditAgency" name="cay:CreditAgency" roleTypes="//@typeDefinitions/(a)roleTypes.2">
+ <semanticAnnotations annotation="overlord.cdl.samples.Common@CreditAgency" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type spr:Supplier" name="spr:Supplier" roleTypes="//@typeDefinitions/(a)roleTypes.3">
+ <semanticAnnotations annotation="" name="conversationType"/>
+ </participantTypes>
+ <channelTypes description="This is the channel type BrokerChannelType" name="BrokerChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.0"/>
+ <channelTypes description="This is the channel type CreditAgencyChannelType" name="CreditAgencyChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.2"/>
+ <channelTypes description="This is the channel type SupplierChannelType" name="SupplierChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.3"/>
+ </typeDefinitions>
+ <choreographies description="Choreography flow for the ESBBroker process" name="ESBBrokerProcess" root="true">
+ <enclosedChoreographies name="CompleteTransaction">
+ <participantDefinitions name="SupplierTxnProcessor" roleTypes="//@typeDefinitions/(a)roleTypes.3">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="conversationType"/>
+ </participantDefinitions>
+ <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" free="true" roleTypes="//@typeDefinitions/(a)roleTypes.0 //@typeDefinitions/(a)roleTypes.1"/>
+ <variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/(a)channelTypes.1"/>
+ <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/(a)channelTypes.2"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Buy" name="BuyRequestExchange" type="//@typeDefinitions/(a)informationTypes.1"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCredit" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CheckCredit" name="CheckCreditRequestExchange" type="//@typeDefinitions/(a)informationTypes.3"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Choice" description="Evaluate Credit Check Result">
+ <activities xsi:type="org.pi4soa.cdl:Sequence" description="Sufficient Credit">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditResponse" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditResponse" name="CheckCreditResponseRespondExchange" type="//@typeDefinitions/(a)informationTypes.5" action="Respond"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="ConfirmBooking" operation="confirm" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.2" relationship="//@typeDefinitions/(a)relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.0/(a)participantDefinitions.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/(a)informationTypes.7"/>
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/(a)informationTypes.0" action="Respond"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/(a)informationTypes.0" action="Respond" faultName=""/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Sequence" description="Insufficient Credit">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditFailed" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditFailed" name="CheckCreditFailedRespondExchange" type="//@typeDefinitions/(a)informationTypes.4" action="Respond" faultName="invalidCredit"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/(a)informationTypes.8" action="Respond" faultName="rejected"/>
+ </activities>
+ </activities>
+ </activities>
+ </enclosedChoreographies>
+ <enclosedChoreographies name="RequestForQuote">
+ <participantDefinitions name="SupplierQuoteEngine" roleTypes="//@typeDefinitions/(a)roleTypes.3">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="conversationType"/>
+ </participantDefinitions>
+ <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/(a)channelTypes.2"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="RFQ" operation="getQuote" channelVariable="//@choreographies.0/@enclosedChoreographies.1/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.1/(a)participantDefinitions.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction RFQ" name="RFQRequestExchange" type="//@typeDefinitions/(a)informationTypes.11"/>
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction RFQ" name="RFQRespondExchange" type="//@typeDefinitions/(a)informationTypes.9" action="Respond"/>
+ </activities>
+ </enclosedChoreographies>
+ <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" roleTypes="//@typeDefinitions/(a)roleTypes.0 //@typeDefinitions/(a)roleTypes.1"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Enquiry" name="EnquiryRequestExchange" type="//@typeDefinitions/(a)informationTypes.6"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:While" name="SendRFQToSuppliers">
+ <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/(a)enclosedChoreographies.1"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:When" name="WhenQuotesReceivedOrTimeout">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Enquiry" name="EnquiryRespondExchange" type="//@typeDefinitions/(a)informationTypes.10" action="Respond"/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Choice">
+ <activities xsi:type="org.pi4soa.cdl:Sequence">
+ <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/(a)enclosedChoreographies.0" waitForCompletion="false">
+ <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/(a)variableDefinitions.0" thisRole="//@typeDefinitions/(a)roleTypes.1" freeVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" freeRole="//@typeDefinitions/(a)roleTypes.1"/>
+ <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/(a)variableDefinitions.0" thisRole="//@typeDefinitions/(a)roleTypes.0" freeVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" freeRole="//@typeDefinitions/(a)roleTypes.0"/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Sequence">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Cancel" operation="cancel" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Cancel" name="CancelRequestExchange" type="//@typeDefinitions/(a)informationTypes.2"/>
+ </activities>
+ </activities>
+ </activities>
+ </choreographies>
+</org.pi4soa.cdl:Package>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/PurchaseGoods.cdm
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/PurchaseGoods.cdm (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/PurchaseGoods.cdm 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for PurchaseGoods" name="PurchaseGoods" author="gary" version="0.1" targetNamespace="http://www.jboss.org/savara/examples">
+ <typeDefinitions>
+ <nameSpaces description="Target Namespace for PurchaseGoods" prefix="tns" uRI="http://www.jboss.org/savara/examples"/>
+ <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
+ <nameSpaces prefix="pur" uRI="java:org.jboss.savara.examples.purchasing"/>
+ <nameSpaces prefix="sto" uRI="http://www.jboss.org/examples/store"/>
+ <informationTypes description="This is the information type BuyConfirmed" name="BuyConfirmed" typeName="sto:BuyConfirmed" elementName=""/>
+ <informationTypes description="This is the information type BuyFailed" name="BuyFailed" typeName="sto:BuyFailed" elementName=""/>
+ <informationTypes description="This is the information type BuyRequest" name="BuyRequest" typeName="sto:BuyRequest" elementName=""/>
+ <informationTypes description="This is the information type CreditCheckInvalid" name="CreditCheckInvalid" typeName="pur:CreditCheckInvalid" elementName=""/>
+ <informationTypes description="This is the information type CreditCheckOk" name="CreditCheckOk" typeName="pur:CreditCheckOk" elementName=""/>
+ <informationTypes description="This is the information type CreditCheckRequest" name="CreditCheckRequest" typeName="pur:CreditCheckRequest" elementName=""/>
+ <informationTypes description="This is the information type IDType" name="IDType" typeName="xsd:string"/>
+ <informationTypes description="This is the information type URITokenType" name="URITokenType" typeName="xsd:anyURI"/>
+ <tokens description="This is the token ID" name="ID" informationType="//@typeDefinitions/(a)informationTypes.6"/>
+ <tokens description="This is the token URIToken" name="URIToken" informationType="//@typeDefinitions/(a)informationTypes.7"/>
+ <tokenLocators description="This is the token locator BuyFailedIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.1" query="//@id" name="BuyFailedIDLocator"/>
+ <tokenLocators description="This is the token locator BuyRequestIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.2" query="//@id" name="BuyRequestIDLocator"/>
+ <tokenLocators description="This is the token locator BuyResponseIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.0" query="//@id" name="BuyResponseIDLocator"/>
+ <tokenLocators description="This is the token locator CreditCheckInvalidIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.3" query="//@id" name="CreditCheckInvalidIDLocator"/>
+ <tokenLocators description="This is the token locator CreditCheckRequestIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.5" query="//@id" name="CreditCheckRequestIDLocator"/>
+ <tokenLocators description="This is the token locator CreditCheckResponseIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.4" query="//@id" name="CreditCheckResponseIDLocator"/>
+ <roleTypes description="This is the role type Buyer" name="Buyer">
+ <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type CreditAgency" name="CreditAgency">
+ <behaviors description="This is the behavior CreditAgencyBehavior" name="CreditAgencyBehavior" interface="pur:CreditAgencyInterface"/>
+ </roleTypes>
+ <roleTypes description="This is the role type Store" name="Store">
+ <behaviors description="This is the behavior StoreBehavior" name="StoreBehavior" interface="sto:StoreInterface"/>
+ </roleTypes>
+ <relationshipTypes description="Relationship between Buyer and Store" name="BuyerToStoreRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.2"/>
+ <relationshipTypes description="Relationship between Store and CreditAgency" name="StoreToCreditAgencyRel" firstRoleType="//@typeDefinitions/(a)roleTypes.2" secondRoleType="//@typeDefinitions/(a)roleTypes.1"/>
+ <participantTypes description="This is the participant type Buyer" name="Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.0">
+ <semanticAnnotations annotation="savara.samples.Purchasing@Buyer" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type pur:CreditAgency" name="pur:CreditAgency" roleTypes="//@typeDefinitions/(a)roleTypes.1">
+ <semanticAnnotations annotation="savara.samples.Common@CreditAgency" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type sto:Store" name="sto:Store" roleTypes="//@typeDefinitions/(a)roleTypes.2">
+ <semanticAnnotations annotation="savara.samples.Purchasing@Store" name="conversationType"/>
+ </participantTypes>
+ <channelTypes description="This is the channel type CreditAgencyChannelType" name="CreditAgencyChannelType" referenceToken="//@typeDefinitions/(a)tokens.1" roleType="//@typeDefinitions/(a)roleTypes.1">
+ <identities description="ID" tokens="//@typeDefinitions/(a)tokens.0"/>
+ </channelTypes>
+ <channelTypes description="This is the channel type StoreChannelType" name="StoreChannelType" referenceToken="//@typeDefinitions/(a)tokens.1" roleType="//@typeDefinitions/(a)roleTypes.2">
+ <identities description="ID" tokens="//@typeDefinitions/(a)tokens.0"/>
+ </channelTypes>
+ </typeDefinitions>
+ <choreographies description="Choreography flow for the PurchaseGoods process" name="PurchaseGoodsProcess" root="true">
+ <variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/(a)channelTypes.0"/>
+ <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/(a)channelTypes.1"/>
+ <variableDefinitions description="This is the variable buy" name="buy" type="//@typeDefinitions/(a)informationTypes.2"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyRequest" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction BuyRequest" name="BuyRequestRequestExchange" type="//@typeDefinitions/(a)informationTypes.2"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/(a)informationTypes.5"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Choice" description="Is credit ok?">
+ <activities xsi:type="org.pi4soa.cdl:Sequence" description="Credit Valid">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckOk" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckOk" name="CreditCheckOkRespondExchange" type="//@typeDefinitions/(a)informationTypes.4" action="Respond"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyConfirmed" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction BuyConfirmed" name="BuyConfirmedRespondExchange" type="//@typeDefinitions/(a)informationTypes.0" action="Respond"/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Sequence" description="Credit Invalid">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckFailed" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckFailed" name="CreditCheckFailedRespondExchange" type="//@typeDefinitions/(a)informationTypes.3" action="Respond" faultName="CreditCheckFailed"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyFailed" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction BuyFailed" name="BuyFailedRespondExchange" type="//@typeDefinitions/(a)informationTypes.1" action="Respond" faultName="BuyFailed"/>
+ </activities>
+ </activities>
+ </activities>
+ </choreographies>
+</org.pi4soa.cdl:Package>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ReqRespFault" name="ReqRespFault" author="gary" version="0.3" targetNamespace="http://www.pi4soa.org/ReqRespFault">
+ <typeDefinitions>
+ <nameSpaces description="Target Namespace for ReqRespFault" prefix="tns" uRI="http://www.pi4soa.org/ReqRespFault"/>
+ <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
+ <nameSpaces description="Target Namespace for ReqRespFault" prefix="byr" uRI="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+ <nameSpaces description="Target Namespace for ReqRespFault" prefix="slr" uRI="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
+ <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
+ <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
+ <informationTypes description="This is the information type URIType" name="URIType"/>
+ <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/(a)informationTypes.3"/>
+ <roleTypes description="This is the role type Buyer" name="Buyer">
+ <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type Seller" name="Seller">
+ <behaviors description="This is the behavior SellerBehavior" name="SellerBehavior"/>
+ </roleTypes>
+ <relationshipTypes description="Relationship between Buyer and Seller" name="BuyerToSellerRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.1"/>
+ <participantTypes description="This is the participant type byr:Buyer" name="byr:Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.0">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Buyer" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type slr:Seller" name="slr:Seller" roleTypes="//@typeDefinitions/(a)roleTypes.1">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Broker" name="conversationType"/>
+ </participantTypes>
+ <channelTypes description="This is the channel type SellerChannelType" name="SellerChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.1"/>
+ </typeDefinitions>
+ <choreographies description="Choreography flow for the ReqRespFault process" name="ReqRespFaultProcess" root="true">
+ <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" roleTypes="//@typeDefinitions/(a)roleTypes.1 //@typeDefinitions/(a)roleTypes.0"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/(a)informationTypes.0"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Choice">
+ <activities xsi:type="org.pi4soa.cdl:Sequence">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckValid" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckValid" name="CreditCheckValidRespondExchange" type="//@typeDefinitions/(a)informationTypes.2" action="Respond"/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Sequence">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckInvalid" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckInvalid" name="CreditCheckInvalidRespondExchange" type="//@typeDefinitions/(a)informationTypes.1" action="Respond" faultName="insufficientCredit"/>
+ </activities>
+ </activities>
+ </activities>
+ </choreographies>
+</org.pi4soa.cdl:Package>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,271 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.change;
+
+import org.scribble.conversation.model.Conversation;
+import org.scribble.conversation.model.Run;
+import org.scribble.model.*;
+import org.scribble.model.change.DefaultModelChangeContext;
+import org.scribble.model.change.ModelChangeContext;
+import org.jboss.savara.contract.model.*;
+
+import junit.framework.TestCase;
+
+public class ModelChangeUtilsTest extends TestCase {
+
+ private static final String MY_ROLE = "MyRole";
+ private static final String MY_LOCATED_ROLE = "MyLocatedRole";
+ private static final String MY_OTHER_ROLE = "MyOtherRole";
+ private static final String MY_OTHER_LOCATED_ROLE = "MyOtherLocatedRole";
+
+ public void testInitialiseContracts() {
+ ModelChangeContext context=new DefaultModelChangeContext(null, null);
+
+ Conversation conv=new Conversation();
+ LocatedName ln=new LocatedName();
+ Role r=new Role();
+ r.setName(MY_ROLE);
+
+ Contract c=new Contract();
+ r.getAnnotations().put(Contract.class.getName(), c);
+
+ ln.setRole(r);
+ conv.setLocatedName(ln);
+
+ ModelChangeUtils.addContracts(context, conv, true);
+
+ Contract c2=ModelChangeUtils.getContract(context, MY_ROLE);
+
+ if (c2 == null) {
+ fail("Contract not found");
+ }
+
+ if (c2 != c) {
+ fail("Contract not the same as the one stored");
+ }
+ }
+
+ public void testInitialiseContractsTwice() {
+ ModelChangeContext context=new DefaultModelChangeContext(null, null);
+
+ Conversation conv=new Conversation();
+ LocatedName ln=new LocatedName();
+ Role r=new Role();
+ r.setName(MY_ROLE);
+
+ Contract c=new Contract();
+ r.getAnnotations().put(Contract.class.getName(), c);
+
+ ln.setRole(r);
+ conv.setLocatedName(ln);
+
+ ModelChangeUtils.addContracts(context, conv, true);
+
+ Conversation conv2=new Conversation();
+ LocatedName ln2=new LocatedName();
+ Role r2=new Role();
+ r2.setName(MY_OTHER_ROLE);
+
+ Contract c2=new Contract();
+ r2.getAnnotations().put(Contract.class.getName(), c2);
+
+ ln2.setRole(r2);
+ conv2.setLocatedName(ln2);
+
+ ModelChangeUtils.addContracts(context, conv2, true);
+
+ Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
+
+ if (c3 == null) {
+ fail("Contract not found");
+ }
+
+ if (c3 != c) {
+ fail("Contract not the same as the one stored");
+ }
+
+ Contract c4=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
+
+ if (c4 == null) {
+ fail("Contract not found");
+ }
+
+ if (c4 != c2) {
+ fail("Contract2 not the same as the one stored");
+ }
+ }
+
+ public void testPushRoleContractMapping() {
+ ModelChangeContext context=new DefaultModelChangeContext(null, null);
+
+ Conversation conv=new Conversation();
+ LocatedName ln=new LocatedName();
+ Role r1=new Role();
+ r1.setName(MY_LOCATED_ROLE);
+ ln.setRole(r1);
+ conv.setLocatedName(ln);
+
+ Contract c1=new Contract();
+ r1.getAnnotations().put(Contract.class.getName(), c1);
+
+ Role r2=new Role();
+ r2.setName(MY_ROLE);
+
+ Contract c2=new Contract();
+ r2.getAnnotations().put(Contract.class.getName(), c2);
+
+ RoleList rl=new RoleList();
+ rl.getRoles().add(r2);
+ conv.getBlock().getContents().add(rl);
+
+ ModelChangeUtils.addContracts(context, conv, true);
+
+ Conversation subconv=new Conversation();
+ LocatedName subln=new LocatedName();
+ Role subr1=new Role();
+ subr1.setName(MY_OTHER_LOCATED_ROLE);
+ subln.setRole(subr1);
+ subconv.setLocatedName(subln);
+
+ Run run=new Run();
+ conv.getBlock().getContents().add(run);
+ run.setInlineDefinition(subconv);
+
+ DeclarationBinding db=new DeclarationBinding();
+ db.setDeclaration(r2);
+ db.setBoundName(MY_OTHER_ROLE);
+ run.getBindings().add(db);
+
+ ModelChangeUtils.pushRoleContractMapping(context, run);
+
+ Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
+ Contract c4=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
+
+ if (c3 != null) {
+ fail("Contract for "+MY_ROLE+" should be null");
+ }
+
+ if (c4 == null) {
+ fail("Contract for "+MY_OTHER_ROLE+" should NOT be null");
+ }
+
+ Contract c5=ModelChangeUtils.getContract(context, MY_LOCATED_ROLE);
+ Contract c6=ModelChangeUtils.getContract(context, MY_OTHER_LOCATED_ROLE);
+
+ if (c5 != null) {
+ fail("Contract for "+MY_LOCATED_ROLE+" should be null");
+ }
+
+ if (c6 == null) {
+ fail("Contract for "+MY_OTHER_LOCATED_ROLE+" should NOT be null");
+ }
+
+ if (c6 != c1) {
+ fail("Located role's Contract not the same as the one stored");
+ }
+
+ if (c4 != c2) {
+ fail("Contract not the same as the one stored");
+ }
+ }
+
+ public void testPopRoleContractMapping() {
+ ModelChangeContext context=new DefaultModelChangeContext(null, null);
+
+ Conversation conv=new Conversation();
+ LocatedName ln=new LocatedName();
+ Role r1=new Role();
+ r1.setName(MY_LOCATED_ROLE);
+
+ ln.setRole(r1);
+ conv.setLocatedName(ln);
+
+ Role r2=new Role();
+ r2.setName(MY_ROLE);
+
+ RoleList rl=new RoleList();
+ rl.getRoles().add(r2);
+ conv.getBlock().getContents().add(rl);
+
+ Conversation subconv=new Conversation();
+ LocatedName subln=new LocatedName();
+ Role subr1=new Role();
+ subr1.setName(MY_OTHER_LOCATED_ROLE);
+ subln.setRole(subr1);
+ subconv.setLocatedName(subln);
+
+ Contract c1=new Contract();
+ subr1.getAnnotations().put(Contract.class.getName(), c1);
+
+ Role r3=new Role();
+ r3.setName(MY_OTHER_ROLE);
+
+ Contract c2=new Contract();
+ r3.getAnnotations().put(Contract.class.getName(), c2);
+
+ RoleList rl2=new RoleList();
+ rl2.getRoles().add(r3);
+ subconv.getBlock().getContents().add(rl2);
+
+ // Add contracts for subconv as if root, as normally
+ // this would be done by pushing the contracts, so this
+ // is just being used to setup the appropriate context
+ ModelChangeUtils.addContracts(context, subconv, true);
+
+ Run run=new Run();
+ conv.getBlock().getContents().add(run);
+ run.setInlineDefinition(subconv);
+
+ DeclarationBinding db=new DeclarationBinding();
+ db.setDeclaration(r2);
+ db.setBoundName(MY_OTHER_ROLE);
+ run.getBindings().add(db);
+
+ ModelChangeUtils.popRoleContractMapping(context, run);
+
+ Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
+ Contract c4=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
+
+ if (c3 == null) {
+ fail("Contract for "+MY_ROLE+" should NOT be null");
+ }
+
+ if (c4 != null) {
+ fail("Contract for "+MY_OTHER_ROLE+" should be null");
+ }
+
+ Contract c5=ModelChangeUtils.getContract(context, MY_LOCATED_ROLE);
+ Contract c6=ModelChangeUtils.getContract(context, MY_OTHER_LOCATED_ROLE);
+
+ if (c5 == null) {
+ fail("Contract for "+MY_LOCATED_ROLE+" should NOT be null");
+ }
+
+ if (c6 != null) {
+ fail("Contract for "+MY_OTHER_LOCATED_ROLE+" should be null");
+ }
+
+ if (c3 != c2) {
+ fail("Contract not the same as the one stored");
+ }
+
+ if (c5 != c1) {
+ fail("Contract not the same as the one stored");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteractionTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteractionTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteractionTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+
+import junit.framework.TestCase;
+
+public class AbstractInteractionTest extends TestCase {
+
+ public void testIsActivity() {
+ TestAbstractInteraction act=
+ new TestAbstractInteraction(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testBuildFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String op="testOp";
+ String portType="testPortType";
+ String partnerLink="testPartnerLink";
+
+ String xml="<interaction xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "operation=\""+op+"\" "+
+ "partnerLink=\""+partnerLink+"\" "+
+ "portType=\""+portType+"\" "+
+ "/>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestAbstractInteraction component=new TestAbstractInteraction(model, elem);
+
+ if (component.getOperation().equals(op) == false) {
+ fail("Operation not correct, expecting '"+op+"': "+
+ component.getOperation());
+ }
+
+ if (component.getPartnerLink().equals(partnerLink) == false) {
+ fail("PartnerLink not correct, expecting '"+partnerLink+"': "+
+ component.getPartnerLink());
+ }
+
+ if (component.getPortType().equals(portType) == false) {
+ fail("Port type not correct, expecting '"+portType+"': "+
+ component.getPortType());
+ }
+ }
+
+ public void testGetOperation() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String op="testOp";
+
+ TestAbstractInteraction component=new TestAbstractInteraction(model);
+
+ if (component.getOperation() != null) {
+ fail("Should be null");
+ }
+
+ component.setOperation(op);
+
+ if (component.getOperation().equals(op) == false) {
+ fail("Operation not correct, expecting '"+op+"': "+
+ component.getOperation());
+ }
+ }
+
+ public void testGetPortType() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String pt="testPortType";
+
+ TestAbstractInteraction component=new TestAbstractInteraction(model);
+
+ if (component.getPortType() != null) {
+ fail("Should be null");
+ }
+
+ component.setPortType(pt);
+
+ if (component.getPortType().equals(pt) == false) {
+ fail("Port type not correct, expecting '"+pt+"': "+
+ component.getPortType());
+ }
+ }
+
+ public void testGetPartnerLink() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String pl="testPartnerLink";
+
+ TestAbstractInteraction component=new TestAbstractInteraction(model);
+
+ if (component.getPartnerLink() != null) {
+ fail("Should be null");
+ }
+
+ component.setPartnerLink(pl);
+
+ if (component.getPartnerLink().equals(pl) == false) {
+ fail("Partner link not correct, expecting '"+pl+"': "+
+ component.getPartnerLink());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/BPELActivityTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/BPELActivityTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/BPELActivityTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,191 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+
+import junit.framework.TestCase;
+
+public class BPELActivityTest extends TestCase {
+
+ public void testIsActivity() {
+ TestBPELActivity act=
+ new TestBPELActivity(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testGetNameFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String name="testName";
+
+ String xml="<activity xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "name=\""+name+"\" />";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestBPELActivity component=new TestBPELActivity(model, elem);
+
+ if (component.getName().equals(name) == false) {
+ fail("Name not correct, expecting '"+name+"': "+
+ component.getName());
+ }
+ }
+
+ public void testGetName() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String name="testName";
+
+ TestBPELActivity component=new TestBPELActivity(model);
+
+ if (component.getName() != null) {
+ fail("Should be null");
+ }
+
+ component.setName(name);
+
+ if (component.getName().equals(name) == false) {
+ fail("Name not correct, expecting '"+name+"': "+
+ component.getName());
+ }
+ }
+
+ public void testSuppressJoinFailureFromDOMTrue() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String value="yes";
+
+ String xml="<activity xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "suppressJoinFailure=\""+value+"\" />";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestBPELActivity component=new TestBPELActivity(model, elem);
+
+ if (component.getSuppressJoinFailure() == false) {
+ fail("'Suppress Join Failure' not correct, expecting 'true': "+
+ component.getSuppressJoinFailure());
+ }
+ }
+
+ public void testSuppressJoinFailureFromDOMFalse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String value="no";
+
+ String xml="<activity xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "suppressJoinFailure=\""+value+"\" />";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestBPELActivity component=new TestBPELActivity(model, elem);
+
+ if (component.getSuppressJoinFailure() == true) {
+ fail("'Suppress Join Failure' not correct, expecting 'false': "+
+ component.getSuppressJoinFailure());
+ }
+ }
+
+ public void testGetSuppressJoinFailureTrue() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ TestBPELActivity component=new TestBPELActivity(model);
+
+ component.setSuppressJoinFailure(true);
+
+ if (component.getSuppressJoinFailure() == false) {
+ fail("'Suppress Join Failure' not correct, expecting 'true': "+
+ component.getSuppressJoinFailure());
+ }
+ }
+
+ public void testGetSuppressJoinFailureFalse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ TestBPELActivity component=new TestBPELActivity(model);
+
+ component.setSuppressJoinFailure(false);
+
+ if (component.getSuppressJoinFailure() == true) {
+ fail("'Suppress Join Failure' not correct, expecting 'false': "+
+ component.getSuppressJoinFailure());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/BPELElementTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/BPELElementTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/BPELElementTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,401 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.BPELElement;
+import org.jboss.savara.tools.bpel.model.component.Condition;
+import org.jboss.savara.tools.bpel.model.component.Else;
+import org.jboss.savara.tools.bpel.model.component.If;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class BPELElementTest extends TestCase {
+
+ public void testFindChildElements() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<elem xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<first/>"+
+ "<else/>"+
+ "<sequence/>"+
+ "<second/>"+
+ "<if/>"+
+ "</elem>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestBPELElement top=new TestBPELElement(model, elem);
+
+ java.util.List<BPELElement> elems=
+ top.findChildElements(BPELElement.class);
+
+ if (elems == null) {
+ fail("Null list");
+ }
+
+ if (elems.size() != 3) {
+ fail("Expecting three child elements: "+elems.size());
+ }
+
+ if ((elems.get(0) instanceof Else) == false) {
+ fail("Element 0 not else: "+elems.get(0));
+ }
+
+ if ((elems.get(1) instanceof Sequence) == false) {
+ fail("Element 1 not sequence: "+elems.get(1));
+ }
+
+ if ((elems.get(2) instanceof If) == false) {
+ fail("Element 2 not 'if': "+elems.get(2));
+ }
+
+ elems = top.findChildElements(Sequence.class);
+
+ if (elems == null) {
+ fail("Null sequence list");
+ }
+
+ if (elems.size() != 1) {
+ fail("Expecting one child element: "+elems.size());
+ }
+
+ if ((elems.get(0) instanceof Sequence) == false) {
+ fail("Element 0 not sequence: "+elems.get(0));
+ }
+ }
+
+ public void testFindChildActivity() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<elem xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<first/>"+
+ "<else/>"+
+ "<sequence/>"+
+ "<second/>"+
+ "<if/>"+
+ "</elem>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestBPELElement top=new TestBPELElement(model, elem);
+
+ BPELElement act=top.findChildActivity();
+
+ if (act == null) {
+ fail("Null activity");
+ }
+
+ if ((act instanceof Sequence) == false) {
+ fail("Activity not sequence");
+ }
+ }
+
+ public void testSetChildElement() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ TestBPELElement top=new TestBPELElement(model);
+
+ org.w3c.dom.Element newElem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ newElem = builder.newDocument().createElement("newelem");
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ if (top.getDOMElement().getFirstChild() != null) {
+ fail("Child element not expected");
+ }
+
+ TestBPELElement telem=new TestBPELElement(model, newElem);
+
+ top.setChildElement(null, telem, null);
+
+ if (top.getDOMElement().getChildNodes().getLength() != 1) {
+ fail("Should only be 1 child node: "+top.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (top.getDOMElement().getChildNodes().item(0).getNodeName().
+ equals(newElem.getNodeName()) == false) {
+ fail("Node name of new child element not correct");
+ }
+ }
+
+ public void testSetChildElementAtBeginning() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<elem>"+
+ "<first/>"+
+ "<second/>"+
+ "<third/>"+
+ "</elem>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestBPELElement top=new TestBPELElement(model, elem);
+
+ org.w3c.dom.Element newElem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ newElem = builder.newDocument().createElement("newelem");
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ if (top.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Should only be 3 child node: "+top.getDOMElement().getChildNodes().getLength());
+ }
+
+ TestBPELElement telem=new TestBPELElement(model, newElem);
+
+ top.setChildElement(null, telem, top.getDOMElement().getFirstChild());
+
+ if (top.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Should only be 4 child node: "+top.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (top.getDOMElement().getChildNodes().item(0).getNodeName().
+ equals(newElem.getNodeName()) == false) {
+ fail("Node name of new child element not correct");
+ }
+ }
+
+ public void testSetChildElementAtEnd() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<elem>"+
+ "<first/>"+
+ "<second/>"+
+ "<third/>"+
+ "</elem>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestBPELElement top=new TestBPELElement(model, elem);
+
+ org.w3c.dom.Element newElem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ newElem = builder.newDocument().createElement("newelem");
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ if (top.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Should only be 3 child node: "+top.getDOMElement().getChildNodes().getLength());
+ }
+
+ TestBPELElement telem=new TestBPELElement(model, newElem);
+
+ top.setChildElement(null, telem, null);
+
+ if (top.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Should only be 4 child node: "+top.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (top.getDOMElement().getChildNodes().item(3).getNodeName().
+ equals(newElem.getNodeName()) == false) {
+ fail("Node name of new child element not correct");
+ }
+ }
+
+ public void testSetChildElementReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String first="first";
+ String second="second";
+
+ String xml="<elem>"+
+ "<newelem name=\""+first+"\" />"+
+ "</elem>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TestBPELElement top=new TestBPELElement(model, elem);
+
+ org.w3c.dom.Element newElem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ newElem = builder.newDocument().createElement("newelem");
+ newElem.setAttribute("name", second);
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ if (top.getDOMElement().getFirstChild() == null) {
+ fail("First child element expected");
+ }
+
+ if ((top.getDOMElement().getFirstChild() instanceof
+ org.w3c.dom.Element) == false) {
+ fail("First child is not an element");
+ }
+
+ TestBPELElement telem=new TestBPELElement(model, newElem);
+
+ top.setChildElement((org.w3c.dom.Element)
+ top.getDOMElement().getFirstChild(),
+ telem, null);
+
+ if (top.getDOMElement().getChildNodes().getLength() != 1) {
+ fail("Should only be 1 child node: "+top.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (top.getDOMElement().getChildNodes().item(0).getNodeName().
+ equals(newElem.getNodeName()) == false) {
+ fail("Node name of new child element not correct");
+ }
+
+ if (((org.w3c.dom.Element)top.getDOMElement().getChildNodes().
+ item(0)).getAttribute("name").equals(second) == false) {
+ fail("Attribute is not as expected");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CatchAllTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CatchAllTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CatchAllTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.CatchAll;
+import org.jboss.savara.tools.bpel.model.component.Else;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class CatchAllTest extends TestCase {
+
+ public void testIsActivity() {
+ CatchAll act=new CatchAll(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildCatchAll() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<catchAll xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<sequence/></catchAll>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ CatchAll construct=new CatchAll(model, elem);
+
+ if (construct.getActivity() == null) {
+ fail("No activity");
+ }
+
+ if ((construct.getActivity() instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CatchTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CatchTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CatchTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Catch;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class CatchTest extends TestCase {
+
+ public void testIsActivity() {
+ Catch act=new Catch(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildCatchAll() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVar";
+ String fault="testFault";
+
+ String xml="<catch xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" " +
+ "faultVariable=\""+var+"\" "+
+ "faultName=\""+fault+"\" >"+
+ "<sequence/></catch>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Catch construct=new Catch(model, elem);
+
+ if (construct.getActivity() == null) {
+ fail("No activity");
+ }
+
+ if ((construct.getActivity() instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+ }
+
+ public void testGetFaultVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ Catch component=new Catch(model);
+
+ if (component.getFaultVariable() != null) {
+ fail("Should be null");
+ }
+
+ component.setFaultVariable(var);
+
+ if (component.getFaultVariable().equals(var) == false) {
+ fail("Fault Variable not correct, expecting '"+var+"': "+
+ component.getFaultVariable());
+ }
+ }
+
+ public void testGetFaultName() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String fault="testFault";
+
+ Catch component=new Catch(model);
+
+ if (component.getFaultName() != null) {
+ fail("Should be null");
+ }
+
+ component.setFaultName(fault);
+
+ if (component.getFaultName().equals(fault) == false) {
+ fail("Fault name not correct, expecting '"+fault+"': "+
+ component.getFaultName());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CompensationHandlerTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CompensationHandlerTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/CompensationHandlerTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.CompensationHandler;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class CompensationHandlerTest extends TestCase {
+
+ public void testIsActivity() {
+ CompensationHandler act=
+ new CompensationHandler(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildCompensationHandler() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<compensationHandler xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<sequence/></compensationHandler>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ CompensationHandler construct=new CompensationHandler(model, elem);
+
+ if (construct.getActivity() == null) {
+ fail("No activity");
+ }
+
+ if ((construct.getActivity() instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ConditionTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ConditionTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ConditionTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,167 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Condition;
+
+import junit.framework.TestCase;
+
+public class ConditionTest extends TestCase {
+
+ public void testIsActivity() {
+ Condition act=new Condition(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testGetExpression() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+ Condition condition=new Condition(model);
+
+ String expr="Test Expression";
+
+ if (condition.getExpression() != null) {
+ fail("Should be null");
+ }
+
+ condition.setExpression(expr);
+
+ String result=condition.getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr+"' but got '"+result+"'");
+ }
+ }
+
+ public void testGetExpressionFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr="Test Expression";
+
+ String xml="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+expr+"</condition>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition=new Condition(model, elem);
+
+ String result=condition.getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr+"' but got '"+result+"'");
+ }
+ }
+
+ public void testGetExpressionLanguage() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+ Condition condition=new Condition(model);
+
+ String lang="Test Language";
+
+ if (condition.getExpressionLanguage() != null) {
+ fail("Should be null");
+ }
+
+ condition.setExpressionLanguage(lang);
+
+ String result=condition.getExpressionLanguage();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(lang) == false) {
+ fail("Expression language is not valid: expecting '"+
+ lang+"' but got '"+result+"'");
+ }
+ }
+
+ public void testGetExpressionLanguageFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String lang="TestLanguage";
+
+ String xml="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\"" +
+ " expressionLanguage=\""+lang+"\"></condition>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition=new Condition(model, elem);
+
+ String result=condition.getExpressionLanguage();
+
+ if (result == null) {
+ fail("Expression language is null");
+ }
+
+ if (result.equals(lang) == false) {
+ fail("Expression language is not valid: expecting '"+
+ lang+"' but got '"+result+"'");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ElseIfTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ElseIfTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ElseIfTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Elseif;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class ElseIfTest extends TestCase {
+
+ public void testIsActivity() {
+ Elseif act=new Elseif(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildElseIf() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr="Test Expression";
+
+ String xml="<elseif xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<condition>"+expr+"</condition><sequence/></elseif>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Elseif elseif=new Elseif(model, elem);
+
+ if (elseif.getCondition() == null) {
+ fail("No condition");
+ }
+
+ if (elseif.getActivity() == null) {
+ fail("No activity");
+ }
+
+ String result=elseif.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr+"' but got '"+result+"'");
+ }
+
+ if ((elseif.getActivity() instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ElseTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ElseTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ElseTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Else;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class ElseTest extends TestCase {
+
+ public void testIsActivity() {
+ Else act=new Else(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildElse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<else xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<sequence/></else>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Else construct=new Else(model, elem);
+
+ if (construct.getActivity() == null) {
+ fail("No activity");
+ }
+
+ if ((construct.getActivity() instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/EventHandlersTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/EventHandlersTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/EventHandlersTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,411 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.EventHandlers;
+import org.jboss.savara.tools.bpel.model.component.OnAlarm;
+import org.jboss.savara.tools.bpel.model.component.OnEvent;
+
+import junit.framework.TestCase;
+
+public class EventHandlersTest extends TestCase {
+
+ public void testIsActivity() {
+ EventHandlers act=new EventHandlers(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testEventHandlersFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<eventHandlers xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<onEvent/>"+
+ "<onEvent/>"+
+ "<onAlarm/>"+
+ "</eventHandlers>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ EventHandlers component=new EventHandlers(model, elem);
+
+ if (component.getOnEvents().size() != 2) {
+ fail("Expecting 2 onEvent: "+
+ component.getOnEvents().size());
+ }
+
+ if (component.getOnAlarms().size() != 1) {
+ fail("Expecting 1 onAlarm: "+
+ component.getOnAlarms().size());
+ }
+ }
+
+ public void testAddOnMessageToEventHandlersInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<eventHandlers xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<onAlarm/>"+
+ "<onAlarm/>"+
+ "</eventHandlers>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ EventHandlers component=new EventHandlers(model, elem);
+
+ if (component.getOnAlarms().size() != 2) {
+ fail("Expecting 2 onAlarms: "+
+ component.getOnAlarms().size());
+ }
+
+ if (component.getOnEvents().size() != 0) {
+ fail("Expecting 0 onEvents: "+
+ component.getOnEvents().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ OnEvent sub=new OnEvent(model);
+
+ component.addOnEvent(sub, 0);
+
+ if (component.getOnEvents().size() != 1) {
+ fail("Expecting 1 onEvent: "+
+ component.getOnEvents().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(OnEvent.ONEVENT) == false) {
+ fail("Second element was not a 'onEvent': "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+
+ public void testAddOnAlarmToEventHandlersInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<eventHandlers xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<onEvent/>"+
+ "<onEvent/>"+
+ "</eventHandlers>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ EventHandlers component=new EventHandlers(model, elem);
+
+ if (component.getOnEvents().size() != 2) {
+ fail("Expecting 2 onEvents: "+
+ component.getOnEvents().size());
+ }
+
+ if (component.getOnAlarms().size() != 0) {
+ fail("Expecting 0 onAlarms: "+
+ component.getOnAlarms().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ OnAlarm sub=new OnAlarm(model);
+
+ component.addOnAlarm(sub, 0);
+
+ if (component.getOnAlarms().size() != 1) {
+ fail("Expecting 1 onAlarm: "+
+ component.getOnAlarms().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(3).
+ getLocalName().equals(OnAlarm.ONALARM) == false) {
+ fail("Second element was not a 'onAlarm': "+
+ component.getDOMElement().getChildNodes().item(3).
+ getLocalName());
+ }
+ }
+
+ public void testGetURIOnEvent() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<scope>"+
+ "<eventHandlers>"+
+ "<onEvent>"+
+ "<scope>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</scope>"+
+ "</onEvent>"+
+ "</eventHandlers>"+
+ "<sequence/>"+
+ "</scope>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof Scope) == false) {
+ fail("Top level activity is not scope");
+ }
+
+ Scope scope=(Scope)topact;
+
+ if (scope.getEventHandlers() == null) {
+ fail("Event handlers not set");
+ }
+
+ if (scope.getEventHandlers().getOnEvents().size() != 1) {
+ fail("Event handlers should have 1 onEvent: "+scope.getEventHandlers().getOnEvents().size());
+ }
+
+ OnEvent one=scope.getEventHandlers().getOnEvents().get(0);
+
+ Scope innerScope=one.getScope();
+
+ if (innerScope == null) {
+ fail("Inner scope not set");
+ }
+
+ if ((innerScope.getActivity() instanceof Sequence) == false) {
+ fail("Inner scope activity is not a sequence");
+ }
+
+ Sequence seq=(Sequence)innerScope.getActivity();
+
+ if (seq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@eventHandlers/@onEvent.0/@scope/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+
+ public void testGetURIOnAlarm() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<scope>"+
+ "<eventHandlers>"+
+ "<onAlarm>"+
+ "<scope>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</scope>"+
+ "</onAlarm>"+
+ "</eventHandlers>"+
+ "<sequence/>"+
+ "</scope>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof Scope) == false) {
+ fail("Top level activity is not scope");
+ }
+
+ Scope scope=(Scope)topact;
+
+ if (scope.getEventHandlers() == null) {
+ fail("Event handlers not set");
+ }
+
+ if (scope.getEventHandlers().getOnAlarms().size() != 1) {
+ fail("Event handlers should have 1 onAlarm: "+scope.getEventHandlers().getOnAlarms().size());
+ }
+
+ OnAlarm one=scope.getEventHandlers().getOnAlarms().get(0);
+
+ if ((one.getActivity() instanceof Scope) == false) {
+ fail("Activity is not Scope");
+ }
+
+ Scope innerScope=(Scope)one.getActivity();
+
+ if (innerScope == null) {
+ fail("Inner scope not set");
+ }
+
+ if ((innerScope.getActivity() instanceof Sequence) == false) {
+ fail("Inner scope activity is not a sequence");
+ }
+
+ Sequence seq=(Sequence)innerScope.getActivity();
+
+ if (seq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@eventHandlers/@onAlarm.0/@scope/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ExitTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ExitTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ExitTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Exit;
+
+import junit.framework.TestCase;
+
+public class ExitTest extends TestCase {
+
+ public void testIsActivity() {
+ Exit act=
+ new Exit(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/FaultHandlersTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/FaultHandlersTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/FaultHandlersTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,391 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Catch;
+import org.jboss.savara.tools.bpel.model.component.FaultHandlers;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class FaultHandlersTest extends TestCase {
+
+ public void testIsActivity() {
+ FaultHandlers act=new FaultHandlers(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testFaultHandlersCatchFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<faultHandlers xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<catch/>"+
+ "<catch/>"+
+ "</faultHandlers>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ FaultHandlers component=new FaultHandlers(model, elem);
+
+ if (component.getCatchAll() != null) {
+ fail("CatchAll path should be null");
+ }
+
+ if (component.getCatchPaths().size() != 2) {
+ fail("Should have 2 catch paths: "+component.getCatchPaths().size());
+ }
+ }
+
+ public void testFaultHandlersCatchAllFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<faultHandlers xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<catchAll/>"+
+ "</faultHandlers>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ FaultHandlers component=new FaultHandlers(model, elem);
+
+ if (component.getCatchAll() == null) {
+ fail("CatchAll path should NOT be null");
+ }
+
+ if (component.getCatchPaths().size() != 0) {
+ fail("Should have 0 catch paths: "+component.getCatchPaths().size());
+ }
+ }
+
+ public void testAddCatch() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<faultHandlers xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "</faultHandlers>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ FaultHandlers component=new FaultHandlers(model, ifelem);
+
+ if (component.getCatchPaths().size() != 0) {
+ fail("Should be no catch paths");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 0) {
+ fail("Zero child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+ Catch elem=new Catch(model);
+ elem.setActivity(seq);
+
+ component.addCatch(elem);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 1) {
+ fail("One child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(0).
+ getLocalName().equals(Catch.CATCH) == false) {
+ fail("First element was not a catch: "+
+ component.getDOMElement().getChildNodes().item(0).
+ getLocalName());
+ }
+ }
+
+ public void testAddCatchInsertBeforeCatchAll() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<faultHandlers xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<catchAll>"+
+ "<sequence/>"+
+ "</catchAll>"+
+ "</faultHandlers>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ FaultHandlers component=new FaultHandlers(model, ifelem);
+
+ if (component.getCatchPaths().size() != 0) {
+ fail("Should be no catch paths");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 1) {
+ fail("One child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+ Catch catchElem=new Catch(model);
+ catchElem.setActivity(seq);
+
+ component.addCatch(catchElem);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(0).
+ getLocalName().equals(Catch.CATCH) == false) {
+ fail("First element was not a catch: "+
+ component.getDOMElement().getChildNodes().item(0).
+ getLocalName());
+ }
+ }
+
+ public void testGetURICatch() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<faultHandlers>"+
+ "<catch>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</catch>"+
+ "</faultHandlers>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ FaultHandlers fhs=component.getFaultHandlers();
+
+ if (fhs == null) {
+ fail("No fault handlers");
+ }
+
+ if (fhs.getCatchPaths().size() != 1) {
+ fail("Expecting one catch: "+fhs.getCatchPaths().size());
+ }
+
+ Catch c=fhs.getCatchPaths().get(0);
+
+ BPELActivity act=c.getActivity();
+
+ if ((act instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+
+ Sequence seq=(Sequence)act;
+
+ if (seq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@faultHandlers/@catch.0/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+
+ public void testGetURICatchAll() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<faultHandlers>"+
+ "<catchAll>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</catchAll>"+
+ "</faultHandlers>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ FaultHandlers fhs=component.getFaultHandlers();
+
+ if (fhs == null) {
+ fail("No fault handlers");
+ }
+
+ if (fhs.getCatchAll() == null) {
+ fail("CatchAll not set");
+ }
+
+ CatchAll c=fhs.getCatchAll();
+
+ BPELActivity act=c.getActivity();
+
+ if ((act instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+
+ Sequence seq=(Sequence)act;
+
+ if (seq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@faultHandlers/@catchAll/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/FlowTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/FlowTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/FlowTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,398 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Flow;
+import org.jboss.savara.tools.bpel.model.component.Link;
+import org.jboss.savara.tools.bpel.model.component.While;
+
+import junit.framework.TestCase;
+
+public class FlowTest extends TestCase {
+
+ public void testIsActivity() {
+ Flow act=new Flow(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testFlowFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String link1="link1Name";
+ String link2="link2Name";
+
+ String xml="<flow xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<links>"+
+ "<link name=\""+link1+"\" />"+
+ "<link name=\""+link2+"\" />"+
+ "</links>"+
+ "<if/>"+
+ "<if/>"+
+ "</flow>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Flow component=new Flow(model, elem);
+
+ if (component.getLinks().size() != 2) {
+ fail("Expecting 2 child links: "+
+ component.getLinks().size());
+ }
+
+ if (component.getLinks().get(0).getName().equals(link1) == false) {
+ fail("First link name incorrect");
+ }
+
+ if (component.getLinks().get(1).getName().equals(link2) == false) {
+ fail("Second link name incorrect");
+ }
+
+ if (component.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ component.getActivities().size());
+ }
+ }
+
+ public void testAddLinkToFlowFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String link1="link1Name";
+
+ String xml="<flow xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<if/>"+
+ "</flow>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Flow component=new Flow(model, elem);
+
+ if (component.getLinks().size() != 0) {
+ fail("Should be no links");
+ }
+
+ org.w3c.dom.Element links=
+ component.findChildElement(Flow.LINKS);
+
+ if (links != null) {
+ fail("Links element should not be found");
+ }
+
+ Link l1=new Link(model);
+ l1.setName(link1);
+
+ component.addLink(l1, -1);
+
+ links = component.findChildElement(Flow.LINKS);
+
+ if (links == null) {
+ fail("Links element not found");
+ }
+ }
+
+ public void testRemoveLinkFromFlowFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String link1="link1Name";
+
+ String xml="<flow xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<links>"+
+ "<link name=\""+link1+"\" />"+
+ "</links>"+
+ "<if/>"+
+ "</flow>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Flow component=new Flow(model, elem);
+
+ if (component.getLinks().size() != 1) {
+ fail("Should be one link: "+component.getLinks().size());
+ }
+
+ org.w3c.dom.Element links=
+ component.findChildElement(Flow.LINKS);
+
+ if (links == null) {
+ fail("Links element is null");
+ }
+
+ Link l1=component.getLinks().get(0);
+
+ component.removeLink(l1);
+
+ links = component.findChildElement(Flow.LINKS);
+
+ if (links != null) {
+ fail("Links element should now be null");
+ }
+ }
+
+ public void testAddFirstActToFlowInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<flow xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<if/>"+
+ "<if/>"+
+ "</flow>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Flow component=new Flow(model, elem);
+
+ if (component.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ While sub=new While(model);
+
+ component.addActivity(sub, 0);
+
+ if (component.getActivities().size() != 3) {
+ fail("Expecting 3 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(While.WHILE) == false) {
+ fail("Second element was not a 'while': "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testAddSecondActToFlowInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<flow xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<if/>"+
+ "<if/>"+
+ "</flow>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Flow component=new Flow(model, elem);
+
+ if (component.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ While sub=new While(model);
+
+ component.addActivity(sub, 1);
+
+ if (component.getActivities().size() != 3) {
+ fail("Expecting 3 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(2).
+ getLocalName().equals(While.WHILE) == false) {
+ fail("Second element was not a 'while': "+
+ component.getDOMElement().getChildNodes().item(2).
+ getLocalName());
+ }
+ }
+
+ public void testAddLastActToFlowInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<flow xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<if/>"+
+ "<if/>"+
+ "</flow>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Flow component=new Flow(model, elem);
+
+ if (component.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ While sub=new While(model);
+
+ component.addActivity(sub, -1);
+
+ if (component.getActivities().size() != 3) {
+ fail("Expecting 3 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(3).
+ getLocalName().equals(While.WHILE) == false) {
+ fail("Second element was not a 'while': "+
+ component.getDOMElement().getChildNodes().item(3).
+ getLocalName());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ForEachTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ForEachTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ForEachTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,213 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.ForEach;
+import org.jboss.savara.tools.bpel.model.component.Scope;
+
+import junit.framework.TestCase;
+
+public class ForEachTest extends TestCase {
+
+ public void testIsActivity() {
+ ForEach act=new ForEach(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testForEachFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<forEach xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<startCounterValue/>"+
+ "<finalCounterValue/>"+
+ "<completionCondition/>"+
+ "<scope/>"+
+ "</forEach>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ ForEach component=new ForEach(model, elem);
+
+ if (component.getScope() == null) {
+ fail("Scope not set");
+ }
+ }
+
+ public void testSetScopeInInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<forEach xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<startCounterValue/>"+
+ "<finalCounterValue/>"+
+ "<completionCondition/>"+
+ "</forEach>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ ForEach component=new ForEach(model, elem);
+
+ if (component.getScope() == null) {
+ fail("Scope should not be null");
+ }
+
+ Scope scope=new Scope(model);
+ component.setScope(scope);
+
+ if (component.getScope() == null) {
+ fail("Scope should still not be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(3).
+ getLocalName().equals(Scope.SCOPE) == false) {
+ fail("Second element was not a 'scope': "+
+ component.getDOMElement().getChildNodes().item(3).
+ getLocalName());
+ }
+ }
+
+ public void testGetURI() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<forEach xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<startCounterValue/>"+
+ "<finalCounterValue/>"+
+ "<completionCondition/>"+
+ "<scope>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</scope>"+
+ "</forEach>"+
+ "<sequence/>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof ForEach) == false) {
+ fail("Top level activity is not ForEach");
+ }
+
+ ForEach fe=(ForEach)topact;
+
+ Scope innerScope=fe.getScope();
+
+ if (innerScope == null) {
+ fail("Inner scope not set");
+ }
+
+ if ((innerScope.getActivity() instanceof Sequence) == false) {
+ fail("Inner scope activity is not a sequence");
+ }
+
+ Sequence seq=(Sequence)innerScope.getActivity();
+
+ if (seq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@scope/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/IfTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/IfTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/IfTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,1186 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Condition;
+import org.jboss.savara.tools.bpel.model.component.Else;
+import org.jboss.savara.tools.bpel.model.component.Elseif;
+import org.jboss.savara.tools.bpel.model.component.If;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class IfTest extends TestCase {
+
+ public void testIsActivity() {
+ If act=new If(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testIfFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition>"+expr1+"</condition>"+
+ "<sequence/>"+
+ "</if>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, elem);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getActivity() == null) {
+ fail("Activity not set");
+ }
+
+ if ((component.getActivity() instanceof Sequence) == false) {
+ fail("Activity not a sequence");
+ }
+
+ if (component.getElsePath() != null) {
+ fail("Else path should be null");
+ }
+
+ if (component.getElseIfPaths().size() > 0) {
+ fail("No elseif paths should be set");
+ }
+ }
+
+ public void testIfElseFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition>"+expr1+"</condition>"+
+ "<sequence/>"+
+ "<else>"+
+ "<sequence/>"+
+ "</else>"+
+ "</if>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, elem);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getActivity() == null) {
+ fail("Activity not set");
+ }
+
+ if ((component.getActivity() instanceof Sequence) == false) {
+ fail("Activity not a sequence");
+ }
+
+ if (component.getElsePath() == null) {
+ fail("Else path is not set");
+ }
+
+ if ((component.getElsePath().getActivity() instanceof Sequence) == false) {
+ fail("Else path Activity not a sequence");
+ }
+
+ }
+
+ public void testIfElseIfsElseFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+ String expr3="Test Expression 3";
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition>"+expr1+"</condition>"+
+ "<sequence/>"+
+ "<elseif>"+
+ "<condition>"+expr2+"</condition>"+
+ "<sequence/>"+
+ "</elseif>"+
+ "<elseif>"+
+ "<condition>"+expr3+"</condition>"+
+ "<sequence/>"+
+ "</elseif>"+
+ "<else>"+
+ "<sequence/>"+
+ "</else>"+
+ "</if>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, elem);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getActivity() == null) {
+ fail("Activity not set");
+ }
+
+ if ((component.getActivity() instanceof Sequence) == false) {
+ fail("Activity not a sequence");
+ }
+
+ if (component.getElsePath() == null) {
+ fail("Else path is not set");
+ }
+
+ if ((component.getElsePath().getActivity() instanceof Sequence) == false) {
+ fail("Else path Activity not a sequence");
+ }
+
+ if (component.getElseIfPaths().size() != 2) {
+ fail("Two elseif paths expected: "+component.getElseIfPaths().size());
+ }
+
+ if (component.getElseIfPaths().get(0).getCondition() == null) {
+ fail("Elseif 0 no condition");
+ }
+
+ result=component.getElseIfPaths().get(0).getCondition().getExpression();
+
+ if (result == null) {
+ fail("Elseif 0 Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Elseif 0 Expression is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+
+ if (component.getElseIfPaths().get(0).getActivity() == null) {
+ fail("Elseif 0 no activity");
+ }
+
+ if ((component.getElseIfPaths().get(0).getActivity() instanceof Sequence) == false) {
+ fail("Elseif 0 Activity not a sequence");
+ }
+
+ if (component.getElseIfPaths().get(1).getCondition() == null) {
+ fail("Elseif 1 no condition");
+ }
+
+ result=component.getElseIfPaths().get(1).getCondition().getExpression();
+
+ if (result == null) {
+ fail("Elseif 1 Expression is null");
+ }
+
+ if (result.equals(expr3) == false) {
+ fail("Elseif 1 Expression is not valid: expecting '"+
+ expr3+"' but got '"+result+"'");
+ }
+
+ if (component.getElseIfPaths().get(1).getActivity() == null) {
+ fail("Elseif 1 no activity");
+ }
+
+ if ((component.getElseIfPaths().get(1).getActivity() instanceof Sequence) == false) {
+ fail("Elseif 1 Activity not a sequence");
+ }
+ }
+
+ public void testSetConditionNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</condition>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition=new Condition(model, elem);
+
+ If component=new If(model);
+
+ component.setCondition(condition);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetConditionReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</condition>";
+
+ String xml2="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</condition>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition1=new Condition(model, elem1);
+
+ If component=new If(model);
+
+ component.setCondition(condition1);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Condition condition2=new Condition(model, elem2);
+
+ component.setCondition(condition2);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetActivityInsertBeforeElse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<else>"+
+ "<sequence/>"+
+ "</else>"+
+ "</if>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, ifelem);
+
+ if (component.getActivity() != null) {
+ fail("Activity should be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+
+ component.setActivity(seq);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(Sequence.SEQUENCE) == false) {
+ fail("Second element was not a sequence: "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testSetConditionInsertBeforeElse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sources/>"+
+ "<else>"+
+ "<sequence/>"+
+ "</else>"+
+ "</if>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, ifelem);
+
+ String expr1="Test Expression 1";
+
+ Condition cond=new Condition(model);
+ cond.setExpression(expr1);
+
+ component.setCondition(cond);
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression not set");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression not same");
+ }
+
+ // Check position of condition
+ org.w3c.dom.NodeList nl=component.getDOMElement().getChildNodes();
+
+ if (nl.item(1).getLocalName().equals(Condition.CONDITION) == false) {
+ fail("Second child not is not condition: "+nl.item(1).getLocalName());
+ }
+ }
+
+ public void testSetActivityInsertBeforeElseIf() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<elseif>"+
+ "<condition/>"+
+ "<sequence/>"+
+ "</elseif>"+
+ "<else>"+
+ "<sequence/>"+
+ "</else>"+
+ "</if>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, ifelem);
+
+ if (component.getActivity() != null) {
+ fail("Activity should be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+
+ component.setActivity(seq);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(Sequence.SEQUENCE) == false) {
+ fail("Second element was not a sequence: "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testAddElseIf() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<sequence/>"+
+ "</if>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, ifelem);
+
+ if (component.getElseIfPaths().size() != 0) {
+ fail("Should be no elseif paths");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+ Elseif elseif=new Elseif(model);
+ elseif.setActivity(seq);
+
+ component.addElseIfPath(elseif);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(2).
+ getLocalName().equals(Elseif.ELSEIF) == false) {
+ fail("Third element was not an elseif: "+
+ component.getDOMElement().getChildNodes().item(2).
+ getLocalName());
+ }
+ }
+
+ public void testAddElseIfInsertBeforeElse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<sequence/>"+
+ "<else>"+
+ "<sequence/>"+
+ "</else>"+
+ "</if>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, ifelem);
+
+ if (component.getElseIfPaths().size() != 0) {
+ fail("Should be no elseif paths");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+ Elseif elseif=new Elseif(model);
+ elseif.setActivity(seq);
+
+ component.addElseIfPath(elseif);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(2).
+ getLocalName().equals(Elseif.ELSEIF) == false) {
+ fail("Third element was not an elseif: "+
+ component.getDOMElement().getChildNodes().item(2).
+ getLocalName());
+ }
+ }
+
+ public void testSetElseNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<sequence/>"+
+ "</if>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, ifelem);
+
+ if (component.getElsePath() != null) {
+ fail("Should be no else path");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+ Else elseElem=new Else(model);
+ elseElem.setActivity(seq);
+
+ component.setElsePath(elseElem);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(2).
+ getLocalName().equals(Else.ELSE) == false) {
+ fail("Third element was not an else: "+
+ component.getDOMElement().getChildNodes().item(2).
+ getLocalName());
+ }
+ }
+
+
+ public void testSetElseReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<sequence/>"+
+ "<else>"+
+ "<sequence/>"+
+ "</else>"+
+ "</if>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ If component=new If(model, ifelem);
+
+ if (component.getElsePath() == null) {
+ fail("Should have else path");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ If sub=new If(model);
+ Else elseElem=new Else(model);
+ elseElem.setActivity(sub);
+
+ component.setElsePath(elseElem);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(2).
+ getLocalName().equals(Else.ELSE) == false) {
+ fail("Third element was not an else: "+
+ component.getDOMElement().getChildNodes().item(2).
+ getLocalName());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(2).getFirstChild() == null) {
+ fail("Third element has no child");
+ }
+
+ if (component.getDOMElement().getChildNodes().item(2).getFirstChild().
+ getLocalName().equals(If.IF) == false) {
+ fail("Third element child was not an if: "+
+ component.getDOMElement().getChildNodes().item(2).
+ getFirstChild().getLocalName());
+ }
+ }
+
+ public void testGetURIIf() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence>"+
+ "<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "<elseif>"+
+ "<condition/>"+
+ "<sequence>"+
+ "<invoke/>"+
+ "</sequence>"+
+ "</elseif>"+
+ "<elseif>"+
+ "<condition/>"+
+ "<sequence>"+
+ "<reply/>"+
+ "</sequence>"+
+ "</elseif>"+
+ "<else>"+
+ "<sequence>"+
+ "<throw/>"+
+ "</sequence>"+
+ "</else>"+
+ "</if>"+
+ "</sequence>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof Sequence) == false) {
+ fail("Top level activity is not Sequence");
+ }
+
+ Sequence seq=(Sequence)topact;
+
+ if (seq.getActivities().size() != 1) {
+ fail("Should have 1 activity: "+seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof If) == false) {
+ fail("Activty should be If");
+ }
+
+ If ifelem=(If)seq.getActivities().get(0);
+
+ if ((ifelem.getActivity() instanceof Sequence) == false) {
+ fail("Inner scope activity is not a sequence");
+ }
+
+ Sequence innerseq=(Sequence)ifelem.getActivity();
+
+ if (innerseq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ innerseq.getActivities().size());
+ }
+
+ if ((innerseq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ Receive recv=(Receive)innerseq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@activities.0/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+
+ public void testGetURIIfElseIf() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence>"+
+ "<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "<elseif>"+
+ "<condition/>"+
+ "<sequence>"+
+ "<invoke/>"+
+ "</sequence>"+
+ "</elseif>"+
+ "<elseif>"+
+ "<condition/>"+
+ "<sequence>"+
+ "<reply/>"+
+ "</sequence>"+
+ "</elseif>"+
+ "<else>"+
+ "<sequence>"+
+ "<throw/>"+
+ "</sequence>"+
+ "</else>"+
+ "</if>"+
+ "</sequence>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof Sequence) == false) {
+ fail("Top level activity is not Sequence");
+ }
+
+ Sequence seq=(Sequence)topact;
+
+ if (seq.getActivities().size() != 1) {
+ fail("Should have 1 activity: "+seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof If) == false) {
+ fail("Activty should be If");
+ }
+
+ If ifelem=(If)seq.getActivities().get(0);
+
+ if (ifelem.getElseIfPaths().size() != 2) {
+ fail("Expecting 2 elseIf paths: "+ifelem.getElseIfPaths().size());
+ }
+
+ Elseif eif=ifelem.getElseIfPaths().get(1);
+
+ if ((eif.getActivity() instanceof Sequence) == false) {
+ fail("ElseIf activity not a sequence");
+ }
+
+ Sequence innerseq=(Sequence)eif.getActivity();
+
+ if (innerseq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ innerseq.getActivities().size());
+ }
+
+ if ((innerseq.getActivities().get(0) instanceof Reply) == false) {
+ fail("First activity should be Reply");
+ }
+
+ Reply reply=(Reply)innerseq.getActivities().get(0);
+
+ String uri=reply.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@activities.0/@elseif.1/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+
+ public void testGetURIIfElse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence>"+
+ "<if xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "<elseif>"+
+ "<condition/>"+
+ "<sequence>"+
+ "<invoke/>"+
+ "</sequence>"+
+ "</elseif>"+
+ "<elseif>"+
+ "<condition/>"+
+ "<sequence>"+
+ "<reply/>"+
+ "</sequence>"+
+ "</elseif>"+
+ "<else>"+
+ "<sequence>"+
+ "<throw/>"+
+ "</sequence>"+
+ "</else>"+
+ "</if>"+
+ "</sequence>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof Sequence) == false) {
+ fail("Top level activity is not Sequence");
+ }
+
+ Sequence seq=(Sequence)topact;
+
+ if (seq.getActivities().size() != 1) {
+ fail("Should have 1 activity: "+seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof If) == false) {
+ fail("Activty should be If");
+ }
+
+ If ifelem=(If)seq.getActivities().get(0);
+
+ if (ifelem.getElsePath() == null) {
+ fail("Else not set");
+ }
+
+ Else els=ifelem.getElsePath();
+
+ if ((els.getActivity() instanceof Sequence) == false) {
+ fail("Else activity not a sequence");
+ }
+
+ Sequence innerseq=(Sequence)els.getActivity();
+
+ if (innerseq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ innerseq.getActivities().size());
+ }
+
+ if ((innerseq.getActivities().get(0) instanceof Throw) == false) {
+ fail("First activity should be Throw");
+ }
+
+ Throw thr=(Throw)innerseq.getActivities().get(0);
+
+ String uri=thr.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@activities.0/@else/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/InvokeTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/InvokeTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/InvokeTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Invoke;
+
+import junit.framework.TestCase;
+
+public class InvokeTest extends TestCase {
+
+ public void testIsActivity() {
+ Invoke act=
+ new Invoke(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testBuildFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String iv="testIV";
+ String ov="testOV";
+
+ String xml="<invoke xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "inputVariable=\""+iv+"\" "+
+ "outputVariable=\""+ov+"\" "+
+ "/>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Invoke component=new Invoke(model, elem);
+
+ if (component.getInputVariable().equals(iv) == false) {
+ fail("Input variable not correct, expecting '"+iv+"': "+
+ component.getInputVariable());
+ }
+
+ if (component.getOutputVariable().equals(ov) == false) {
+ fail("Output variable not correct, expecting '"+ov+"': "+
+ component.getOutputVariable());
+ }
+ }
+
+ public void testGetInputVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ Invoke component=new Invoke(model);
+
+ if (component.getInputVariable() != null) {
+ fail("Should be null");
+ }
+
+ component.setInputVariable(var);
+
+ if (component.getInputVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getInputVariable());
+ }
+ }
+
+ public void testGetOutputVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ Invoke component=new Invoke(model);
+
+ if (component.getOutputVariable() != null) {
+ fail("Should be null");
+ }
+
+ component.setOutputVariable(var);
+
+ if (component.getOutputVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getOutputVariable());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnAlarmTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnAlarmTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnAlarmTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,913 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.For;
+import org.jboss.savara.tools.bpel.model.component.OnAlarm;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+import org.jboss.savara.tools.bpel.model.component.Until;
+
+import junit.framework.TestCase;
+
+public class OnAlarmTest extends TestCase {
+
+ public void testIsActivity() {
+ OnAlarm act=new OnAlarm(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildOnAlarmUntil() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<onAlarm xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<until>"+expr1+"</until>"+
+ "<scope/></onAlarm>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ OnAlarm component=new OnAlarm(model, elem);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should is set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getActivity() == null) {
+ fail("No activity");
+ }
+ }
+
+ public void testBuildOnAlarmFor() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<onAlarm xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<for>"+expr1+"</for>"+
+ "<scope/>"+
+ "</onAlarm>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ OnAlarm component=new OnAlarm(model, elem);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("For condition should is set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getActivity() == null) {
+ fail("No activity");
+ }
+ }
+
+ public void testSetUntilNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</until>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Until condition=new Until(model, elem);
+
+ OnAlarm component=new OnAlarm(model);
+
+ component.setUntil(condition);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should not be set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetUntilReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</until>";
+
+ String xml2="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</until>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Until condition1=new Until(model, elem1);
+
+ OnAlarm component=new OnAlarm(model);
+
+ component.setUntil(condition1);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should not be set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Until condition2=new Until(model, elem2);
+
+ component.setUntil(condition2);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should still not be set");
+ }
+
+ result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetForNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</for>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ For condition=new For(model, elem);
+
+ OnAlarm component=new OnAlarm(model);
+
+ component.setFor(condition);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should not be set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetForReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</for>";
+
+ String xml2="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</for>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ For condition1=new For(model, elem1);
+
+ OnAlarm component=new OnAlarm(model);
+
+ component.setFor(condition1);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should not be set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ For condition2=new For(model, elem2);
+
+ component.setFor(condition2);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should still not be set");
+ }
+
+ result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetForThenUntil() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</for>";
+
+ String xml2="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</until>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ For condition1=new For(model, elem1);
+
+ OnAlarm component=new OnAlarm(model);
+
+ component.setFor(condition1);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should not be set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Until condition2=new Until(model, elem2);
+
+ component.setUntil(condition2);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should still not be set");
+ }
+
+ result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetUntilThenFor() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</until>";
+
+ String xml2="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</for>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Until condition1=new Until(model, elem1);
+
+ OnAlarm component=new OnAlarm(model);
+
+ component.setUntil(condition1);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should not be set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ For condition2=new For(model, elem2);
+
+ component.setFor(condition2);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should still not be set");
+ }
+
+ result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testAddActivityOnAlarmUntil() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<onAlarm xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<until>"+expr1+"</until>"+
+ "</onAlarm>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ OnAlarm component=new OnAlarm(model, elem);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should is set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Scope sub=new Scope(model);
+ component.setActivity(sub);
+
+ if (component.getActivity() == null) {
+ fail("No activity");
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(Scope.SCOPE) == false) {
+ fail("Second element was not a scope: "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testAddActivityOnAlarmFor() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<onAlarm xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<for>"+expr1+"</for>"+
+ "</onAlarm>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ OnAlarm component=new OnAlarm(model, elem);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should is set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Scope sub=new Scope(model);
+ component.setActivity(sub);
+
+ if (component.getActivity() == null) {
+ fail("No activity");
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(Scope.SCOPE) == false) {
+ fail("Second element was not a Scope: "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testAddForOnAlarm() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<onAlarm xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<scope/>"+
+ "</onAlarm>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ OnAlarm component=new OnAlarm(model, elem);
+
+ if (component.getFor() != null) {
+ fail("For condition should not be set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should not be set");
+ }
+
+ if (component.getActivity() == null) {
+ fail("No activity");
+ }
+
+ For cond=new For(model);
+ cond.setExpression(expr1);
+
+ component.setFor(cond);
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getDOMElement().getChildNodes().item(0).
+ getLocalName().equals(For.FOR) == false) {
+ fail("First element was not a 'for': "+
+ component.getDOMElement().getChildNodes().item(0).
+ getLocalName());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(Scope.SCOPE) == false) {
+ fail("Second element was not a Scope: "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testAddUntilOnAlarm() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<onAlarm xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<scope/>"+
+ "</onAlarm>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ OnAlarm component=new OnAlarm(model, elem);
+
+ if (component.getFor() != null) {
+ fail("For condition should not be set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should not be set");
+ }
+
+ if (component.getActivity() == null) {
+ fail("No activity");
+ }
+
+ Until cond=new Until(model);
+ cond.setExpression(expr1);
+
+ component.setUntil(cond);
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getDOMElement().getChildNodes().item(0).
+ getLocalName().equals(Until.UNTIL) == false) {
+ fail("First element was not a 'until': "+
+ component.getDOMElement().getChildNodes().item(0).
+ getLocalName());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(Scope.SCOPE) == false) {
+ fail("Second element was not a Scope: "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnEventTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnEventTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnEventTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,175 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.OnEvent;
+
+import junit.framework.TestCase;
+
+public class OnEventTest extends TestCase {
+
+ public void testIsActivity() {
+ OnEvent act=new OnEvent(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildEHOnEvent() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVar";
+ String op="testOp";
+ String portType="testPortType";
+ String partnerLink="testPartnerLink";
+
+ String xml="<onEvent xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" " +
+ "operation=\""+op+"\" "+
+ "partnerLink=\""+partnerLink+"\" "+
+ "portType=\""+portType+"\" "+
+ "variable=\""+var+"\" "+
+ " >"+
+ "<scope/></onEvent>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ OnEvent component=new OnEvent(model, elem);
+
+ if (component.getScope() == null) {
+ fail("No scope");
+ }
+
+ if (component.getVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getVariable());
+ }
+
+ if (component.getOperation().equals(op) == false) {
+ fail("Operation not correct, expecting '"+op+"': "+
+ component.getOperation());
+ }
+
+ if (component.getPartnerLink().equals(partnerLink) == false) {
+ fail("PartnerLink not correct, expecting '"+partnerLink+"': "+
+ component.getPartnerLink());
+ }
+
+ if (component.getPortType().equals(portType) == false) {
+ fail("Port type not correct, expecting '"+portType+"': "+
+ component.getPortType());
+ }
+ }
+
+ public void testGetVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ OnEvent component=new OnEvent(model);
+
+ if (component.getVariable() != null) {
+ fail("Should be null");
+ }
+
+ component.setVariable(var);
+
+ if (component.getVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getVariable());
+ }
+ }
+
+ public void testGetOperation() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String op="testOp";
+
+ OnEvent component=new OnEvent(model);
+
+ if (component.getOperation() != null) {
+ fail("Should be null");
+ }
+
+ component.setOperation(op);
+
+ if (component.getOperation().equals(op) == false) {
+ fail("Operation not correct, expecting '"+op+"': "+
+ component.getOperation());
+ }
+ }
+
+ public void testGetPortType() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String pt="testPortType";
+
+ OnEvent component=new OnEvent(model);
+
+ if (component.getPortType() != null) {
+ fail("Should be null");
+ }
+
+ component.setPortType(pt);
+
+ if (component.getPortType().equals(pt) == false) {
+ fail("Port type not correct, expecting '"+pt+"': "+
+ component.getPortType());
+ }
+ }
+
+ public void testGetPartnerLink() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String pl="testPartnerLink";
+
+ OnEvent component=new OnEvent(model);
+
+ if (component.getPartnerLink() != null) {
+ fail("Should be null");
+ }
+
+ component.setPartnerLink(pl);
+
+ if (component.getPartnerLink().equals(pl) == false) {
+ fail("Partner link not correct, expecting '"+pl+"': "+
+ component.getPartnerLink());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnMessageTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnMessageTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/OnMessageTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.OnMessage;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class OnMessageTest extends TestCase {
+
+ public void testIsActivity() {
+ OnMessage act=new OnMessage(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildOnMessage() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVar";
+ String op="testOp";
+ String portType="testPortType";
+ String partnerLink="testPartnerLink";
+
+ String xml="<onMessage xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" " +
+ "operation=\""+op+"\" "+
+ "partnerLink=\""+partnerLink+"\" "+
+ "portType=\""+portType+"\" "+
+ "variable=\""+var+"\" "+
+ " >"+
+ "<sequence/></onMessage>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ OnMessage component=new OnMessage(model, elem);
+
+ if (component.getActivity() == null) {
+ fail("No activity");
+ }
+
+ if ((component.getActivity() instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+
+ if (component.getVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getVariable());
+ }
+
+ if (component.getOperation().equals(op) == false) {
+ fail("Operation not correct, expecting '"+op+"': "+
+ component.getOperation());
+ }
+
+ if (component.getPartnerLink().equals(partnerLink) == false) {
+ fail("PartnerLink not correct, expecting '"+partnerLink+"': "+
+ component.getPartnerLink());
+ }
+
+ if (component.getPortType().equals(portType) == false) {
+ fail("Port type not correct, expecting '"+portType+"': "+
+ component.getPortType());
+ }
+ }
+
+ public void testGetVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ OnMessage component=new OnMessage(model);
+
+ if (component.getVariable() != null) {
+ fail("Should be null");
+ }
+
+ component.setVariable(var);
+
+ if (component.getVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getVariable());
+ }
+ }
+
+ public void testGetOperation() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String op="testOp";
+
+ OnMessage component=new OnMessage(model);
+
+ if (component.getOperation() != null) {
+ fail("Should be null");
+ }
+
+ component.setOperation(op);
+
+ if (component.getOperation().equals(op) == false) {
+ fail("Operation not correct, expecting '"+op+"': "+
+ component.getOperation());
+ }
+ }
+
+ public void testGetPortType() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String pt="testPortType";
+
+ OnMessage component=new OnMessage(model);
+
+ if (component.getPortType() != null) {
+ fail("Should be null");
+ }
+
+ component.setPortType(pt);
+
+ if (component.getPortType().equals(pt) == false) {
+ fail("Port type not correct, expecting '"+pt+"': "+
+ component.getPortType());
+ }
+ }
+
+ public void testGetPartnerLink() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String pl="testPartnerLink";
+
+ OnMessage component=new OnMessage(model);
+
+ if (component.getPartnerLink() != null) {
+ fail("Should be null");
+ }
+
+ component.setPartnerLink(pl);
+
+ if (component.getPartnerLink().equals(pl) == false) {
+ fail("Partner link not correct, expecting '"+pl+"': "+
+ component.getPartnerLink());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/PartnerLinkTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/PartnerLinkTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/PartnerLinkTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.PartnerLink;
+
+import junit.framework.TestCase;
+
+public class PartnerLinkTest extends TestCase {
+
+ public void testIsActivity() {
+ PartnerLink act=new PartnerLink(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildPartnerLink() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String partnerRole="testPartnerRole";
+ String name="testName";
+ String myRole="testMyRole";
+ String partnerLinkType="testPartnerLinkType";
+
+ String xml="<partnerLink xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" " +
+ "name=\""+name+"\" "+
+ "partnerLinkType=\""+partnerLinkType+"\" "+
+ "myRole=\""+myRole+"\" "+
+ "partnerRole=\""+partnerRole+"\" "+
+ " />";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ PartnerLink component=new PartnerLink(model, elem);
+
+ if (component.getPartnerRole().equals(partnerRole) == false) {
+ fail("PartnerRole not correct, expecting '"+partnerRole+"': "+
+ component.getPartnerRole());
+ }
+
+ if (component.getName().equals(name) == false) {
+ fail("Name not correct, expecting '"+name+"': "+
+ component.getName());
+ }
+
+ if (component.getPartnerLinkType().equals(partnerLinkType) == false) {
+ fail("PartnerLinkType not correct, expecting '"+partnerLinkType+"': "+
+ component.getPartnerLinkType());
+ }
+
+ if (component.getMyRole().equals(myRole) == false) {
+ fail("MyRole not correct, expecting '"+myRole+"': "+
+ component.getMyRole());
+ }
+ }
+
+ public void testGetName() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String name="testName";
+
+ PartnerLink component=new PartnerLink(model);
+
+ if (component.getName() != null) {
+ fail("Name should be null");
+ }
+
+ component.setName(name);
+
+ if (component.getName().equals(name) == false) {
+ fail("Name not correct, expecting '"+name+"': "+
+ component.getName());
+ }
+ }
+
+ public void testGetPartnerLinkType() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String plt="testPartnerLinkType";
+
+ PartnerLink component=new PartnerLink(model);
+
+ if (component.getPartnerLinkType() != null) {
+ fail("Partner link type should be null");
+ }
+
+ component.setPartnerLinkType(plt);
+
+ if (component.getPartnerLinkType().equals(plt) == false) {
+ fail("PartnerLinkType not correct, expecting '"+plt+"': "+
+ component.getPartnerLinkType());
+ }
+ }
+
+ public void testGetMyRole() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String mr="testMyRole";
+
+ PartnerLink component=new PartnerLink(model);
+
+ if (component.getMyRole() != null) {
+ fail("My role is not null");
+ }
+
+ component.setMyRole(mr);
+
+ if (component.getMyRole().equals(mr) == false) {
+ fail("MyRole not correct, expecting '"+mr+"': "+
+ component.getMyRole());
+ }
+ }
+
+ public void testGetPartnerRole() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String pr="testPartnerRole";
+
+ PartnerLink component=new PartnerLink(model);
+
+ if (component.getPartnerRole() != null) {
+ fail("Partner role should be null");
+ }
+
+ component.setPartnerRole(pr);
+
+ if (component.getPartnerRole().equals(pr) == false) {
+ fail("PartnerRole not correct, expecting '"+pr+"': "+
+ component.getPartnerRole());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/PickTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/PickTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/PickTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,417 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.OnAlarm;
+import org.jboss.savara.tools.bpel.model.component.OnMessage;
+import org.jboss.savara.tools.bpel.model.component.Pick;
+
+import junit.framework.TestCase;
+
+public class PickTest extends TestCase {
+
+ public void testIsActivity() {
+ Pick act=new Pick(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testPickFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<pick xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<onMessage/>"+
+ "<onMessage/>"+
+ "<onAlarm/>"+
+ "</pick>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Pick component=new Pick(model, elem);
+
+ if (component.getOnMessages().size() != 2) {
+ fail("Expecting 2 onMessage: "+
+ component.getOnMessages().size());
+ }
+
+ if (component.getOnAlarms().size() != 1) {
+ fail("Expecting 1 onAlarm: "+
+ component.getOnAlarms().size());
+ }
+ }
+
+ public void testAddOnMessageToPickInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<pick xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<onAlarm/>"+
+ "<onAlarm/>"+
+ "</pick>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Pick component=new Pick(model, elem);
+
+ if (component.getOnAlarms().size() != 2) {
+ fail("Expecting 2 onAlarms: "+
+ component.getOnAlarms().size());
+ }
+
+ if (component.getOnMessages().size() != 0) {
+ fail("Expecting 0 onMessages: "+
+ component.getOnMessages().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ OnMessage sub=new OnMessage(model);
+
+ component.addOnMessage(sub, 0);
+
+ if (component.getOnMessages().size() != 1) {
+ fail("Expecting 1 onMessage: "+
+ component.getOnMessages().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(OnMessage.ONMESSAGE) == false) {
+ fail("Second element was not a 'onMessage': "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+
+ public void testAddOnAlarmToPickInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<pick xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<onMessage/>"+
+ "<onMessage/>"+
+ "</pick>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Pick component=new Pick(model, elem);
+
+ if (component.getOnMessages().size() != 2) {
+ fail("Expecting 2 onMessages: "+
+ component.getOnMessages().size());
+ }
+
+ if (component.getOnAlarms().size() != 0) {
+ fail("Expecting 0 onAlarms: "+
+ component.getOnAlarms().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ OnAlarm sub=new OnAlarm(model);
+
+ component.addOnAlarm(sub, 0);
+
+ if (component.getOnAlarms().size() != 1) {
+ fail("Expecting 1 onAlarm: "+
+ component.getOnAlarms().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(3).
+ getLocalName().equals(OnAlarm.ONALARM) == false) {
+ fail("Second element was not a 'onAlarm': "+
+ component.getDOMElement().getChildNodes().item(3).
+ getLocalName());
+ }
+ }
+
+ public void testGetURIOnAlarm() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence>"+
+ "<pick>"+
+ "<onAlarm>"+
+ "<scope>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</scope>"+
+ "</onAlarm>"+
+ "</pick>"+
+ "</sequence>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof Sequence) == false) {
+ fail("Top level activity is not Sequence");
+ }
+
+ Sequence topseq=(Sequence)topact;
+
+ if (topseq.getActivities().size() != 1) {
+ fail("Top sequence should have 1 activity");
+ }
+
+ if ((topseq.getActivities().get(0) instanceof Pick) == false) {
+ fail("Activity is not Pick");
+ }
+
+ Pick pick=(Pick)topseq.getActivities().get(0);
+
+ OnAlarm one=pick.getOnAlarms().get(0);
+
+ if ((one.getActivity() instanceof Scope) == false) {
+ fail("Activity is not scope");
+ }
+
+ Scope innerScope=(Scope)one.getActivity();
+
+ if (innerScope == null) {
+ fail("Inner scope not set");
+ }
+
+ if ((innerScope.getActivity() instanceof Sequence) == false) {
+ fail("Inner scope activity is not a sequence");
+ }
+
+ Sequence seq=(Sequence)innerScope.getActivity();
+
+ if (seq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@activities.0/@onAlarm.0/@scope/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+
+ public void testGetURIOnMessage() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence>"+
+ "<pick>"+
+ "<onMessage>"+
+ "<scope>"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</scope>"+
+ "</onMessage>"+
+ "</pick>"+
+ "</sequence>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof Sequence) == false) {
+ fail("Top level activity is not Sequence");
+ }
+
+ Sequence topseq=(Sequence)topact;
+
+ if (topseq.getActivities().size() != 1) {
+ fail("Top sequence should have 1 activity");
+ }
+
+ if ((topseq.getActivities().get(0) instanceof Pick) == false) {
+ fail("Activity is not Pick");
+ }
+
+ Pick pick=(Pick)topseq.getActivities().get(0);
+
+ OnMessage one=pick.getOnMessages().get(0);
+
+ if ((one.getActivity() instanceof Scope) == false) {
+ fail("Activity is not scope");
+ }
+
+ Scope innerScope=(Scope)one.getActivity();
+
+ if (innerScope == null) {
+ fail("Inner scope not set");
+ }
+
+ if ((innerScope.getActivity() instanceof Sequence) == false) {
+ fail("Inner scope activity is not a sequence");
+ }
+
+ Sequence seq=(Sequence)innerScope.getActivity();
+
+ if (seq.getActivities().size() != 1) {
+ fail("Expecting 1 child activities: "+
+ seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@activities.0/@onMessage.0/@activity/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ProcessTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ProcessTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ProcessTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,440 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.EventHandlers;
+import org.jboss.savara.tools.bpel.model.component.FaultHandlers;
+import org.jboss.savara.tools.bpel.model.component.PartnerLink;
+import org.jboss.savara.tools.bpel.model.component.Process;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+import org.jboss.savara.tools.bpel.model.component.Variable;
+
+import junit.framework.TestCase;
+
+public class ProcessTest extends TestCase {
+
+ public void testIsActivity() {
+ Process act=new Process(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testProcessFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<messageExchanges/>"+
+ "<variables><variable/></variables>"+
+ "<correlationSets/>"+
+ "<faultHandlers/>"+
+ "<eventHandlers/>"+
+ "<sequence/>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ if (component.getPartnerLinks().size() != 1) {
+ fail("Expecting 1 partner link: "+component.getPartnerLinks().size());
+ }
+
+ if (component.getVariables().size() != 1) {
+ fail("Expecting 1 variable: "+component.getVariables().size());
+ }
+
+ if (component.getActivity() == null) {
+ fail("Activity not defined");
+ }
+
+ if (component.getEventHandlers() == null) {
+ fail("Event handlers not defined");
+ }
+
+ if (component.getFaultHandlers() == null) {
+ fail("Fault handlers not defined");
+ }
+ }
+
+ public void testAddVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<faultHandlers/>"+
+ "<eventHandlers/>"+
+ "<sequence/>"+
+ "</process>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, ifelem);
+
+ if (component.getVariables().size() != 0) {
+ fail("Should be no variables");
+ }
+
+ Variable var=new Variable(model);
+ component.addVariable(var, 0);
+
+ if (component.getVariables().size() != 1) {
+ fail("Should be one variable: "+component.getVariables().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(2).getLocalName().equals("variables") == false) {
+ fail("Child 2 not as expected: "+component.getDOMElement().getChildNodes().
+ item(2).getLocalName());
+ }
+ }
+
+ public void testAddPartnerLink() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<messageExchanges/>"+
+ "<variables><variable/></variables>"+
+ "<correlationSets/>"+
+ "<faultHandlers/>"+
+ "<eventHandlers/>"+
+ "<sequence/>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ if (component.getPartnerLinks().size() != 0) {
+ fail("Should be no partner links");
+ }
+
+ PartnerLink pl=new PartnerLink(model);
+ component.addPartnerLink(pl, 0);
+
+ if (component.getPartnerLinks().size() != 1) {
+ fail("Should be one partner link: "+component.getPartnerLinks().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(0).getLocalName().equals("partnerLinks") == false) {
+ fail("Child 0 not as expected: "+component.getDOMElement().getChildNodes().
+ item(0).getLocalName());
+ }
+ }
+
+ public void testGetPartnerLink() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ Process component=new Process(model);
+ String name="testName";
+
+ PartnerLink pl=new PartnerLink(model);
+ pl.setName(name);
+
+ component.addPartnerLink(pl, 0);
+
+ if (component.getPartnerLink(name) == null) {
+ fail("Failed to get partner link for '"+name+"'");
+ }
+
+ if (component.getPartnerLink("unknown") != null) {
+ fail("Should not have returned a partner link");
+ }
+ }
+
+ public void testSetEventHandlers() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<messageExchanges/>"+
+ "<variables><variable/></variables>"+
+ "<correlationSets/>"+
+ "<faultHandlers/>"+
+ "<sequence/>"+
+ "</process>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, ifelem);
+
+ if (component.getEventHandlers() != null) {
+ fail("Should be null");
+ }
+
+ EventHandlers elem=new EventHandlers(model);
+ component.setEventHandlers(elem);
+
+ if (component.getEventHandlers() == null) {
+ fail("Should NOT be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(5).getLocalName().equals("eventHandlers") == false) {
+ fail("Child 5 not as expected: "+component.getDOMElement().getChildNodes().
+ item(5).getLocalName());
+ }
+ }
+
+ public void testSetFaultHandlers() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<messageExchanges/>"+
+ "<variables><variable/></variables>"+
+ "<correlationSets/>"+
+ "<eventHandlers/>"+
+ "<sequence/>"+
+ "</process>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, ifelem);
+
+ if (component.getFaultHandlers() != null) {
+ fail("Should be null");
+ }
+
+ FaultHandlers elem=new FaultHandlers(model);
+ component.setFaultHandlers(elem);
+
+ if (component.getFaultHandlers() == null) {
+ fail("Should NOT be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(4).getLocalName().equals("faultHandlers") == false) {
+ fail("Child 4 not as expected: "+component.getDOMElement().getChildNodes().
+ item(4).getLocalName());
+ }
+ }
+
+ public void testSetActivity() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<messageExchanges/>"+
+ "<variables><variable/></variables>"+
+ "<correlationSets/>"+
+ "<faultHandlers/>"+
+ "<eventHandlers/>"+
+ "</process>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, ifelem);
+
+ if (component.getActivity() != null) {
+ fail("Should be null");
+ }
+
+ Sequence elem=new Sequence(model);
+ component.setActivity(elem);
+
+ if (component.getActivity() == null) {
+ fail("Should NOT be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(6).getLocalName().equals(Sequence.SEQUENCE) == false) {
+ fail("Child 6 not as expected: "+component.getDOMElement().getChildNodes().
+ item(6).getLocalName());
+ }
+ }
+
+ public void testAddDistinctNamespaces() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ Process component=new Process(model);
+
+ String prefix1=component.addNamespace("namespace1");
+ String prefix2=component.addNamespace("namespace2");
+
+ if (prefix1 == null) {
+ fail("First prefix is null");
+ }
+
+ if (prefix2 == null) {
+ fail("Second prefix is null");
+ }
+
+ if (prefix1.equals(prefix2)) {
+ fail("Prefixes should be different: "+prefix1+" "+prefix2);
+ }
+ }
+
+ public void testAddSameNamespaces() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ Process component=new Process(model);
+
+ String prefix1=component.addNamespace("namespace1");
+ String prefix2=component.addNamespace("namespace1");
+
+ if (prefix1 == null) {
+ fail("First prefix is null");
+ }
+
+ if (prefix2 == null) {
+ fail("Second prefix is null");
+ }
+
+ if (prefix1.equals(prefix2) == false) {
+ fail("Prefixes should be same: "+prefix1+" "+prefix2);
+ }
+ }
+
+ public void testDefaultNamesapces() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ Process component=new Process(model);
+
+ String ns=component.getNamespace(Process.BPEL_PREFIX);
+
+ if (ns == null) {
+ fail("Namespace not found");
+ }
+
+ if (ns.equals(Process.BPEL_NS) == false) {
+ fail("Namespace is wrong: "+ns+" was expecting "+Process.BPEL_NS);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ReceiveTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ReceiveTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ReceiveTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,200 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Receive;
+
+import junit.framework.TestCase;
+
+public class ReceiveTest extends TestCase {
+
+ public void testIsActivity() {
+ Receive act=
+ new Receive(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testBuildFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVar";
+ String create="yes";
+
+ String xml="<receive xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "variable=\""+var+"\" "+
+ "createInstance=\""+create+"\" "+
+ "/>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Receive component=new Receive(model, elem);
+
+ if (component.getVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getVariable());
+ }
+
+ if (component.getCreateInstance() == false) {
+ fail("createInstance not correct, expecting 'true': "+
+ component.getCreateInstance());
+ }
+ }
+
+ public void testGetVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ Receive component=new Receive(model);
+
+ if (component.getVariable() != null) {
+ fail("Should be null");
+ }
+
+ component.setVariable(var);
+
+ if (component.getVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getVariable());
+ }
+ }
+
+ public void testCreateInstanceFromDOMTrue() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String value="yes";
+
+ String xml="<activity xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "createInstance=\""+value+"\" />";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Receive component=new Receive(model, elem);
+
+ if (component.getCreateInstance() == false) {
+ fail("'Suppress Join Failure' not correct, expecting 'true': "+
+ component.getCreateInstance());
+ }
+ }
+
+ public void testCreateInstanceFromDOMFalse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String value="no";
+
+ String xml="<activity xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "createInstance=\""+value+"\" />";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Receive component=new Receive(model, elem);
+
+ if (component.getCreateInstance() == true) {
+ fail("'Suppress Join Failure' not correct, expecting 'false': "+
+ component.getCreateInstance());
+ }
+ }
+
+ public void testGetCreateInstanceTrue() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ Receive component=new Receive(model);
+
+ component.setCreateInstance(true);
+
+ if (component.getCreateInstance() == false) {
+ fail("'Suppress Join Failure' not correct, expecting 'true': "+
+ component.getCreateInstance());
+ }
+ }
+
+ public void testGetCreateInstanceFalse() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ Receive component=new Receive(model);
+
+ component.setCreateInstance(false);
+
+ if (component.getCreateInstance() == true) {
+ fail("'Suppress Join Failure' not correct, expecting 'false': "+
+ component.getCreateInstance());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/RepeatUntilTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/RepeatUntilTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/RepeatUntilTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,477 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Condition;
+import org.jboss.savara.tools.bpel.model.component.If;
+import org.jboss.savara.tools.bpel.model.component.RepeatUntil;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+
+import junit.framework.TestCase;
+
+public class RepeatUntilTest extends TestCase {
+
+ public void testIsActivity() {
+ RepeatUntil act=new RepeatUntil(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<repeatUntil xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence/>"+
+ "<condition>"+expr1+"</condition>"+
+ "</repeatUntil>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ RepeatUntil component=new RepeatUntil(model, elem);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getActivity() == null) {
+ fail("Activity not set");
+ }
+
+ if ((component.getActivity() instanceof Sequence) == false) {
+ fail("Activity not a sequence");
+ }
+ }
+
+ public void testSetActivityInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<repeatUntil xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<condition>"+expr1+"</condition>"+
+ "</repeatUntil>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ RepeatUntil component=new RepeatUntil(model, elem);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getActivity() != null) {
+ fail("Activity should be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ If sub=new If(model);
+
+ component.setActivity(sub);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(If.IF) == false) {
+ fail("Second element was not an 'if': "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testSetConditionNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</condition>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition=new Condition(model, elem);
+
+ RepeatUntil component=new RepeatUntil(model);
+
+ component.setCondition(condition);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetConditionReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</condition>";
+
+ String xml2="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</condition>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition1=new Condition(model, elem1);
+
+ RepeatUntil component=new RepeatUntil(model);
+
+ component.setCondition(condition1);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Condition condition2=new Condition(model, elem2);
+
+ component.setCondition(condition2);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetActivityNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<repeatUntil xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "</repeatUntil>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ RepeatUntil component=new RepeatUntil(model, ifelem);
+
+ if (component.getActivity() != null) {
+ fail("Activity should be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 1) {
+ fail("One child element expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+
+ component.setActivity(seq);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(0).
+ getLocalName().equals(Sequence.SEQUENCE) == false) {
+ fail("First element was not a sequence: "+
+ component.getDOMElement().getChildNodes().item(0).
+ getLocalName());
+ }
+ }
+
+ public void testSetActivityReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<repeatUntil xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence/>"+
+ "<condition/>"+
+ "</repeatUntil>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ RepeatUntil component=new RepeatUntil(model, ifelem);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ If sub=new If(model);
+
+ component.setActivity(sub);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(0).
+ getLocalName().equals(If.IF) == false) {
+ fail("First element was not an 'if': "+
+ component.getDOMElement().getChildNodes().item(0).
+ getLocalName());
+ }
+ }
+
+ public void testGetURI() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<repeatUntil xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</repeatUntil>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof RepeatUntil) == false) {
+ fail("Top level activity is not RepeatUntil");
+ }
+
+ RepeatUntil top=(RepeatUntil)topact;
+
+ if (top.getActivity() == null) {
+ fail("While activity is null");
+ }
+
+ if ((top.getActivity() instanceof Sequence) == false) {
+ fail("While activity is not sequence");
+ }
+
+ Sequence seq=(Sequence)top.getActivity();
+
+ if (seq.getActivities().size() != 1) {
+ fail("Should have 1 activity: "+seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("Activty should be Receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ReplyTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ReplyTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ReplyTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Reply;
+
+import junit.framework.TestCase;
+
+public class ReplyTest extends TestCase {
+
+ public void testIsActivity() {
+ Reply act=
+ new Reply(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testBuildFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVar";
+ String fault="testFault";
+
+ String xml="<reply xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "variable=\""+var+"\" "+
+ "faultName=\""+fault+"\" "+
+ "/>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Reply component=new Reply(model, elem);
+
+ if (component.getVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getVariable());
+ }
+
+ if (component.getFaultName().equals(fault) == false) {
+ fail("Fault not correct, expecting '"+fault+"': "+
+ component.getFaultName());
+ }
+ }
+
+ public void testGetVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ Reply component=new Reply(model);
+
+ if (component.getVariable() != null) {
+ fail("Should be null");
+ }
+
+ component.setVariable(var);
+
+ if (component.getVariable().equals(var) == false) {
+ fail("Variable not correct, expecting '"+var+"': "+
+ component.getVariable());
+ }
+ }
+
+ public void testGetFaultName() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String fault="testFault";
+
+ Reply component=new Reply(model);
+
+ if (component.getFaultName() != null) {
+ fail("Should be null");
+ }
+
+ component.setFaultName(fault);
+
+ if (component.getFaultName().equals(fault) == false) {
+ fail("Fault name not correct, expecting '"+fault+"': "+
+ component.getFaultName());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/RethrowTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/RethrowTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/RethrowTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Rethrow;
+
+import junit.framework.TestCase;
+
+public class RethrowTest extends TestCase {
+
+ public void testIsActivity() {
+ Rethrow act=
+ new Rethrow(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ScopeTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ScopeTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ScopeTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,494 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.CompensationHandler;
+import org.jboss.savara.tools.bpel.model.component.EventHandlers;
+import org.jboss.savara.tools.bpel.model.component.FaultHandlers;
+import org.jboss.savara.tools.bpel.model.component.PartnerLink;
+import org.jboss.savara.tools.bpel.model.component.Scope;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+import org.jboss.savara.tools.bpel.model.component.TerminationHandler;
+import org.jboss.savara.tools.bpel.model.component.Variable;
+
+import junit.framework.TestCase;
+
+public class ScopeTest extends TestCase {
+
+ public void testIsActivity() {
+ Scope act=new Scope(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testScopeFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<scope xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<variables><variable/></variables>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<eventHandlers/>"+
+ "<faultHandlers/>"+
+ "<compensationHandler/>"+
+ "<terminationHandler/>"+
+ "<sequence/>"+
+ "</scope>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Scope component=new Scope(model, elem);
+
+ if (component.getPartnerLinks().size() != 1) {
+ fail("Expecting 1 partner link: "+component.getPartnerLinks().size());
+ }
+
+ if (component.getVariables().size() != 1) {
+ fail("Expecting 1 variable: "+component.getVariables().size());
+ }
+
+ if (component.getActivity() == null) {
+ fail("Activity not defined");
+ }
+
+ if (component.getCompensationHandler() == null) {
+ fail("Compensation handler not defined");
+ }
+
+ if (component.getEventHandlers() == null) {
+ fail("Event handlers not defined");
+ }
+
+ if (component.getFaultHandlers() == null) {
+ fail("Fault handlers not defined");
+ }
+
+ if (component.getTerminationHandler() == null) {
+ fail("Termination handler not defined");
+ }
+ }
+
+ public void testAddVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<scope xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<eventHandlers/>"+
+ "<faultHandlers/>"+
+ "<compensationHandler/>"+
+ "<terminationHandler/>"+
+ "<sequence/>"+
+ "</scope>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Scope component=new Scope(model, ifelem);
+
+ if (component.getVariables().size() != 0) {
+ fail("Should be no variables");
+ }
+
+ Variable var=new Variable(model);
+ component.addVariable(var, 0);
+
+ if (component.getVariables().size() != 1) {
+ fail("Should be one variable: "+component.getVariables().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(0).getLocalName().equals("variables") == false) {
+ fail("Child 0 not as expected: "+component.getDOMElement().getChildNodes().
+ item(0).getLocalName());
+ }
+ }
+
+ public void testAddPartnerLink() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<scope xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<variables><variable/></variables>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<eventHandlers/>"+
+ "<faultHandlers/>"+
+ "<compensationHandler/>"+
+ "<terminationHandler/>"+
+ "<sequence/>"+
+ "</scope>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Scope component=new Scope(model, elem);
+
+ if (component.getPartnerLinks().size() != 0) {
+ fail("Should be no partner links");
+ }
+
+ PartnerLink pl=new PartnerLink(model);
+ component.addPartnerLink(pl, 0);
+
+ if (component.getPartnerLinks().size() != 1) {
+ fail("Should be one partner link: "+component.getPartnerLinks().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(1).getLocalName().equals("partnerLinks") == false) {
+ fail("Child 1 not as expected: "+component.getDOMElement().getChildNodes().
+ item(1).getLocalName());
+ }
+ }
+
+ public void testSetEventHandlers() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<scope xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<variables><variable/></variables>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<faultHandlers/>"+
+ "<compensationHandler/>"+
+ "<terminationHandler/>"+
+ "<sequence/>"+
+ "</scope>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Scope component=new Scope(model, ifelem);
+
+ if (component.getEventHandlers() != null) {
+ fail("Should be null");
+ }
+
+ EventHandlers elem=new EventHandlers(model);
+ component.setEventHandlers(elem);
+
+ if (component.getEventHandlers() == null) {
+ fail("Should NOT be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(4).getLocalName().equals("eventHandlers") == false) {
+ fail("Child 4 not as expected: "+component.getDOMElement().getChildNodes().
+ item(4).getLocalName());
+ }
+ }
+
+ public void testSetFaultHandlers() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<scope xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<variables><variable/></variables>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<eventHandlers/>"+
+ "<compensationHandler/>"+
+ "<terminationHandler/>"+
+ "<sequence/>"+
+ "</scope>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Scope component=new Scope(model, ifelem);
+
+ if (component.getFaultHandlers() != null) {
+ fail("Should be null");
+ }
+
+ FaultHandlers elem=new FaultHandlers(model);
+ component.setFaultHandlers(elem);
+
+ if (component.getFaultHandlers() == null) {
+ fail("Should NOT be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(5).getLocalName().equals("faultHandlers") == false) {
+ fail("Child 5 not as expected: "+component.getDOMElement().getChildNodes().
+ item(5).getLocalName());
+ }
+ }
+
+ public void testSetCompensationHandler() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<scope xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<variables><variable/></variables>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<eventHandlers/>"+
+ "<faultHandlers/>"+
+ "<terminationHandler/>"+
+ "<sequence/>"+
+ "</scope>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Scope component=new Scope(model, ifelem);
+
+ if (component.getCompensationHandler() != null) {
+ fail("Should be null");
+ }
+
+ CompensationHandler elem=new CompensationHandler(model);
+ component.setCompensationHandler(elem);
+
+ if (component.getCompensationHandler() == null) {
+ fail("Should NOT be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(6).getLocalName().equals("compensationHandler") == false) {
+ fail("Child 6 not as expected: "+component.getDOMElement().getChildNodes().
+ item(6).getLocalName());
+ }
+ }
+
+ public void testSetTerminationHandler() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<scope xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<variables><variable/></variables>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<eventHandlers/>"+
+ "<faultHandlers/>"+
+ "<compensationHandler/>"+
+ "<sequence/>"+
+ "</scope>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Scope component=new Scope(model, ifelem);
+
+ if (component.getTerminationHandler() != null) {
+ fail("Should be null");
+ }
+
+ TerminationHandler elem=new TerminationHandler(model);
+ component.setTerminationHandler(elem);
+
+ if (component.getTerminationHandler() == null) {
+ fail("Should NOT be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(7).getLocalName().equals("terminationHandler") == false) {
+ fail("Child 7 not as expected: "+component.getDOMElement().getChildNodes().
+ item(7).getLocalName());
+ }
+ }
+
+ public void testSetActivity() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<scope xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<partnerLinks><partnerLink/></partnerLinks>"+
+ "<variables><variable/></variables>"+
+ "<messageExchanges/>"+
+ "<correlationSets/>"+
+ "<eventHandlers/>"+
+ "<faultHandlers/>"+
+ "<compensationHandler/>"+
+ "<terminationHandler/>"+
+ "</scope>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Scope component=new Scope(model, ifelem);
+
+ if (component.getActivity() != null) {
+ fail("Should be null");
+ }
+
+ Sequence elem=new Sequence(model);
+ component.setActivity(elem);
+
+ if (component.getActivity() == null) {
+ fail("Should NOT be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().
+ item(8).getLocalName().equals(Sequence.SEQUENCE) == false) {
+ fail("Child 8 not as expected: "+component.getDOMElement().getChildNodes().
+ item(8).getLocalName());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/SequenceTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/SequenceTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/SequenceTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,333 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+import org.jboss.savara.tools.bpel.model.component.While;
+
+import junit.framework.TestCase;
+
+public class SequenceTest extends TestCase {
+
+ public void testIsActivity() {
+ Sequence act=new Sequence(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testSequenceFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<sequence xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<if/>"+
+ "<if/>"+
+ "</sequence>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Sequence component=new Sequence(model, elem);
+
+ if (component.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ component.getActivities().size());
+ }
+ }
+
+ public void testAddFirstActToSequenceInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<sequence xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<if/>"+
+ "<if/>"+
+ "</sequence>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Sequence component=new Sequence(model, elem);
+
+ if (component.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ While sub=new While(model);
+
+ component.addActivity(sub, 0);
+
+ if (component.getActivities().size() != 3) {
+ fail("Expecting 3 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(While.WHILE) == false) {
+ fail("Second element was not a 'while': "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testAddSecondActToSequenceInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<sequence xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<if/>"+
+ "<if/>"+
+ "</sequence>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Sequence component=new Sequence(model, elem);
+
+ if (component.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ While sub=new While(model);
+
+ component.addActivity(sub, 1);
+
+ if (component.getActivities().size() != 3) {
+ fail("Expecting 3 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(2).
+ getLocalName().equals(While.WHILE) == false) {
+ fail("Second element was not a 'while': "+
+ component.getDOMElement().getChildNodes().item(2).
+ getLocalName());
+ }
+ }
+
+ public void testAddLastActToSequenceInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<sequence xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<if/>"+
+ "<if/>"+
+ "</sequence>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Sequence component=new Sequence(model, elem);
+
+ if (component.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ While sub=new While(model);
+
+ component.addActivity(sub, -1);
+
+ if (component.getActivities().size() != 3) {
+ fail("Expecting 3 child activities: "+
+ component.getActivities().size());
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 4) {
+ fail("Four child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(3).
+ getLocalName().equals(While.WHILE) == false) {
+ fail("Second element was not a 'while': "+
+ component.getDOMElement().getChildNodes().item(3).
+ getLocalName());
+ }
+ }
+
+ public void testGetURI() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence>"+
+ "<receive/>"+
+ "<invoke/>"+
+ "</sequence>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity act=component.getActivity();
+
+ if ((act instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+
+ Sequence seq=(Sequence)act;
+
+ if (seq.getActivities().size() != 2) {
+ fail("Expecting 2 child activities: "+
+ seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("First activity should be receive");
+ }
+
+ if ((seq.getActivities().get(1) instanceof Invoke) == false) {
+ fail("Second activity should be invoke");
+ }
+
+ Invoke invoke=(Invoke)seq.getActivities().get(1);
+
+ String uri=invoke.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/(a)activities.1") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TerminationHandlerTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TerminationHandlerTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TerminationHandlerTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+import org.jboss.savara.tools.bpel.model.component.TerminationHandler;
+
+import junit.framework.TestCase;
+
+public class TerminationHandlerTest extends TestCase {
+
+ public void testIsActivity() {
+ TerminationHandler act=
+ new TerminationHandler(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildTerminationHandler() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<terminationHandler xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">" +
+ "<sequence/></terminationHandler>";
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ TerminationHandler construct=new TerminationHandler(model, elem);
+
+ if (construct.getActivity() == null) {
+ fail("No activity");
+ }
+
+ if ((construct.getActivity() instanceof Sequence) == false) {
+ fail("Activity is not a sequence");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestAbstractInteraction.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestAbstractInteraction.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestAbstractInteraction.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import java.util.List;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.AbstractInteraction;
+import org.jboss.savara.tools.bpel.model.component.ConversionContext;
+import org.scribble.model.Activity;
+import org.w3c.dom.Element;
+
+public class TestAbstractInteraction extends AbstractInteraction {
+
+ private static final long serialVersionUID = 8254837781661826397L;
+
+ public TestAbstractInteraction(BPELLanguageModel model, Element elem) {
+ super(model, elem);
+ }
+
+ public TestAbstractInteraction(BPELLanguageModel model) {
+ super(model, "test");
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestBPELActivity.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestBPELActivity.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestBPELActivity.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import java.util.List;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.BPELActivity;
+import org.jboss.savara.tools.bpel.model.component.ConversionContext;
+import org.scribble.model.Activity;
+import org.w3c.dom.Element;
+
+public class TestBPELActivity extends BPELActivity {
+
+ private static final long serialVersionUID = 6706918585744310399L;
+
+ public TestBPELActivity(BPELLanguageModel model, Element elem) {
+ super(model, elem);
+ }
+
+ public TestBPELActivity(BPELLanguageModel model) {
+ super(model, "test");
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestBPELElement.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestBPELElement.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/TestBPELElement.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import java.util.List;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.BPELElement;
+import org.jboss.savara.tools.bpel.model.component.ConversionContext;
+import org.scribble.model.Activity;
+import org.w3c.dom.Element;
+
+public class TestBPELElement extends BPELElement {
+
+ private static final long serialVersionUID = 6428569513605691840L;
+
+ public TestBPELElement(BPELLanguageModel model, Element elem) {
+ super(model, elem);
+ }
+
+ public TestBPELElement(BPELLanguageModel model) {
+ super(model, "test");
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ThrowTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ThrowTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/ThrowTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Throw;
+
+import junit.framework.TestCase;
+
+public class ThrowTest extends TestCase {
+
+ public void testIsActivity() {
+ Throw act=
+ new Throw(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testBuildFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVar";
+ String fault="testFault";
+
+ String xml="<throw xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "faultVariable=\""+var+"\" "+
+ "faultName=\""+fault+"\" "+
+ "/>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Throw component=new Throw(model, elem);
+
+ if (component.getFaultVariable().equals(var) == false) {
+ fail("Fault Variable not correct, expecting '"+var+"': "+
+ component.getFaultVariable());
+ }
+
+ if (component.getFaultName().equals(fault) == false) {
+ fail("Fault not correct, expecting '"+fault+"': "+
+ component.getFaultName());
+ }
+ }
+
+ public void testGetFaultVariable() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ Throw component=new Throw(model);
+
+ if (component.getFaultVariable() != null) {
+ fail("Should be null");
+ }
+
+ component.setFaultVariable(var);
+
+ if (component.getFaultVariable().equals(var) == false) {
+ fail("Fault Variable not correct, expecting '"+var+"': "+
+ component.getFaultVariable());
+ }
+ }
+
+ public void testGetFaultName() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String fault="testFault";
+
+ Throw component=new Throw(model);
+
+ if (component.getFaultName() != null) {
+ fail("Should be null");
+ }
+
+ component.setFaultName(fault);
+
+ if (component.getFaultName().equals(fault) == false) {
+ fail("Fault name not correct, expecting '"+fault+"': "+
+ component.getFaultName());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/VariableTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/VariableTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/VariableTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Variable;
+
+import junit.framework.TestCase;
+
+public class VariableTest extends TestCase {
+
+ public void testIsActivity() {
+ Variable act=
+ new Variable(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == true) {
+ fail("Should NOT be an activity");
+ }
+ }
+
+ public void testBuildFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVar";
+ String type="testType";
+
+ String xml="<variable xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\" "+
+ "name=\""+var+"\" "+
+ "type=\""+type+"\" "+
+ "/>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Variable component=new Variable(model, elem);
+
+ if (component.getName().equals(var) == false) {
+ fail("Variable name not correct, expecting '"+var+"': "+
+ component.getName());
+ }
+
+ if (component.getType().equals(type) == false) {
+ fail("Type not correct, expecting '"+type+"': "+
+ component.getType());
+ }
+ }
+
+ public void testGetVariableName() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String var="testVariable";
+
+ Variable component=new Variable(model);
+
+ if (component.getName() != null) {
+ fail("Should be null");
+ }
+
+ component.setName(var);
+
+ if (component.getName().equals(var) == false) {
+ fail("Variable name not correct, expecting '"+var+"': "+
+ component.getName());
+ }
+ }
+
+ public void testGetType() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String type="testType";
+
+ Variable component=new Variable(model);
+
+ if (component.getType() != null) {
+ fail("Should be null");
+ }
+
+ component.setType(type);
+
+ if (component.getType().equals(type) == false) {
+ fail("Type not correct, expecting '"+type+"': "+
+ component.getType());
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/WaitTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/WaitTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/WaitTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,621 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Condition;
+import org.jboss.savara.tools.bpel.model.component.Wait;
+
+import junit.framework.TestCase;
+
+public class WaitTest extends TestCase {
+
+ public void testIsActivity() {
+ Wait act=
+ new Wait(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testUntilFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<wait xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<until>"+expr1+"</until>"+
+ "</wait>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Wait component=new Wait(model, elem);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should is set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testForFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<wait xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<for>"+expr1+"</for>"+
+ "</wait>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Wait component=new Wait(model, elem);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("For condition should is set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetUntilNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</until>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition=new Condition(model, elem);
+
+ Wait component=new Wait(model);
+
+ component.setUntil(condition);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should not be set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetUntilReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</until>";
+
+ String xml2="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</until>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition1=new Condition(model, elem1);
+
+ Wait component=new Wait(model);
+
+ component.setUntil(condition1);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should not be set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Condition condition2=new Condition(model, elem2);
+
+ component.setUntil(condition2);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should still not be set");
+ }
+
+ result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetForNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</for>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition=new Condition(model, elem);
+
+ Wait component=new Wait(model);
+
+ component.setFor(condition);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should not be set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetForReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</for>";
+
+ String xml2="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</for>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition1=new Condition(model, elem1);
+
+ Wait component=new Wait(model);
+
+ component.setFor(condition1);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should not be set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Condition condition2=new Condition(model, elem2);
+
+ component.setFor(condition2);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should still not be set");
+ }
+
+ result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetForThenUntil() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</for>";
+
+ String xml2="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</until>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition1=new Condition(model, elem1);
+
+ Wait component=new Wait(model);
+
+ component.setFor(condition1);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should not be set");
+ }
+
+ String result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Condition condition2=new Condition(model, elem2);
+
+ component.setUntil(condition2);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should still not be set");
+ }
+
+ result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetUntilThenFor() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<until xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</until>";
+
+ String xml2="<for xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</for>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition1=new Condition(model, elem1);
+
+ Wait component=new Wait(model);
+
+ component.setUntil(condition1);
+
+ if (component.getUntil() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getFor() != null) {
+ fail("For condition should not be set");
+ }
+
+ String result=component.getUntil().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Condition condition2=new Condition(model, elem2);
+
+ component.setFor(condition2);
+
+ if (component.getFor() == null) {
+ fail("Condition not set");
+ }
+
+ if (component.getUntil() != null) {
+ fail("Until condition should still not be set");
+ }
+
+ result=component.getFor().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/WhileTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/WhileTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/component/WhileTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,475 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.component;
+
+import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.component.Condition;
+import org.jboss.savara.tools.bpel.model.component.If;
+import org.jboss.savara.tools.bpel.model.component.Sequence;
+import org.jboss.savara.tools.bpel.model.component.While;
+
+import junit.framework.TestCase;
+
+public class WhileTest extends TestCase {
+
+ public void testIsActivity() {
+ While act=new While(new DefaultBPELLanguageModel(null));
+
+ if (act.isActivity() == false) {
+ fail("Should be an activity");
+ }
+ }
+
+ public void testFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<while xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition>"+expr1+"</condition>"+
+ "<sequence/>"+
+ "</while>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ While component=new While(model, elem);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ if (component.getActivity() == null) {
+ fail("Activity not set");
+ }
+
+ if ((component.getActivity() instanceof Sequence) == false) {
+ fail("Activity not a sequence");
+ }
+ }
+
+ public void testSetConditionInitFromDOM() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<while xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<targets/>"+
+ "<sequence/>"+
+ "</while>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ While component=new While(model, elem);
+
+ if (component.getActivity() == null) {
+ fail("Activity should be set");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Condition cond=new Condition(model);
+
+ cond.setExpression(expr1);
+
+ component.setCondition(cond);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 3) {
+ fail("Three child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(Condition.CONDITION) == false) {
+ fail("Second element was not a 'condition': "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testSetConditionNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+
+ String xml="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</condition>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition=new Condition(model, elem);
+
+ While component=new While(model);
+
+ component.setCondition(condition);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetConditionReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String expr1="Test Expression 1";
+ String expr2="Test Expression 2";
+
+ String xml1="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr1+
+ "</condition>";
+
+ String xml2="<condition xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ expr2+
+ "</condition>";
+
+ org.w3c.dom.Element elem1=null;
+ org.w3c.dom.Element elem2=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml1.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem1 = doc.getDocumentElement();
+
+ is.close();
+
+ is=new java.io.ByteArrayInputStream(xml2.getBytes());
+
+ doc=builder.parse(is);
+ elem2 = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ Condition condition1=new Condition(model, elem1);
+
+ While component=new While(model);
+
+ component.setCondition(condition1);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ String result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr1) == false) {
+ fail("Expression1 is not valid: expecting '"+
+ expr1+"' but got '"+result+"'");
+ }
+
+ Condition condition2=new Condition(model, elem2);
+
+ component.setCondition(condition2);
+
+ if (component.getCondition() == null) {
+ fail("Condition not set");
+ }
+
+ result=component.getCondition().getExpression();
+
+ if (result == null) {
+ fail("Expression is null");
+ }
+
+ if (result.equals(expr2) == false) {
+ fail("Expression2 is not valid: expecting '"+
+ expr2+"' but got '"+result+"'");
+ }
+ }
+
+ public void testSetActivityNew() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<while xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "</while>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ While component=new While(model, ifelem);
+
+ if (component.getActivity() != null) {
+ fail("Activity should be null");
+ }
+
+ if (component.getDOMElement().getChildNodes().getLength() != 1) {
+ fail("One child element expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ Sequence seq=new Sequence(model);
+
+ component.setActivity(seq);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(Sequence.SEQUENCE) == false) {
+ fail("Second element was not a sequence: "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testSetActivityReplace() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<while xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<condition/>"+
+ "<sequence/>"+
+ "</while>";
+
+ org.w3c.dom.Element ifelem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ ifelem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ fail("Failed to convert to doc");
+ }
+
+ While component=new While(model, ifelem);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ If sub=new If(model);
+
+ component.setActivity(sub);
+
+ if (component.getDOMElement().getChildNodes().getLength() != 2) {
+ fail("Two child elements expected: "+
+ component.getDOMElement().getChildNodes().getLength());
+ }
+
+ if (component.getDOMElement().getChildNodes().item(1).
+ getLocalName().equals(If.IF) == false) {
+ fail("Second element was not an 'if': "+
+ component.getDOMElement().getChildNodes().item(1).
+ getLocalName());
+ }
+ }
+
+ public void testGetURI() {
+ BPELLanguageModel model=new DefaultBPELLanguageModel(null);
+
+ String xml="<process xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<while xmlns=\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\">"+
+ "<sequence>"+
+ "<receive/>"+
+ "</sequence>"+
+ "</while>"+
+ "</process>";
+
+ org.w3c.dom.Element elem=null;
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.newInstance();
+
+ factory.setNamespaceAware(true);
+
+ javax.xml.parsers.DocumentBuilder builder=
+ factory.newDocumentBuilder();
+
+ java.io.InputStream is=new java.io.ByteArrayInputStream(xml.getBytes());
+
+ org.w3c.dom.Document doc=builder.parse(is);
+ elem = doc.getDocumentElement();
+
+ is.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ fail("Failed to convert to doc");
+ }
+
+ Process component=new Process(model, elem);
+
+ BPELActivity topact=component.getActivity();
+
+ if ((topact instanceof While) == false) {
+ fail("Top level activity is not While");
+ }
+
+ While top=(While)topact;
+
+ if (top.getActivity() == null) {
+ fail("While activity is null");
+ }
+
+ if ((top.getActivity() instanceof Sequence) == false) {
+ fail("While activity is not sequence");
+ }
+
+ Sequence seq=(Sequence)top.getActivity();
+
+ if (seq.getActivities().size() != 1) {
+ fail("Should have 1 activity: "+seq.getActivities().size());
+ }
+
+ if ((seq.getActivities().get(0) instanceof Receive) == false) {
+ fail("Activty should be Receive");
+ }
+
+ Receive recv=(Receive)seq.getActivities().get(0);
+
+ String uri=recv.getURI();
+
+ if (uri == null) {
+ fail("URI is null");
+ }
+
+ if (uri.equals("//@activity/@activity/(a)activities.0") == false) {
+ fail("URI is invalid: "+uri);
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/util/InteractionUtilTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/util/InteractionUtilTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/model/util/InteractionUtilTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.util;
+
+import junit.framework.TestCase;
+
+import org.scribble.conversation.model.*;
+import org.scribble.model.*;
+
+public class InteractionUtilTest extends TestCase {
+
+ public void testIsFirstInteractionSingleInteraction() {
+ ConversationModel cm=new ConversationModel();
+ Conversation c=new Conversation();
+ cm.setConversation(c);
+
+ Interaction i1=new Interaction();
+
+ c.getBlock().getContents().add(i1);
+
+ if (org.scribble.model.util.InteractionUtil.isInitialInteraction(i1) == false) {
+ fail("Interaction should be first in conversation");
+ }
+ }
+
+ public void testIsFirstInteractionSecondInteraction() {
+ ConversationModel cm=new ConversationModel();
+ Conversation c=new Conversation();
+ cm.setConversation(c);
+
+ Interaction i1=new Interaction();
+ Interaction i2=new Interaction();
+
+ c.getBlock().getContents().add(i1);
+ c.getBlock().getContents().add(i2);
+
+ if (org.scribble.model.util.InteractionUtil.isInitialInteraction(i2)) {
+ fail("Interaction should NOT be first in conversation");
+ }
+ }
+
+ public void testIsFirstInteractionIfElse() {
+ ConversationModel cm=new ConversationModel();
+ Conversation c=new Conversation();
+ cm.setConversation(c);
+
+ If choice=new If();
+ c.getBlock().getContents().add(choice);
+
+ Block b=choice.createNewPath();
+
+ Interaction i1=new Interaction();
+
+ b.getContents().add(i1);
+
+ Block b2=choice.createNewPath();
+
+ Interaction i2=new Interaction();
+ Interaction i3=new Interaction();
+
+ b2.getContents().add(i2);
+ b2.getContents().add(i3);
+
+ if (org.scribble.model.util.InteractionUtil.isInitialInteraction(i1) == false) {
+ fail("Interaction should be first in conversation");
+ }
+
+ if (org.scribble.model.util.InteractionUtil.isInitialInteraction(i2) == false) {
+ fail("Interaction should be first in conversation");
+ }
+
+ if (org.scribble.model.util.InteractionUtil.isInitialInteraction(i3)) {
+ fail("Interaction should NOT be first in conversation");
+ }
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/ParserTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/ParserTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/ParserTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,288 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.parser;
+
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import org.jboss.savara.tools.bpel.model.BPELNotation;
+import org.scribble.conversation.model.ConversationModel;
+import org.scribble.lang.model.*;
+import org.scribble.conversation.model.ConversationNotation;
+import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.ModelReference;
+import org.scribble.model.admin.Context;
+
+public class ParserTest extends TestCase {
+
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite("BPEL->Conversation Parser Tests");
+
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_Broker", "ESBBroker@Broker"));
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_Buyer", "ESBBroker@Buyer"));
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_CreditAgency", "ESBBroker@CreditAgency"));
+ suite.addTest(new BPELToConversationTest("RequestForQuote_SupplierQuoteEngine", "ESBBroker@SupplierQuoteEngine"));
+ suite.addTest(new BPELToConversationTest("CompleteTransaction_SupplierTxnProcessor", "ESBBroker@SupplierTxnProcessor"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_Buyer", "PurchaseGoods@Buyer"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_CreditAgency", "PurchaseGoods@CreditAgency"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_Store", "PurchaseGoods@Store"));
+ suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Buyer", "ReqRespFault@Buyer"));
+ suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Seller", "ReqRespFault@Seller"));
+
+ /**
+ * TODO: (SAVARA-150) Commenting out this test for now, as we now need the accompanying WSDL to be able to
+ * resolve the message type's underlying XSD element or type.
+ *
+ suite.addTest(new BPELToConversationTest("LoanApprovalService@Service", "LoanApprovalService@Service"));
+ */
+
+ return suite;
+ }
+
+ /**
+ * The test case for running the BPEL to Conversation test.
+ */
+ public static class BPELToConversationTest extends TestCase {
+
+ /**
+ * This constructor is initialized with the test
+ * name.
+ *
+ * @param name The test name
+ */
+ public BPELToConversationTest(String bpelName, String scvName) {
+ super(bpelName+"->"+scvName);
+ m_bpelName = bpelName;
+ m_scvName = scvName;
+ }
+
+ /**
+ * This method runs the test.
+ *
+ * @param result The test result
+ */
+ public void run(TestResult result) {
+ result.startTest(this);
+
+ String filename="testmodels/"+m_bpelName+".bpel";
+
+ java.io.InputStream is=
+ ParserTest.class.getResourceAsStream(filename);
+
+ if (is == null) {
+ result.addError(this,
+ new Throwable("Unable to locate resource: "+filename));
+ } else {
+ org.scribble.parser.Parser p=new org.scribble.parser.DefaultParser();
+ org.scribble.model.ModelReference ref=
+ new org.scribble.model.ModelReference(BPELNotation.NOTATION_CODE);
+ org.scribble.model.admin.DefaultModelListener l=
+ new org.scribble.model.admin.DefaultModelListener();
+
+ org.scribble.model.Model model=p.parse(ref, is, l, new ResourceLoaderContext());
+
+ if (model == null) {
+ result.addError(this, new Throwable("Model is null"));
+
+ } else if ((model instanceof LanguageModel) == false) {
+ result.addError(this, new Throwable("Model is null"));
+
+ } else if (l.getErrors().size() != 0) {
+ result.addError(this, new Throwable("Failed to parse CDM Model"));
+
+ for (int i=0; i < l.getErrors().size(); i++) {
+ System.err.println("ModelIssue: "+
+ l.getErrors().get(i).getMessage());
+ }
+ } else {
+ LanguageModel lm=(LanguageModel)model;
+ ConversationModel cm=new ConversationModel();
+
+ cm.setNamespace(lm.getNamespace());
+
+ if (lm.getConversations().size() == 1) {
+ cm.setConversation(lm.getConversations().get(0));
+ }
+
+ try {
+ org.scribble.export.Exporter exporter=
+ (org.scribble.export.Exporter)
+ RegistryFactory.getRegistry().getExtension(
+ org.scribble.export.Exporter.class, null);
+
+ org.scribble.export.text.TextFormatter formatter=
+ new org.scribble.export.text.TextFormatter();
+
+ java.io.ByteArrayOutputStream os=
+ new java.io.ByteArrayOutputStream();
+
+ formatter.setOutputStream(os);
+
+ exporter.export(new ModelReference(ConversationNotation.NOTATION_CODE),
+ cm, formatter);
+
+ String str=new String(os.toByteArray());
+
+ checkResults(result, str);
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ result.endTest(this);
+ }
+
+ /**
+ * This method checks the generated jboss-esb.xml against a
+ * previously stored correct version.
+ *
+ * @param result The test result
+ * @param conv The conversation
+ */
+ protected void checkResults(TestResult result, String conv) {
+ boolean f_valid=false;
+
+ String filename="results/"+m_scvName+".scv";
+
+ java.io.InputStream is=
+ ParserTest.class.getResourceAsStream(filename);
+
+ if (is != null) {
+
+ try {
+ byte[] b=new byte[is.available()];
+
+ is.read(b);
+
+ is.close();
+
+ String orig=new String(b);
+
+ if (orig.equals(conv) == false) {
+ result.addError(this,
+ new Throwable("Generated Conversation does not match stored version"));
+ } else {
+ f_valid = true;
+ }
+ } catch(Exception e) {
+ result.addError(this, e);
+ }
+ } else {
+ result.addError(this,
+ new Throwable("Resulting Conversation '"+filename+
+ "' not found for comparison"));
+ }
+
+ if (f_valid == false) {
+ String bpelfile="testmodels/"+m_bpelName+".bpel";
+
+ java.net.URL url=ParserTest.class.getResource(bpelfile);
+
+ try {
+ url = org.eclipse.core.runtime.FileLocator.toFileURL(url);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ if (url != null) {
+ // URL will point to copy of test models in the classes folder, so need
+ // to obtain reference back to source version
+ java.io.File f=null;
+
+ if (url.getFile().indexOf("classes") != -1) {
+ f = new java.io.File(url.getFile().replaceFirst("classes","src/plugintest"));
+ } else if (url.getFile().indexOf("bin") != -1) {
+ f = new java.io.File(url.getFile().replaceFirst("bin","src/plugintest"));
+ } else {
+ result.addError(this, new Exception("Could not locate results folder to record expected result"));
+ }
+
+ if (f != null && f.exists()) {
+ f = f.getParentFile().getParentFile();
+
+ java.io.File resultsDir=new java.io.File(f, "results");
+
+ if (resultsDir.exists() == false) {
+ resultsDir.mkdirs();
+ }
+
+ java.io.File resultFile=new java.io.File(resultsDir, m_scvName+".expected");
+
+ if (resultFile.exists() == false) {
+ try {
+ java.io.FileOutputStream fos=new java.io.FileOutputStream(resultFile);
+
+ fos.write(conv.getBytes());
+
+ fos.flush();
+ fos.close();
+
+ } catch(Exception e){
+ result.addError(this, e);
+ }
+ } else {
+ System.err.println("NOTE: Expected output '"+resultFile+
+ "' already exists - not being overwritten");
+ }
+ } else {
+ result.addError(this, new Throwable("Unable to obtain URL for BPEL model source '"+
+ m_bpelName+"': "+url));
+ }
+ }
+ }
+ }
+
+ private String m_bpelName=null;
+ private String m_scvName=null;
+ }
+
+ public static class ResourceLoaderContext implements Context {
+
+ public ResourceLoaderContext() {
+ }
+
+ public InputStream getResource(ModelReference ref, String uri) {
+ String filename="testmodels/"+uri;
+
+ java.io.InputStream is=
+ ParserTest.class.getResourceAsStream(filename);
+
+ return(is);
+ }
+
+ public java.net.URI getResourceURI(ModelReference ref, String uri) {
+ String filename="testmodels/"+uri;
+
+ java.net.URI ret=null;
+
+ try {
+ ret = ParserTest.class.getResource(filename).toURI();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ return(ret);
+ }
+
+ }
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)Broker.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)Broker.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)Broker.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,35 @@
+namespace null;
+
+conversation ESBBrokerProcess_Broker@Broker implements LoanBroker@Broker {
+ makeEnquiry(enquiry) from Buyer to Broker;
+ while {
+ getQuote(requestForQuote) from Broker to SupplierQuoteEngine;
+ getQuote(quote) from SupplierQuoteEngine to Broker;
+ }
+ ;
+ makeEnquiry(quoteList) from Broker to Buyer;
+ if {
+ buy(buy) from Buyer to Broker;
+ try {
+ checkCredit(CreditCheckRequest) from Broker to CreditAgency;
+ if {
+ checkCredit(CreditCheckOk) from CreditAgency to Broker;
+ } else if {
+ checkCredit(CreditCheckInvalid) from CreditAgency to Broker;
+ raise invalidCredit;
+ }
+ confirm(orderConfirmed) from Broker to SupplierTxnProcessor;
+ if {
+ confirm(bookingReference) from SupplierTxnProcessor to Broker;
+ } else if {
+ confirm(CreditCheckInvalid) from SupplierTxnProcessor to Broker;
+ raise invalidCredit;
+ }
+ buy(bookingReference) from Broker to Buyer;
+ } catch invalidCredit {
+ buy(orderRejected) from Broker to Buyer;
+ }
+ } else if {
+ cancel(cancel) from Buyer to Broker;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)Buyer.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)Buyer.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)Buyer.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,16 @@
+namespace null;
+
+conversation ESBBrokerProcess_Buyer@Buyer implements LoanBroker@Buyer {
+ makeEnquiry(enquiry) from Buyer to Broker;
+ makeEnquiry(quoteList) from Broker to Buyer;
+ if {
+ buy(buy) from Buyer to Broker;
+ if {
+ buy(bookingReference) from Broker to Buyer;
+ } else if {
+ buy(orderRejected) from Broker to Buyer;
+ }
+ } else if {
+ cancel(cancel) from Buyer to Broker;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)CreditAgency.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)CreditAgency.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)CreditAgency.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,12 @@
+namespace null;
+
+conversation ESBBrokerProcess_CreditAgency@CreditAgency implements Common@CreditAgency {
+ if {
+ checkCredit(CreditCheckRequest) from Broker to CreditAgency;
+ if {
+ checkCredit(CreditCheckOk) from CreditAgency to Broker;
+ } else if {
+ checkCredit(CreditCheckInvalid) from CreditAgency to Broker;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)SupplierQuoteEngine.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)SupplierQuoteEngine.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)SupplierQuoteEngine.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,6 @@
+namespace null;
+
+conversation RequestForQuote_SupplierQuoteEngine@SupplierQuoteEngine implements LoanBroker@SupplierQuoteEngine {
+ getQuote(requestForQuote) from Broker to SupplierQuoteEngine;
+ getQuote(quote) from SupplierQuoteEngine to Broker;
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)SupplierTxnProcessor.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)SupplierTxnProcessor.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ESBBroker(a)SupplierTxnProcessor.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,8 @@
+namespace null;
+
+conversation CompleteTransaction_SupplierTxnProcessor@SupplierTxnProcessor implements LoanBroker@SupplierTxnProcessor {
+ if {
+ confirm(orderConfirmed) from Broker to SupplierTxnProcessor;
+ confirm(bookingReference) from SupplierTxnProcessor to Broker;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/LoanApprovalService(a)Service.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/LoanApprovalService(a)Service.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/LoanApprovalService(a)Service.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,41 @@
+namespace null;
+
+conversation loanApprovalProcess {
+ try {
+ boolean receive-to-assess, receive-to-approval, approval-to-reply, assess-to-setMessage, setMessage-to-reply, assess-to-approval;
+ parallel {
+ request(creditInformationMessage) from customer;
+ receive-to-assess = xpath[true()];
+ receive-to-approval = xpath[true()];
+ } and {
+ when (xpath[$receive-to-assess]) {
+ check(creditInformationMessage) to assessor;
+ if {
+ check(riskAssessmentMessage) from assessor;
+ } else if {
+ check(errorMessage) from assessor;
+ raise lns:loanProcessFault;
+ }
+ assess-to-setMessage = xpath[true()];
+ assess-to-approval = xpath[true()];
+ }
+ } and {
+ when (xpath[$receive-to-approval and $assess-to-approval]) {
+ approve(creditInformationMessage) to approver;
+ if {
+ approve(approvalMessage) from approver;
+ } else if {
+ approve(errorMessage) from approver;
+ raise lns:loanProcessFault;
+ }
+ approval-to-reply = xpath[true()];
+ }
+ } and {
+ when (xpath[$setMessage-to-reply and $approval-to-reply]) {
+ request(approvalMessage) to customer;
+ }
+ }
+ } catch lns:loanProcessFault {
+ request(errorMessage) to customer;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)Buyer.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)Buyer.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)Buyer.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,10 @@
+namespace null;
+
+conversation PurchaseGoodsProcess_Buyer@Buyer implements Purchasing@Buyer {
+ buy(BuyRequest) from Buyer to Store;
+ if {
+ buy(BuyConfirmed) from Store to Buyer;
+ } else if {
+ buy(BuyFailed) from Store to Buyer;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)CreditAgency.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)CreditAgency.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)CreditAgency.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,10 @@
+namespace null;
+
+conversation PurchaseGoodsProcess_CreditAgency@CreditAgency implements Common@CreditAgency {
+ checkCredit(CreditCheckRequest) from Store to CreditAgency;
+ if {
+ checkCredit(CreditCheckOk) from CreditAgency to Store;
+ } else if {
+ checkCredit(CreditCheckInvalid) from CreditAgency to Store;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)Store.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)Store.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/PurchaseGoods(a)Store.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,13 @@
+namespace null;
+
+conversation PurchaseGoodsProcess_Store@Store implements Purchasing@Store {
+ buy(BuyRequest) from Buyer to Store;
+ checkCredit(CreditCheckRequest) from Store to CreditAgency;
+ if {
+ checkCredit(CreditCheckOk) from CreditAgency to Store;
+ buy(BuyConfirmed) from Store to Buyer;
+ } else if {
+ checkCredit(CreditCheckInvalid) from CreditAgency to Store;
+ buy(BuyFailed) from Store to Buyer;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ReqRespFault(a)Buyer.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ReqRespFault(a)Buyer.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ReqRespFault(a)Buyer.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,10 @@
+namespace null;
+
+conversation ReqRespFaultProcess_Buyer@Buyer implements LoanBroker@Buyer {
+ checkCredit(CreditCheckRequest) from Buyer to Seller;
+ if {
+ checkCredit(CreditCheckOk) from Seller to Buyer;
+ } else if {
+ checkCredit(CreditCheckInvalid) from Seller to Buyer;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ReqRespFault(a)Seller.scv
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ReqRespFault(a)Seller.scv (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/results/ReqRespFault(a)Seller.scv 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,10 @@
+namespace null;
+
+conversation ReqRespFaultProcess_Seller@Seller implements ReqRespFaultProcess@Seller {
+ checkCredit(CreditCheckRequest) from Buyer to Seller;
+ if {
+ checkCredit(CreditCheckOk) from Seller to Buyer;
+ } else if {
+ checkCredit(CreditCheckInvalid) from Seller to Buyer;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,20 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <partnerLinks>
+ <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="spr:BrokerToSupplierTxnProcessorServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+ <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+ </variables>
+ <sequence>
+ <pick createInstance="yes">
+ <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmRequestVar">
+ <sequence>
+ <reply name="Send_bookingReference" operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmResponseVar"/>
+ </sequence>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="confirmRequest">
+ <wsdl:part element="orderConfirmed" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="confirmResponse">
+ <wsdl:part element="bookingReference" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteResponse">
+ <wsdl:part element="quote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteRequest">
+ <wsdl:part element="requestForQuote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SupplierBehavior">
+ <wsdl:operation name="confirm">
+ <wsdl:input message="spr:confirmRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:confirmResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <wsdl:input message="spr:getQuoteRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:getQuoteResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="confirm">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SupplierService">
+ <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+ <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <wsdl:import location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BrokerToSupplierTxnProcessorServiceLT">
+ <plnk:role name="SupplierTxnProcessorService" portType="ns1:SupplierBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,66 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BrokerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <partnerLinks>
+ <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="brk:BuyerToBrokerServiceLT"/>
+ <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="brk:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
+ <partnerLink name="BrokerToCreditAgency" partnerLinkType="brk:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+ <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="brk:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+ <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+ <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+ <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+ <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+ <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+ <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+ <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+ <variable messageType="brk:rejectedFault" name="rejectedFaultVar"/>
+ <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryRequestVar"/>
+ <while>
+ <sequence>
+ <scope>
+ <sequence>
+ <invoke inputVariable="getQuoteRequestVar" name="Send_requestForQuote" operation="getQuote" outputVariable="getQuoteResponseVar" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </while>
+ <reply name="Send_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
+ <pick>
+ <onMessage operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyRequestVar">
+ <sequence>
+ <scope>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="cay:invalidCreditFault" faultName="cay:invalidCredit" faultVariable="invalidCreditFaultVar">
+ <sequence>
+ <reply faultName="brk:rejected" name="Send_orderRejected" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="rejectedFaultVar"/>
+ </sequence>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior"/>
+ <invoke inputVariable="confirmRequestVar" name="Send_orderConfirmed" operation="confirm" outputVariable="confirmResponseVar" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior"/>
+ <reply name="Send_bookingReference" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyResponseVar"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </scope>
+ </sequence>
+ </onMessage>
+ <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="cancelRequestVar">
+ <sequence/>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="rejectedFault">
+ <wsdl:part element="orderRejected" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="makeEnquiryRequest">
+ <wsdl:part element="enquiry" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="buyResponse">
+ <wsdl:part element="bookingReference" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="makeEnquiryResponse">
+ <wsdl:part element="quoteList" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="buyRequest">
+ <wsdl:part element="buy" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="cancelRequest">
+ <wsdl:part element="cancel" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="BrokerBehavior">
+ <wsdl:operation name="buy">
+ <wsdl:input message="brk:buyRequest">
+ </wsdl:input>
+ <wsdl:output message="brk:buyResponse">
+ </wsdl:output>
+ <wsdl:fault message="brk:rejectedFault" name="rejected">
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="makeEnquiry">
+ <wsdl:input message="brk:makeEnquiryRequest">
+ </wsdl:input>
+ <wsdl:output message="brk:makeEnquiryResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="cancel">
+ <wsdl:input message="brk:cancelRequest">
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="BrokerBehaviorBinding" type="brk:BrokerBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="buy">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/buy"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="rejected">
+ <soap:fault name="rejected" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="makeEnquiry">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/makeEnquiry"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="cancel">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/cancel"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="BrokerService">
+ <wsdl:port binding="brk:BrokerBehaviorBinding" name="BrokerBehaviorPort">
+ <soap:address location="http://localhost:8080/BrokerService/BrokerBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Broker" xmlns:ns2="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:ns3="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker">
+ <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BuyerToBrokerServiceLT">
+ <plnk:role name="BrokerBehavior" portType="ns1:BrokerBehavior"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BrokerToSupplierQuoteEngineLT">
+ <plnk:role name="SupplierQuoteEngineRequester" portType="ns2:SupplierBehavior"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BrokerToCreditAgencyLT">
+ <plnk:role name="CreditAgencyRequester" portType="ns3:CreditAgencyBehavior"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BrokerToSupplierTxnProcessorLT">
+ <plnk:role name="SupplierTxnProcessorRequester" portType="ns2:SupplierBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,43 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
+ <partnerLinks>
+ <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="byr:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+ <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+ <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+ <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+ <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
+ </variables>
+ <sequence>
+ <invoke inputVariable="makeEnquiryRequestVar" name="Send_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ <receive name="Receive_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
+ <if>
+ <sequence>
+ <scope>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="brk:rejectedFault" faultName="brk:rejected" faultVariable="rejectedFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="buyRequestVar" name="Send_buy" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </scope>
+ </sequence>
+ <else>
+ <sequence>
+ <invoke inputVariable="cancelRequestVar" name="Send_cancel" operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Broker" xmlns:ns2="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer">
+ <wsdl:import location="ESBBrokerProcess_Buyer.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
+ <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BuyerToBrokerLT">
+ <plnk:role name="BrokerRequester" portType="ns1:BrokerBehavior"/>
+ <plnk:role name="BrokerBehavior" portType="ns2:BuyerBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,36 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common@CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgencyArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <partnerLinks>
+ <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="cay:BrokerToCreditAgencyServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="cay:invalidCreditFault" name="invalidCreditFaultVar"/>
+ </variables>
+ <sequence>
+ <pick>
+ <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditRequestVar">
+ <sequence>
+ <scope>
+ <sequence>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="cay:invalidCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="invalidCreditFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+ </scope>
+ </sequence>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="checkCreditResponse">
+ <wsdl:part element="CreditCheckOk" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="checkCreditRequest">
+ <wsdl:part element="CreditCheckRequest" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="invalidCreditFault">
+ <wsdl:part element="CreditCheckInvalid" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="CreditAgencyBehavior">
+ <wsdl:operation name="checkCredit">
+ <wsdl:input message="cay:checkCreditRequest">
+ </wsdl:input>
+ <wsdl:output message="cay:checkCreditResponse">
+ </wsdl:output>
+ <wsdl:fault message="cay:invalidCreditFault" name="invalidCredit">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CreditAgencyBehaviorBinding" type="cay:CreditAgencyBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="checkCredit">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/CreditAgency/checkCredit"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="invalidCredit">
+ <soap:fault name="invalidCredit" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CreditAgencyService">
+ <wsdl:port binding="cay:CreditAgencyBehaviorBinding" name="CreditAgencyBehaviorPort">
+ <soap:address location="http://localhost:8080/CreditAgencyService/CreditAgencyBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency">
+ <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BrokerToCreditAgencyServiceLT">
+ <plnk:role name="CreditAgencyService" portType="ns1:CreditAgencyBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="confirmRequest">
+ <wsdl:part element="orderConfirmed" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="confirmResponse">
+ <wsdl:part element="bookingReference" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteResponse">
+ <wsdl:part element="quote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteRequest">
+ <wsdl:part element="requestForQuote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SupplierBehavior">
+ <wsdl:operation name="confirm">
+ <wsdl:input message="spr:confirmRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:confirmResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <wsdl:input message="spr:getQuoteRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:getQuoteResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="confirm">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SupplierService">
+ <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+ <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/LoanApprovalService(a)Service.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/LoanApprovalService(a)Service.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/LoanApprovalService(a)Service.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,123 @@
+<process name="loanApprovalProcess"
+ targetNamespace="http://example.com/loan-approval/"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:lns="http://example.com/loan-approval/wsdl/"
+ suppressJoinFailure="yes">
+ <import importType="http://schemas.xmlsoap.org/wsdl/"
+ location="loanServicePT.wsdl"
+ namespace="http://example.com/loan-approval/wsdl/" />
+ <partnerLinks>
+ <partnerLink name="customer"
+ partnerLinkType="lns:loanPartnerLT"
+ myRole="loanService" />
+ <partnerLink name="approver"
+ partnerLinkType="lns:loanApprovalLT"
+ partnerRole="approver" />
+ <partnerLink name="assessor"
+ partnerLinkType="lns:riskAssessmentLT"
+ partnerRole="assessor" />
+ </partnerLinks>
+ <variables>
+ <variable name="request"
+ messageType="lns:creditInformationMessage" />
+ <variable name="risk"
+ messageType="lns:riskAssessmentMessage" />
+ <variable name="approval"
+ messageType="lns:approvalMessage" />
+ </variables>
+ <faultHandlers>
+ <catch faultName="lns:loanProcessFault"
+ faultVariable="error"
+ faultMessageType="lns:errorMessage">
+ <reply partnerLink="customer"
+ portType="lns:loanServicePT"
+ operation="request" variable="error"
+ faultName="unableToHandleRequest" />
+ </catch>
+ </faultHandlers>
+ <flow>
+ <links>
+ <link name="receive-to-assess" />
+ <link name="receive-to-approval" />
+ <link name="approval-to-reply" />
+ <link name="assess-to-setMessage" />
+ <link name="setMessage-to-reply" />
+ <link name="assess-to-approval" />
+ </links>
+ <receive partnerLink="customer"
+ portType="lns:loanServicePT"
+ operation="request"
+ variable="request"
+ createInstance="yes">
+ <sources>
+ <source linkName="receive-to-assess">
+ <transitionCondition>
+ $request.amount < 10000
+ </transitionCondition>
+ </source>
+ <source linkName="receive-to-approval">
+ <transitionCondition>
+ $request.amount >= 10000
+ </transitionCondition>
+ </source>
+ </sources>
+ </receive>
+ <invoke partnerLink="assessor"
+ portType="lns:riskAssessmentPT"
+ operation="check"
+ inputVariable="request"
+ outputVariable="risk">
+ <targets>
+ <target linkName="receive-to-assess" />
+ </targets>
+ <sources>
+ <source linkName="assess-to-setMessage">
+ <transitionCondition>
+ $risk.level='low'
+ </transitionCondition>
+ </source>
+ <source linkName="assess-to-approval">
+ <transitionCondition>
+ $risk.level!='low'
+ </transitionCondition>
+ </source>
+ </sources>
+ </invoke>
+ <assign>
+ <targets>
+ <target linkName="assess-to-setMessage" />
+ </targets>
+ <sources>
+ <source linkName="setMessage-to-reply" />
+ </sources>
+ <copy>
+ <from>
+ <literal>yes</literal>
+ </from>
+ <to variable="approval" part="accept" />
+ </copy>
+ </assign>
+ <invoke partnerLink="approver"
+ portType="lns:loanApprovalPT"
+ operation="approve"
+ inputVariable="request"
+ outputVariable="approval">
+ <targets>
+ <target linkName="receive-to-approval" />
+ <target linkName="assess-to-approval" />
+ </targets>
+ <sources>
+ <source linkName="approval-to-reply" />
+ </sources>
+ </invoke>
+ <reply partnerLink="customer"
+ portType="lns:loanServicePT"
+ operation="request"
+ variable="approval">
+ <targets>
+ <target linkName="setMessage-to-reply" />
+ <target linkName="approval-to-reply" />
+ </targets>
+ </reply>
+ </flow>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,24 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Purchasing@Buyer" name="PurchaseGoodsProcess_Buyer" targetNamespace="http://www.jboss.org/savara/examples" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_BuyerArtifacts.wsdl" namespace="http://www.jboss.org/savara/examples"/>
+ <partnerLinks>
+ <partnerLink name="BuyerToStore" partnerLinkType="tns:BuyerToStoreLT" partnerRole="StoreRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="sto:buyRequest" name="buyRequestVar"/>
+ <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+ </variables>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="sto:BuyFailedFault" faultName="sto:BuyFailed" faultVariable="BuyFailedFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="buyRequestVar" name="Send_BuyRequest" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToStore" portType="sto:StoreInterface"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.jboss.org/examples/store" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.jboss.org/savara/examples">
+ <wsdl:import location="PurchaseGoodsProcess_Buyer.wsdl" namespace="http://www.jboss.org/savara/examples"/>
+ <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <plnk:partnerLinkType name="BuyerToStoreLT">
+ <plnk:role name="StoreRequester" portType="ns1:StoreInterface"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,26 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Common@CreditAgency" name="PurchaseGoodsProcess_CreditAgency" targetNamespace="java:org.jboss.savara.examples.purchasing" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <partnerLinks>
+ <partnerLink myRole="CreditAgencyInterface" name="StoreToCreditAgency" partnerLinkType="pur:StoreToCreditAgencyServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="pur:CreditCheckFailedFault" name="CreditCheckFailedFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditRequestVar"/>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="pur:CreditCheckFailed" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="CreditCheckFailedFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CreditAgency" targetNamespace="java:org.jboss.savara.examples.purchasing">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="checkCreditRequest">
+ <wsdl:part name="content" type="pur:CreditCheckRequest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="CreditCheckFailedFault">
+ <wsdl:part name="content" type="pur:CreditCheckInvalid">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="checkCreditResponse">
+ <wsdl:part name="content" type="pur:CreditCheckOk">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="CreditAgencyInterface">
+ <wsdl:operation name="checkCredit">
+ <wsdl:input message="pur:checkCreditRequest">
+ </wsdl:input>
+ <wsdl:output message="pur:checkCreditResponse">
+ </wsdl:output>
+ <wsdl:fault message="pur:CreditCheckFailedFault" name="CreditCheckFailed">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CreditAgencyInterfaceBinding" type="pur:CreditAgencyInterface">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="checkCredit">
+ <soap:operation soapAction="java:org.jboss.savara.examples.purchasing/checkCredit"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="CreditCheckFailed">
+ <soap:fault name="CreditCheckFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CreditAgencyService">
+ <wsdl:port binding="pur:CreditAgencyInterfaceBinding" name="CreditAgencyInterfacePort">
+ <soap:address location="http://localhost:8080/CreditAgencyService/CreditAgencyInterfacePort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="java:org.jboss.savara.examples.purchasing" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="java:org.jboss.savara.examples.purchasing">
+ <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <plnk:partnerLinkType name="StoreToCreditAgencyServiceLT">
+ <plnk:role name="CreditAgencyInterface" portType="ns1:CreditAgencyInterface"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,32 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Purchasing@Store" name="PurchaseGoodsProcess_Store" targetNamespace="http://www.jboss.org/examples/store" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_StoreArtifacts.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <partnerLinks>
+ <partnerLink myRole="StoreInterface" name="BuyerToStore" partnerLinkType="sto:BuyerToStoreServiceLT"/>
+ <partnerLink name="StoreToCreditAgency" partnerLinkType="sto:StoreToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="sto:buyRequest" name="buyRequestVar"/>
+ <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+ <variable messageType="sto:BuyFailedFault" name="BuyFailedFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_BuyRequest" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyRequestVar"/>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="pur:CreditCheckFailedFault" faultName="pur:CreditCheckFailed" faultVariable="CreditCheckFailedFaultVar">
+ <sequence>
+ <reply faultName="sto:BuyFailed" name="Send_BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="BuyFailedFaultVar"/>
+ </sequence>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface"/>
+ <reply name="Send_BuyConfirmed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyResponseVar"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Store" targetNamespace="http://www.jboss.org/examples/store">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="BuyFailedFault">
+ <wsdl:part name="content" type="sto:BuyFailed">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="buyRequest">
+ <wsdl:part name="content" type="sto:BuyRequest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="buyResponse">
+ <wsdl:part name="content" type="sto:BuyConfirmed">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="StoreInterface">
+ <wsdl:operation name="buy">
+ <wsdl:input message="sto:buyRequest">
+ </wsdl:input>
+ <wsdl:output message="sto:buyResponse">
+ </wsdl:output>
+ <wsdl:fault message="sto:BuyFailedFault" name="BuyFailed">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="StoreInterfaceBinding" type="sto:StoreInterface">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="buy">
+ <soap:operation soapAction="http://www.jboss.org/examples/store/buy"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="BuyFailed">
+ <soap:fault name="BuyFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="StoreService">
+ <wsdl:port binding="sto:StoreInterfaceBinding" name="StoreInterfacePort">
+ <soap:address location="http://localhost:8080/StoreService/StoreInterfacePort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.jboss.org/examples/store" xmlns:ns2="java:org.jboss.savara.examples.purchasing" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.jboss.org/examples/store">
+ <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <plnk:partnerLinkType name="BuyerToStoreServiceLT">
+ <plnk:role name="StoreInterface" portType="ns1:StoreInterface"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="StoreToCreditAgencyLT">
+ <plnk:role name="CreditAgencyRequester" portType="ns2:CreditAgencyInterface"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,23 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+ <partnerLinks>
+ <partnerLink name="BuyerToSeller" partnerLinkType="byr:BuyerToSellerLT" partnerRole="SellerRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+ </variables>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="slr:insufficientCreditFault" faultName="slr:insufficientCredit" faultVariable="insufficientCreditFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BuyerToSeller" portType="slr:SellerBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer">
+ <wsdl:import location="ReqRespFaultProcess_Buyer.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+ <wsdl:import location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <plnk:partnerLinkType name="BuyerToSellerLT">
+ <plnk:role name="SellerRequester" portType="ns1:SellerBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,25 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess@Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_SellerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <partnerLinks>
+ <partnerLink myRole="SellerBehavior" name="BuyerToSeller" partnerLinkType="slr:BuyerToSellerServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="slr:insufficientCreditFault" name="insufficientCreditFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditRequestVar"/>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="slr:insufficientCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="insufficientCreditFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="checkCreditRequest">
+ <wsdl:part element="CreditCheckRequest" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="checkCreditResponse">
+ <wsdl:part element="CreditCheckOk" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="insufficientCreditFault">
+ <wsdl:part element="CreditCheckInvalid" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SellerBehavior">
+ <wsdl:operation name="checkCredit">
+ <wsdl:input message="slr:checkCreditRequest">
+ </wsdl:input>
+ <wsdl:output message="slr:checkCreditResponse">
+ </wsdl:output>
+ <wsdl:fault message="slr:insufficientCreditFault" name="insufficientCredit">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SellerBehaviorBinding" type="slr:SellerBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="checkCredit">
+ <soap:operation soapAction="http://www.pi4soa.org/ReqRespFault/Seller/checkCredit"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="insufficientCredit">
+ <soap:fault name="insufficientCredit" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SellerService">
+ <wsdl:port binding="slr:SellerBehaviorBinding" name="SellerBehaviorPort">
+ <soap:address location="http://localhost:8080/SellerService/SellerBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller">
+ <wsdl:import location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <plnk:partnerLinkType name="BuyerToSellerServiceLT">
+ <plnk:role name="SellerBehavior" portType="ns1:SellerBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,15 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngineArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <partnerLinks>
+ <partnerLink myRole="SupplierBehavior" name="BrokerToSupplierQuoteEngine" partnerLinkType="spr:BrokerToSupplierQuoteEngineServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+ <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_requestForQuote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteRequestVar"/>
+ <reply name="Send_quote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteResponseVar"/>
+ </sequence>
+</process>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="confirmRequest">
+ <wsdl:part element="orderConfirmed" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="confirmResponse">
+ <wsdl:part element="bookingReference" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteResponse">
+ <wsdl:part element="quote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteRequest">
+ <wsdl:part element="requestForQuote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SupplierBehavior">
+ <wsdl:operation name="confirm">
+ <wsdl:input message="spr:confirmRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:confirmResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <wsdl:input message="spr:getQuoteRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:getQuoteResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="confirm">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SupplierService">
+ <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+ <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <wsdl:import location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BrokerToSupplierQuoteEngineServiceLT">
+ <plnk:role name="SupplierBehavior" portType="ns1:SupplierBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/AllTests.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/AllTests.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/AllTests.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.tests;
+
+import org.jboss.savara.tools.bpel.generator.GeneratorTest.ChoreographyToBPELTester;
+import org.jboss.savara.tools.bpel.model.change.ModelChangeUtilsTest;
+import org.jboss.savara.tools.bpel.model.component.*;
+import org.jboss.savara.tools.bpel.model.util.InteractionUtilTest;
+import org.jboss.savara.tools.bpel.parser.ParserTest.BPELToConversationTest;
+import org.jboss.savara.tools.bpel.util.XMLUtilsTest;
+import org.scribble.model.SubDefinitionPath;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(ModelChangeUtilsTest.class);
+ suite.addTestSuite(AbstractInteractionTest.class);
+ suite.addTestSuite(BPELActivityTest.class);
+ suite.addTestSuite(BPELElementTest.class);
+ suite.addTestSuite(CatchAllTest.class);
+ suite.addTestSuite(CatchTest.class);
+ suite.addTestSuite(CompensationHandlerTest.class);
+ suite.addTestSuite(ConditionTest.class);
+ suite.addTestSuite(ElseIfTest.class);
+ suite.addTestSuite(ElseTest.class);
+ suite.addTestSuite(EventHandlersTest.class);
+ suite.addTestSuite(ExitTest.class);
+ suite.addTestSuite(FaultHandlersTest.class);
+ suite.addTestSuite(FlowTest.class);
+ suite.addTestSuite(ForEachTest.class);
+ suite.addTestSuite(IfTest.class);
+ suite.addTestSuite(InvokeTest.class);
+ suite.addTestSuite(OnAlarmTest.class);
+ suite.addTestSuite(OnEventTest.class);
+ suite.addTestSuite(OnMessageTest.class);
+ suite.addTestSuite(PartnerLinkTest.class);
+ suite.addTestSuite(PickTest.class);
+ suite.addTestSuite(ProcessTest.class);
+ suite.addTestSuite(ReceiveTest.class);
+ suite.addTestSuite(RepeatUntilTest.class);
+ suite.addTestSuite(ReplyTest.class);
+ suite.addTestSuite(RethrowTest.class);
+ suite.addTestSuite(ScopeTest.class);
+ suite.addTestSuite(SequenceTest.class);
+ suite.addTestSuite(TerminationHandlerTest.class);
+ suite.addTestSuite(ThrowTest.class);
+ suite.addTestSuite(VariableTest.class);
+ suite.addTestSuite(WaitTest.class);
+ suite.addTestSuite(WhileTest.class);
+ suite.addTestSuite(InteractionUtilTest.class);
+ suite.addTestSuite(XMLUtilsTest.class);
+
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker", "Broker"));
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker", "Buyer"));
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker", "CreditAgency"));
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker",
+ new SubDefinitionPath(new String[]{"CompleteTransaction"}),
+ "SupplierTxnProcessor"));
+ suite.addTest(new ChoreographyToBPELTester("ESBBroker",
+ new SubDefinitionPath(new String[]{"RequestForQuote"}),
+ "SupplierQuoteEngine"));
+ suite.addTest(new ChoreographyToBPELTester("PurchaseGoods", "Buyer"));
+ suite.addTest(new ChoreographyToBPELTester("PurchaseGoods", "CreditAgency"));
+ suite.addTest(new ChoreographyToBPELTester("PurchaseGoods", "Store"));
+ suite.addTest(new ChoreographyToBPELTester("ReqRespFault", "Buyer"));
+ suite.addTest(new ChoreographyToBPELTester("ReqRespFault", "Seller"));
+
+ /* SAVARA-151 - need to uncomment tests and find a way to run from Tycho
+ *
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_Broker", "ESBBroker@Broker"));
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_Buyer", "ESBBroker@Buyer"));
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_CreditAgency", "ESBBroker@CreditAgency"));
+ suite.addTest(new BPELToConversationTest("RequestForQuote_SupplierQuoteEngine", "ESBBroker@SupplierQuoteEngine"));
+ suite.addTest(new BPELToConversationTest("CompleteTransaction_SupplierTxnProcessor", "ESBBroker@SupplierTxnProcessor"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_Buyer", "PurchaseGoods@Buyer"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_CreditAgency", "PurchaseGoods@CreditAgency"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_Store", "PurchaseGoods@Store"));
+ suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Buyer", "ReqRespFault@Buyer"));
+ suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Seller", "ReqRespFault@Seller"));
+ */
+
+ /**
+ * TODO: (SAVARA-150) Commenting out this test for now, as we now need the accompanying WSDL to be able to
+ * resolve the message type's underlying XSD element or type.
+ *
+ suite.addTest(new BPELToConversationTest("LoanApprovalService@Service", "LoanApprovalService@Service"));
+ */
+
+ return suite;
+ }
+}
\ No newline at end of file
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/osgi/Activator.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/osgi/Activator.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/tests/osgi/Activator.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,22 @@
+package org.jboss.savara.tools.bpel.tests.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ }
+
+}
Added: trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/util/XMLUtilsTest.java
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/util/XMLUtilsTest.java (rev 0)
+++ trunk/tools/tests/org.jboss.savara.tools.bpel.tests/src/java/org/jboss/savara/tools/bpel/util/XMLUtilsTest.java 2010-11-12 19:20:56 UTC (rev 465)
@@ -0,0 +1,172 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.util;
+
+import org.jboss.savara.tools.bpel.util.XMLUtils;
+import org.scribble.model.ModelObject;
+
+import junit.framework.TestCase;
+
+public class XMLUtilsTest extends TestCase {
+
+ public void testNamespace() {
+ String namespace="http://namespace";
+ String elemName="testElement";
+
+ String expected="<"+elemName+" xmlns=\""+namespace+"\"/>\r\n";
+
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.
+ newInstance();
+ factory.setNamespaceAware(true);
+
+ org.w3c.dom.Document doc=
+ factory.newDocumentBuilder().newDocument();
+
+ org.w3c.dom.Element elem=
+ doc.createElementNS(namespace, elemName);
+
+ String str=XMLUtils.toText(elem);
+
+ if (str.equals(expected) == false) {
+ fail("Expected result '"+expected+"', got: '"+str+"'");
+ }
+
+ } catch(Exception e) {
+ fail("Failed: "+e);
+ }
+ }
+
+ public void testSetStartAndEndPosition() {
+ String xml="<root><myelem></myelem><myelem></myelem></root>";
+
+ try {
+ org.w3c.dom.Element node=(org.w3c.dom.Element)XMLUtils.getNode(xml);
+
+ org.w3c.dom.NodeList nl=node.getElementsByTagName("myelem");
+
+ if (nl.getLength() != 2) {
+ fail("Should be two elements: "+nl.getLength());
+ }
+
+ ModelObject obj=new ModelObject(){};
+
+ XMLUtils.setStartAndEndPosition(obj, xml, (org.w3c.dom.Element)nl.item(1));
+
+ if (obj.getSource().getStartPosition() != 23) {
+ fail("Start position should be 23: "+obj.getSource().getStartPosition());
+ }
+
+ if (obj.getSource().getEndPosition() != 39) {
+ fail("End position should be 39: "+obj.getSource().getEndPosition());
+ }
+
+ } catch(Exception e) {
+ fail("Failed: "+e);
+ }
+ }
+
+ public void testSetStartAndEndPositionWithNS() {
+ String xml="<bpel:root xmlns:bpel=\"myns\" ><bpel:myelem></bpel:myelem><bpel:myelem></bpel:myelem></bpel:root>";
+
+ try {
+ org.w3c.dom.Element node=(org.w3c.dom.Element)XMLUtils.getNode(xml);
+
+ org.w3c.dom.NodeList nl=node.getElementsByTagNameNS("myns", "myelem");
+
+ if (nl.getLength() != 2) {
+ fail("Should be two elements: "+nl.getLength());
+ }
+
+ ModelObject obj=new ModelObject(){};
+
+ XMLUtils.setStartAndEndPosition(obj, xml, (org.w3c.dom.Element)nl.item(1));
+
+ if (obj.getSource().getStartPosition() != 57) {
+ fail("Start position should be 57: "+obj.getSource().getStartPosition());
+ }
+
+ if (obj.getSource().getEndPosition() != 83) {
+ fail("End position should be 83: "+obj.getSource().getEndPosition());
+ }
+
+ } catch(Exception e) {
+ fail("Failed: "+e);
+ }
+ }
+
+ public void testSetStartAndEndPositionSingleNodeWithNS() {
+ String xml="<bpel:root xmlns:bpel=\"myns\" ><bpel:myelem attr=\"1\" /><bpel:myelem attr=\"2\" /></bpel:root>";
+
+ try {
+ org.w3c.dom.Element node=(org.w3c.dom.Element)XMLUtils.getNode(xml);
+
+ org.w3c.dom.NodeList nl=node.getElementsByTagNameNS("myns", "myelem");
+
+ if (nl.getLength() != 2) {
+ fail("Should be two elements: "+nl.getLength());
+ }
+
+ ModelObject obj=new ModelObject(){};
+
+ XMLUtils.setStartAndEndPosition(obj, xml, (org.w3c.dom.Element)nl.item(1));
+
+ if (obj.getSource().getStartPosition() != 54) {
+ fail("Start position should be 54: "+obj.getSource().getStartPosition());
+ }
+
+ if (obj.getSource().getEndPosition() != 77) {
+ fail("End position should be 77: "+obj.getSource().getEndPosition());
+ }
+
+ } catch(Exception e) {
+ fail("Failed: "+e);
+ }
+ }
+
+ public void testSetStartAndEndPositionWithChildAndNS() {
+ String xml="<bpel:root xmlns:bpel=\"myns\" ><bpel:myelem></bpel:myelem>" +
+ "<bpel:myelem><bpel:myelem></bpel:myelem></bpel:myelem></bpel:root>";
+
+ try {
+ org.w3c.dom.Element node=(org.w3c.dom.Element)XMLUtils.getNode(xml);
+
+ org.w3c.dom.NodeList nl=node.getElementsByTagNameNS("myns", "myelem");
+
+ if (nl.getLength() != 3) {
+ fail("Should be three elements: "+nl.getLength());
+ }
+
+ ModelObject obj=new ModelObject(){};
+
+ XMLUtils.setStartAndEndPosition(obj, xml, (org.w3c.dom.Element)nl.item(1));
+
+ if (obj.getSource().getStartPosition() != 57) {
+ fail("Start position should be 57: "+obj.getSource().getStartPosition());
+ }
+
+ if (obj.getSource().getEndPosition() != 110) {
+ fail("End position should be 110: "+obj.getSource().getEndPosition());
+ }
+
+ } catch(Exception e) {
+ fail("Failed: "+e);
+ }
+ }
+}
Modified: trunk/tools/tests/org.jboss.savara.tools.wsdl.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/tests/org.jboss.savara.tools.wsdl.tests/META-INF/MANIFEST.MF 2010-11-12 12:21:09 UTC (rev 464)
+++ trunk/tools/tests/org.jboss.savara.tools.wsdl.tests/META-INF/MANIFEST.MF 2010-11-12 19:20:56 UTC (rev 465)
@@ -5,9 +5,9 @@
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.jboss.savara.tools.wsdl.tests.osgi.Activator
Bundle-Vendor: www.jboss.org
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.osgi.framework;version="1.3.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.osgi.framework
Require-Bundle: org.jboss.savara.contract.model,
- org.jboss.savara.tools.wsdl;bundle-version="1.0.0",
+ org.jboss.savara.tools.wsdl,
org.junit,
org.scribble.core
Modified: trunk/tools/tests/pom.xml
===================================================================
--- trunk/tools/tests/pom.xml 2010-11-12 12:21:09 UTC (rev 464)
+++ trunk/tools/tests/pom.xml 2010-11-12 19:20:56 UTC (rev 465)
@@ -16,6 +16,7 @@
<modules>
<module>org.jboss.savara.protocol.contract.tests</module>
+ <module>org.jboss.savara.tools.bpel.tests</module>
<module>org.jboss.savara.tools.wsdl.tests</module>
</modules>
15 years, 5 months
savara SVN: r464 - in trunk/tools/plugins: org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator and 8 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-11-12 07:21:09 -0500 (Fri, 12 Nov 2010)
New Revision: 464
Added:
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/util/TypeReferenceUtil.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl
Removed:
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)Broker.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)CreditAgency.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)SupplierQuoteEngine.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)SupplierTxnProcessor.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)CreditAgency.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)Store.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault(a)Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault(a)Seller.bpel
Modified:
trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java
trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationChangeRule.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationInteractionModelChangeRule.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/IfModelChangeRule.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/InteractionPatterns.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/LanguageToConversationModelChangeRule.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtils.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/RunModelChangeRule.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/SpawnModelChangeRule.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteraction.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Invoke.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/OnMessage.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Receive.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Reply.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Scope.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Broker.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)CreditAgency.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierQuoteEngine.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierTxnProcessor.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)CreditAgency.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Store.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Buyer.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Seller.bpel
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/test/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java
Log:
Applied changes from 1.1.x branch related to SAVARA-148.
Modified: trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -29,6 +29,7 @@
import org.pi4soa.cdl.interfaces.OperationDefinition;
import org.pi4soa.cdl.interfaces.RoleTypeDefinition;
import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.pi4soa.cdl.util.PackageUtil;
import org.pi4soa.common.util.NamesUtil;
import org.pi4soa.common.xml.XMLUtils;
import org.scribble.model.*;
@@ -321,9 +322,23 @@
} else {
contract = new Contract();
- contract.setName(XMLUtils.getLocalname(pinst.getName()));
- contract.setNamespace(CDLTypeUtil.getNamespace(pinst.getName(), pinst));
+ java.util.List<?> ptypes=
+ PackageUtil.getParticipantsForRoleTypes(choreo.getPackage(),
+ pinst.getRoleTypes());
+ if (ptypes.size() == 1) {
+ ParticipantType pt=(ParticipantType)ptypes.get(0);
+
+ contract.setName(XMLUtils.getLocalname(pt.getName()));
+ contract.setNamespace(CDLTypeUtil.getNamespace(pt.getName(), pt));
+ } else {
+
+ logger.warning("Could not find single participant type for participant instance '"+
+ pinst.getName()+"'");
+ contract.setName(XMLUtils.getLocalname(pinst.getName()));
+ contract.setNamespace(CDLTypeUtil.getNamespace(pinst.getName(), pinst));
+ }
+
// Setup namespace to prefix mappings
java.util.List<NameSpace> nspaces=pinst.getPackage().getTypeDefinitions().getNameSpaces();
Modified: trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -22,6 +22,7 @@
import java.util.logging.Logger;
import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.Interaction;
import org.scribble.model.*;
import org.scribble.conversation.model.*;
import org.scribble.expression.xpath.model.XPathExpression;
@@ -641,14 +642,8 @@
String ret=null;
if (interaction != null) {
- String intfName=InteractionUtil.getInterface(interaction);
+ String intfName=getInterface(interaction);
- if (NamesUtil.isSet(intfName) == false) {
- // If no name set, then use the 'to' role type name
- // Similar to logic used in org.pi4soa.service.behavior.projection.DefaultServiceTypeResolver
- intfName = interaction.getToRoleType().getName();
- }
-
String ns=CDLTypeUtil.getNamespace(intfName, interaction, true);
String lp=XMLUtils.getLocalname(intfName);
@@ -658,5 +653,46 @@
return(ret);
}
+ /**
+ * This method returns the interaction's interface.
+ *
+ * @param interaction The interaction
+ * @return The interface
+ */
+ public static String getInterface(Interaction interaction) {
+ String ret=null;
+
+ if (interaction != null &&
+ interaction.getChannelVariable() != null &&
+ interaction.getChannelVariable().getType() instanceof
+ ChannelType) {
+ ChannelType ctype=(ChannelType)
+ interaction.getChannelVariable().getType();
+
+ if (ctype.getBehavior() != null) {
+ ret = ctype.getBehavior().getInterface();
+
+ if (NamesUtil.isSet(ret)==false) {
+ ret = ctype.getBehavior().getName();
+ }
+ } else if (ctype.getRoleType() != null) {
+
+ // Attempt to find default behavior
+ org.pi4soa.cdl.Behavior behavior=
+ ctype.getRoleType().getBehavior(null);
+
+ if (behavior != null) {
+ ret = behavior.getInterface();
+
+ if (NamesUtil.isSet(ret)==false) {
+ ret = behavior.getName();
+ }
+ }
+ }
+ }
+
+ return(ret);
+ }
+
private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser.rules");
}
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -508,29 +508,32 @@
while (roles.hasNext()) {
Role r=roles.next();
- Contract contract=(Contract)r.getAnnotations().get(Contract.class.getName());
- boolean gen=false;
-
- java.util.Iterator<Interface> iter=contract.getInterfaces().iterator();
-
- while (gen == false && iter.hasNext()) {
- Interface intf=iter.next();
+ if (r != null && r.getAnnotations().containsKey(Contract.class.getName())) {
+ Contract contract=(Contract)r.getAnnotations().get(Contract.class.getName());
- if (intf.getMessageExchangePatterns().size() > 0) {
- gen = true;
+ boolean gen=false;
+
+ java.util.Iterator<Interface> iter=contract.getInterfaces().iterator();
+
+ while (gen == false && iter.hasNext()) {
+ Interface intf=iter.next();
+
+ if (intf.getMessageExchangePatterns().size() > 0) {
+ gen = true;
+ }
}
- }
-
- if (gen) {
- wsdlName = getWSDLFileName(r, localcm.getModelName().getName(), "");
-
- imp = doc.createElement(WSDL_IMPORT);
- imp.setAttribute("namespace", contract.getNamespace());
- imp.setAttribute("location", wsdlName);
-
- defn.appendChild(imp);
+ if (gen) {
+ wsdlName = getWSDLFileName(r, localcm.getModelName().getName(), "");
+
+ imp = doc.createElement(WSDL_IMPORT);
+
+ imp.setAttribute("namespace", contract.getNamespace());
+ imp.setAttribute("location", wsdlName);
+
+ defn.appendChild(imp);
+ }
}
}
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationChangeRule.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationChangeRule.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -96,8 +96,6 @@
Sequence seq=new Sequence(bpelModel);
- ModelChangeUtils.addContracts(context, conv);
-
// Check if root conversation
if (conv.getParent() instanceof Model) {
@@ -199,8 +197,6 @@
// Reset old parent
context.setParent(parent);
- ModelChangeUtils.removeContracts(context, conv);
-
return(true);
}
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationInteractionModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationInteractionModelChangeRule.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationInteractionModelChangeRule.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -100,7 +100,7 @@
PartnerLink pl=new PartnerLink(bpelModel);
Role role=null;
String portType=null;
- String varName=InteractionPatterns.getVariableName(interaction);
+ String varName=null; //InteractionPatterns.getVariableName(interaction);
Interface intf=null;
if (interaction.getEnclosingDefinition() != null) {
@@ -161,6 +161,46 @@
}
}
+ // Create variable
+ //if (varName != null) {
+ QName qname=null;
+ if (InteractionUtil.isRequest(interaction)) {
+ qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+ interaction.getMessageSignature().getOperation());
+ } else if (InteractionPatterns.isFaultResponse(interaction)) {
+ qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+ InteractionPatterns.getFaultName(interaction));
+ } else {
+ qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+ interaction.getMessageSignature().getOperation());
+ }
+
+ varName = qname.getLocalPart()+"Var";
+
+ org.jboss.savara.tools.bpel.model.component.Variable var=
+ bpelModel.getBPELProcess().getVariable(varName);
+
+ if (var == null) {
+ var = new org.jboss.savara.tools.bpel.model.component.Variable(bpelModel);
+ var.setName(varName);
+
+ String mesgType=qname.getLocalPart();
+
+ // Find namespace prefix
+ if (qname.getNamespaceURI() != null) {
+ String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
+
+ if (pfix != null) {
+ mesgType = pfix+":"+mesgType;
+ }
+ }
+
+ var.setMessageType(mesgType);
+
+ bpelModel.getBPELProcess().addVariable(var, -1);
+ }
+ //}
+
// Check if send or receive
if (InteractionUtil.isSend(interaction)) {
@@ -195,7 +235,7 @@
String plt=role.getName()+"To"+interaction.getToRole().getName()+"LT";
- if (prefix != null) {
+ if (mainPrefix != null) {
plt = mainPrefix+":"+plt;
}
@@ -215,7 +255,7 @@
String plt=interaction.getToRole().getName()+"To"+role.getName()+"Service"+"LT";
- if (prefix != null) {
+ if (mainPrefix != null) {
plt = mainPrefix+":"+plt;
}
@@ -265,8 +305,7 @@
String intfName=(String)interaction.getAnnotations().get("interfaceName");
if (intfName != null && intfName.trim().length() > 0) {
- javax.xml.namespace.QName qname=javax.xml.namespace.QName.valueOf(intfName);
- intfName = qname.getLocalPart();
+ intfName = javax.xml.namespace.QName.valueOf(intfName).getLocalPart();
} else {
intfName = role.getName();
}
@@ -279,7 +318,7 @@
String plt=interaction.getFromRole().getName()+"To"+role.getName()+"Service"+"LT";
- if (prefix != null) {
+ if (mainPrefix != null) {
plt = mainPrefix+":"+plt;
}
@@ -293,7 +332,7 @@
String plt=role.getName()+"To"+interaction.getFromRole().getName()+"Requester"+"LT";
- if (prefix != null) {
+ if (mainPrefix != null) {
plt = mainPrefix+":"+plt;
}
@@ -358,44 +397,6 @@
}
}
- // Create variable
- if (varName != null) {
- org.jboss.savara.tools.bpel.model.component.Variable var=
- bpelModel.getBPELProcess().getVariable(varName);
-
- if (var == null) {
- var = new org.jboss.savara.tools.bpel.model.component.Variable(bpelModel);
- var.setName(varName);
-
- QName qname=null;
- if (InteractionUtil.isRequest(interaction)) {
- qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
- interaction.getMessageSignature().getOperation());
- } else if (InteractionPatterns.isFaultResponse(interaction)) {
- qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
- InteractionPatterns.getFaultName(interaction));
- } else {
- qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
- interaction.getMessageSignature().getOperation());
- }
-
- String mesgType=qname.getLocalPart();
-
- // Find namespace prefix
- if (qname.getNamespaceURI() != null) {
- String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
-
- if (pfix != null) {
- mesgType = pfix+":"+mesgType;
- }
- }
-
- var.setMessageType(mesgType);
-
- bpelModel.getBPELProcess().addVariable(var, -1);
- }
- }
-
return(ret);
}
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/IfModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/IfModelChangeRule.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/IfModelChangeRule.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -116,11 +116,7 @@
InteractionPatterns.isFaultResponse(
(Interaction)act)) {
String faultName=InteractionPatterns.getFaultName((Interaction)act);
- String faultVarName=InteractionPatterns.getVariableName((Interaction)act);
- Catch c=new Catch(bpelModel);
- c.setFaultVariable(faultVarName);
-
Contract contract = ModelChangeUtils.getContract(context,
((Interaction)act).getFromRole().getName());
@@ -128,9 +124,13 @@
QName qname= WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
faultName);
+ String faultVarName=qname.getLocalPart()+"Var";
String mesgType=InteractionPatterns.getMessageTypeLocalPart((Interaction)act);
//String namespace=InteractionPatterns.getMessageTypeNameSpace((Interaction)act);
+ Catch c=new Catch(bpelModel);
+ c.setFaultVariable(faultVarName);
+
// Find namespace prefix
if (qname != null) {
String prefix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
@@ -157,7 +157,22 @@
if (acts.size() > 0 && act instanceof Interaction &&
acts.get(acts.size()-1) instanceof Invoke) {
- String varName=InteractionPatterns.getVariableName((Interaction)act);
+ Contract contract = ModelChangeUtils.getContract(context,
+ ((Interaction)act).getFromRole().getName());
+
+ QName qname=null;
+ if (InteractionUtil.isRequest((Interaction)act)) {
+ qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+ ((Interaction)act).getMessageSignature().getOperation());
+ } else if (InteractionPatterns.isFaultResponse((Interaction)act)) {
+ qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+ InteractionPatterns.getFaultName((Interaction)act));
+ } else {
+ qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+ ((Interaction)act).getMessageSignature().getOperation());
+ }
+
+ String varName=qname.getLocalPart()+"Var"; //InteractionPatterns.getVariableName((Interaction)act);
Invoke invoke=(Invoke)acts.get(acts.size()-1);
invoke.setOutputVariable(varName);
@@ -217,15 +232,9 @@
Interaction recv=InteractionPatterns.getPickPathInteraction(path);
- String varName=InteractionPatterns.getVariableName(recv);
-
OnMessage onm=new OnMessage(bpelModel);
onm.setActivity(seq);
- if (varName != null) {
- onm.setVariable(varName);
- }
-
PartnerLink pl=new PartnerLink(bpelModel);
String portType=null;
@@ -300,6 +309,24 @@
}
}
+ QName qname=null;
+ if (InteractionUtil.isRequest(recv)) {
+ qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+ recv.getMessageSignature().getOperation());
+ } else if (InteractionPatterns.isFaultResponse(recv)) {
+ qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+ InteractionPatterns.getFaultName(recv));
+ } else {
+ qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+ recv.getMessageSignature().getOperation());
+ }
+
+ String varName=qname.getLocalPart()+"Var"; //InteractionPatterns.getVariableName(recv);
+
+ if (varName != null) {
+ onm.setVariable(varName);
+ }
+
// Create partner link
PartnerLink other=
bpelModel.getBPELProcess().getPartnerLink(pl.getName());
@@ -399,6 +426,13 @@
bpelModel.getBPELProcess().getVariable(varName);
if (var == null) {
+ Role role=null;
+
+ if (interaction.getEnclosingDefinition() != null) {
+ role = interaction.getEnclosingDefinition().
+ getLocatedName().getRole();
+ }
+
var = new org.jboss.savara.tools.bpel.model.component.Variable(bpelModel);
var.setName(varName);
@@ -407,8 +441,14 @@
if (InteractionUtil.isRequest(interaction)) {
roleType = interaction.getToRole();
+ if (roleType == null) {
+ roleType = role;
+ }
} else {
roleType = interaction.getFromRole();
+ if (roleType == null) {
+ roleType = role;
+ }
}
if (roleType != null) {
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/InteractionPatterns.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/InteractionPatterns.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/InteractionPatterns.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -324,6 +324,7 @@
getMessageSignature().getAnnotations().get(MESSAGE_TYPE_NAMESPACE));
}
+ /*
public static String getVariableName(Interaction interaction) {
String varName=getMessageTypeLocalPart(interaction);
@@ -344,6 +345,7 @@
return(varName);
}
+ */
public static boolean isSyncNormalResponse(Interaction interaction) {
boolean ret=false;
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/LanguageToConversationModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/LanguageToConversationModelChangeRule.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/LanguageToConversationModelChangeRule.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -87,7 +87,11 @@
ConversationModel cm=(ConversationModel)mobj;
if (cm.getConversation() != null) {
+ ModelChangeUtils.addContracts(context, cm.getConversation(), true);
+
context.insert(model, cm.getConversation(), null);
+
+ ModelChangeUtils.removeContracts(context, cm.getConversation(), true);
}
return(true);
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtils.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtils.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtils.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -33,9 +33,10 @@
*
* @param context The context
* @param conv The conversation
+ * @param root Whether this is the root conversation
*/
@SuppressWarnings("unchecked")
- public static void addContracts(ModelChangeContext context, Conversation conv) {
+ public static void addContracts(ModelChangeContext context, Conversation conv, boolean root) {
java.util.Map<String,Contract> contracts=(java.util.Map<String,Contract>)
context.getProperties().get(Contract.class.getName());
@@ -46,15 +47,44 @@
context.getProperties().put(Contract.class.getName(), contracts);
}
- if (conv.getLocatedName().getRole() != null) {
+ if (conv.getLocatedName().getRole() != null && root) {
addRoleContract(conv.getLocatedName().getRole(), contracts);
}
- for (Role r : conv.getRoles()) {
+ // Get list of roles
+ java.util.List<Role> roles=getRoles(conv);
+
+ for (Role r : roles) {
addRoleContract(r, contracts);
}
}
+ // NOTE: Return all the roles defined in the scope of this conversation
+ // Would be better to incrementally add contracts for roles, as defined
+ // in their own scope, but need to refactor how blocks are dealt with
+ // first - which is different in some cases, so not straightforward.
+ protected static java.util.List<Role> getRoles(final Conversation conv) {
+ final java.util.List<Role> roles=new java.util.Vector<Role>();
+
+ conv.visit(new Visitor() {
+
+ public boolean visit(ModelObject obj) {
+ boolean ret=true;
+
+ if (obj instanceof RoleList) {
+ roles.addAll(((RoleList)obj).getRoles());
+ } else if (obj instanceof Conversation &&
+ obj != conv) {
+ ret = false;
+ }
+
+ return(ret);
+ }
+ });
+
+ return(roles);
+ }
+
/**
* This method initializes the contract associated with the supplied role.
*
@@ -86,20 +116,24 @@
*
* @param context The context
* @param conv The conversation
+ * @param root Whether this is the root conversation
*/
@SuppressWarnings("unchecked")
- public static void removeContracts(ModelChangeContext context, Conversation conv) {
+ public static void removeContracts(ModelChangeContext context, Conversation conv, boolean root) {
java.util.Map<String,Contract> contracts=(java.util.Map<String,Contract>)
context.getProperties().get(Contract.class.getName());
if (contracts != null) {
- if (conv.getLocatedName().getRole() != null) {
+ if (conv.getLocatedName().getRole() != null && root) {
removeRoleContract(conv.getLocatedName().getRole(), contracts);
}
- for (Role r : conv.getRoles()) {
+ // Get list of roles
+ java.util.List<Role> roles=getRoles(conv);
+
+ for (Role r : roles) {
removeRoleContract(r, contracts);
}
}
@@ -132,18 +166,27 @@
* declaration bindings.
*
* @param context The context
- * @param bindings The declaration bindings
+ * @param run The run construct
*/
@SuppressWarnings("unchecked")
public static void pushRoleContractMapping(ModelChangeContext context,
- java.util.List<DeclarationBinding> bindings) {
+ Compose run) {
if (context.getProperties().containsKey(Contract.class.getName())) {
java.util.Map<String,Contract> contracts=
(java.util.Map<String,Contract>)
context.getProperties().get(Contract.class.getName());
- for (DeclarationBinding db : bindings) {
+ if (run.getEnclosingDefinition().getLocatedName().getRole() != null &&
+ run.getDefinition().getLocatedName().getRole() != null) {
+ Contract c=contracts.remove(run.getEnclosingDefinition().getLocatedName().getRole().getName());
+
+ if (c != null) {
+ contracts.put(run.getDefinition().getLocatedName().getRole().getName(), c);
+ }
+ }
+
+ for (DeclarationBinding db : run.getBindings()) {
if (db.getDeclaration() instanceof Role) {
Contract c=contracts.remove(db.getDeclaration().getName());
@@ -161,18 +204,27 @@
* declaration bindings.
*
* @param context The context
- * @param bindings The declaration bindings
+ * @param run The run construct
*/
@SuppressWarnings("unchecked")
public static void popRoleContractMapping(ModelChangeContext context,
- java.util.List<DeclarationBinding> bindings) {
+ Compose run) {
if (context.getProperties().containsKey(Contract.class.getName())) {
java.util.Map<String,Contract> contracts=
(java.util.Map<String,Contract>)
context.getProperties().get(Contract.class.getName());
- for (DeclarationBinding db : bindings) {
+ if (run.getEnclosingDefinition().getLocatedName().getRole() != null &&
+ run.getDefinition().getLocatedName().getRole() != null) {
+ Contract c=contracts.remove(run.getDefinition().getLocatedName().getRole().getName());
+
+ if (c != null) {
+ contracts.put(run.getEnclosingDefinition().getLocatedName().getRole().getName(), c);
+ }
+ }
+
+ for (DeclarationBinding db : run.getBindings()) {
if (db.getDeclaration() instanceof Role) {
Contract c=contracts.remove(db.getBoundName());
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/RunModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/RunModelChangeRule.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/RunModelChangeRule.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -88,7 +88,16 @@
Run elem=(Run)mobj;
if (elem.getDefinition() != null) {
+
+ ModelChangeUtils.pushRoleContractMapping(context, elem);
+
+ ModelChangeUtils.addContracts(context, elem.getDefinition(), false);
+
context.insert(bpelModel, elem.getDefinition(), ref);
+
+ ModelChangeUtils.removeContracts(context, elem.getDefinition(), false);
+
+ ModelChangeUtils.popRoleContractMapping(context, elem);
}
return(true);
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/SpawnModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/SpawnModelChangeRule.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/SpawnModelChangeRule.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -88,7 +88,15 @@
Spawn elem=(Spawn)mobj;
if (elem.getDefinition() != null) {
+ ModelChangeUtils.pushRoleContractMapping(context, elem);
+
+ ModelChangeUtils.addContracts(context, elem.getDefinition(), false);
+
context.insert(bpelModel, elem.getDefinition(), ref);
+
+ ModelChangeUtils.removeContracts(context, elem.getDefinition(), false);
+
+ ModelChangeUtils.popRoleContractMapping(context, elem);
}
return(true);
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteraction.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteraction.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteraction.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -146,40 +146,6 @@
return(ret);
}
- protected TypeReference createTypeReference(String type, ConversionContext context) {
- TypeReference ret=new TypeReference();
- ret.derivedFrom(this);
-
- if (type != null) {
- int index=-1;
-
- if (type.charAt(0) == '{') {
- // Assume a qname
- QName qname=QName.valueOf(type);
-
- ret.setLocalpart(qname.getLocalPart());
- ret.setNamespace(qname.getNamespaceURI());
-
- } else if ((index=type.indexOf(':')) == -1) {
- ret.setLocalpart(type);
-
- } else {
- ret.setLocalpart(type.substring(index+1));
-
- String prefix=type.substring(0, index);
- String ns=context.getNamespace(prefix);
-
- if (ns != null) {
- ret.setNamespace(ns);
- } else {
- // TODO: Log error
- }
- }
- }
-
- return(ret);
- }
-
/**
* This method validates the BPEL activity and reports warnings or
* errors to the supplied model listener.
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Invoke.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Invoke.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Invoke.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -21,6 +21,8 @@
import org.scribble.model.*;
import org.scribble.model.admin.ModelListener;
import org.jboss.savara.tools.bpel.model.*;
+import org.jboss.savara.tools.bpel.model.util.TypeReferenceUtil;
+import org.jboss.savara.tools.bpel.util.XMLUtils;
/**
* This class represents an unsupported (or custom) action within
@@ -185,7 +187,7 @@
new org.scribble.conversation.model.Raise();
TypeReference tref=new TypeReference();
- tref.setLocalpart(catchBlock.getFaultName());
+ tref.setLocalpart(XMLUtils.getLocalname(catchBlock.getFaultName()));
raise.setType(tref);
fcb.getContents().add(raise);
@@ -215,7 +217,7 @@
String xmlType=context.getProcess().getXMLType(var.getMessageType(),
context.getEnvironmentContext());
- TypeReference tref=createTypeReference(xmlType, context);
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
MessageSignature ms=new MessageSignature();
ms.setOperation(getOperation());
@@ -248,7 +250,7 @@
String xmlType=context.getProcess().getXMLType(var.getMessageType(),
context.getEnvironmentContext());
- TypeReference tref=createTypeReference(xmlType, context);
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
MessageSignature ms=new MessageSignature();
ms.setOperation(getOperation());
@@ -289,10 +291,10 @@
String xmlType=context.getProcess().getXMLType(var.getMessageType(),
context.getEnvironmentContext());
- tref = createTypeReference(xmlType, context);
+ tref = TypeReferenceUtil.createTypeReference(xmlType, context);
//tref.setLocalpart(var.getMessageType());
} else if (faultMesgType != null) {
- tref = createTypeReference(faultMesgType, context);
+ tref = TypeReferenceUtil.createTypeReference(faultMesgType, context);
//tref.setLocalpart(faultMesgType);
}
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/OnMessage.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/OnMessage.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/OnMessage.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -20,6 +20,7 @@
import java.util.List;
import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.util.TypeReferenceUtil;
import org.scribble.conversation.model.ConversationInteraction;
import org.scribble.model.Activity;
import org.scribble.model.MessageSignature;
@@ -192,13 +193,12 @@
ConversationInteraction interaction=new ConversationInteraction();
- TypeReference tref=new TypeReference();
-
Variable var=context.getVariable(getVariable());
- if (var != null) {
- tref.setLocalpart(var.getMessageType());
- }
+ String xmlType=context.getProcess().getXMLType(var.getMessageType(),
+ context.getEnvironmentContext());
+
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
MessageSignature ms=new MessageSignature();
ms.setOperation(getOperation());
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -32,6 +32,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.savara.tools.bpel.model.*;
import org.jboss.savara.tools.bpel.model.util.InteractionUtil;
+import org.jboss.savara.tools.bpel.util.XMLUtils;
/**
* This class represents a BPEL process.
@@ -184,7 +185,7 @@
// Resolve the namespace prefix
int index=wsdlMessageType.indexOf(':');
- if (index != -1) {
+ if (index != -1 && context != null) {
String prefix=wsdlMessageType.substring(0, index);
String namespace=getNamespace(prefix);
@@ -843,7 +844,7 @@
cb.derivedFrom(catchPath);
TypeReference tref=new TypeReference();
- tref.setLocalpart(catchPath.getFaultName());
+ tref.setLocalpart(XMLUtils.getLocalname(catchPath.getFaultName()));
cb.setType(tref);
Variable faultVar=null;
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Receive.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Receive.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Receive.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -21,6 +21,7 @@
import org.scribble.model.*;
import org.scribble.model.admin.ModelListener;
import org.jboss.savara.tools.bpel.model.*;
+import org.jboss.savara.tools.bpel.model.util.TypeReferenceUtil;
/**
* This class represents an unsupported (or custom) action within
@@ -140,7 +141,7 @@
String xmlType=context.getProcess().getXMLType(var.getMessageType(),
context.getEnvironmentContext());
- TypeReference tref=createTypeReference(xmlType, context);
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
MessageSignature ms=new MessageSignature();
ms.derivedFrom(this);
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Reply.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Reply.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Reply.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -21,6 +21,7 @@
import org.scribble.model.*;
import org.scribble.model.admin.ModelListener;
import org.jboss.savara.tools.bpel.model.*;
+import org.jboss.savara.tools.bpel.model.util.TypeReferenceUtil;
/**
* This class represents a BPEL reply activity.
@@ -128,7 +129,7 @@
String xmlType=context.getProcess().getXMLType(var.getMessageType(),
context.getEnvironmentContext());
- TypeReference tref=createTypeReference(xmlType, context);
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
MessageSignature ms=new MessageSignature();
ms.derivedFrom(this);
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Scope.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Scope.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Scope.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -25,6 +25,7 @@
import org.scribble.model.admin.ModelListener;
import org.jboss.savara.tools.bpel.model.*;
import org.jboss.savara.tools.bpel.model.util.InteractionUtil;
+import org.jboss.savara.tools.bpel.util.XMLUtils;
/**
* This class represents a scope grouping activity.
@@ -632,7 +633,7 @@
cb.derivedFrom(catchPath);
TypeReference tref=new TypeReference();
- tref.setLocalpart(catchPath.getFaultName());
+ tref.setLocalpart(XMLUtils.getLocalname(catchPath.getFaultName()));
cb.setType(tref);
Variable faultVar=null;
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/util/TypeReferenceUtil.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/util/TypeReferenceUtil.java (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/util/TypeReferenceUtil.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.util;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.savara.tools.bpel.model.component.ConversionContext;
+import org.scribble.model.TypeReference;
+
+public class TypeReferenceUtil {
+
+ public static TypeReference createTypeReference(String type, ConversionContext context) {
+ TypeReference ret=new TypeReference();
+ //ret.derivedFrom(this);
+
+ if (type != null) {
+ int index=-1;
+
+ if (type.charAt(0) == '{') {
+ // Assume a qname
+ QName qname=QName.valueOf(type);
+
+ ret.setLocalpart(qname.getLocalPart());
+ ret.setNamespace(qname.getNamespaceURI());
+
+ } else if ((index=type.indexOf(':')) == -1) {
+ ret.setLocalpart(type);
+
+ } else {
+ ret.setLocalpart(type.substring(index+1));
+
+ String prefix=type.substring(0, index);
+ String ns=context.getNamespace(prefix);
+
+ if (ns != null) {
+ ret.setNamespace(ns);
+ } else {
+ // TODO: Log error
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+}
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Broker.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Broker.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Broker.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,63 +1,64 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BrokerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BrokerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
<partnerLinks>
- <partnerLink myRole="BrokerService" name="BuyerToBroker" partnerLinkType="tns:BuyerToBrokerServiceLT"/>
- <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="tns:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
- <partnerLink name="BrokerToCreditAgency" partnerLinkType="tns:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
- <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="tns:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
+ <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="brk:BuyerToBrokerServiceLT"/>
+ <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="brk:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
+ <partnerLink name="BrokerToCreditAgency" partnerLinkType="brk:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+ <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="brk:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
</partnerLinks>
<variables>
- <variable messageType="tns:makeEnquiryRequest" name="enquiryVar"/>
- <variable messageType="ns1:getQuoteRequest" name="requestForQuoteVar"/>
- <variable messageType="ns1:getQuoteResponse" name="quoteVar"/>
- <variable messageType="tns:makeEnquiryResponse" name="quoteListVar"/>
- <variable messageType="tns:buyRequest" name="buyVar"/>
- <variable messageType="tns:checkCreditRequest" name="creditCheckRequestVar"/>
- <variable messageType="tns:checkCreditResponse" name="creditCheckOkVar"/>
- <variable messageType="ns1:confirmRequest" name="orderConfirmedVar"/>
- <variable messageType="ns1:confirmResponse" name="bookingReferenceVar"/>
- <variable messageType="tns:rejectedFault" name="orderRejectedVar"/>
- <variable messageType="tns:cancelRequest" name="cancelVar"/>
+ <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+ <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+ <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+ <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+ <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+ <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+ <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+ <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+ <variable messageType="brk:rejectedFault" name="rejectedFaultVar"/>
+ <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
</variables>
<sequence>
- <receive createInstance="yes" name="Receive_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="enquiryVar"/>
+ <receive createInstance="yes" name="Receive_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryRequestVar"/>
<while>
<sequence>
<scope>
<sequence>
- <invoke inputVariable="requestForQuoteVar" name="Send_requestForQuote" operation="getQuote" outputVariable="quoteVar" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior"/>
+ <invoke inputVariable="getQuoteRequestVar" name="Send_requestForQuote" operation="getQuote" outputVariable="getQuoteResponseVar" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior"/>
</sequence>
</scope>
</sequence>
</while>
- <reply name="Send_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="quoteListVar"/>
+ <reply name="Send_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
<pick>
- <onMessage operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="buyVar">
+ <onMessage operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyRequestVar">
<sequence>
<scope>
<sequence>
<scope>
<faultHandlers>
- <catch faultMessageType="tns:invalidCreditFault" faultName="tns:invalidCredit" faultVariable="creditCheckInvalidVar">
+ <catch faultMessageType="cay:invalidCreditFault" faultName="cay:invalidCredit" faultVariable="invalidCreditFaultVar">
<sequence>
- <reply faultName="tns:rejected" name="Send_orderRejected" operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="orderRejectedVar"/>
+ <reply faultName="brk:rejected" name="Send_orderRejected" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="rejectedFaultVar"/>
</sequence>
</catch>
</faultHandlers>
<sequence>
- <invoke inputVariable="creditCheckRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior"/>
- <invoke inputVariable="orderConfirmedVar" name="Send_orderConfirmed" operation="confirm" outputVariable="bookingReferenceVar" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior"/>
- <reply name="Send_bookingReference" operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="bookingReferenceVar"/>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior"/>
+ <invoke inputVariable="confirmRequestVar" name="Send_orderConfirmed" operation="confirm" outputVariable="confirmResponseVar" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior"/>
+ <reply name="Send_bookingReference" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyResponseVar"/>
</sequence>
</scope>
</sequence>
</scope>
</sequence>
</onMessage>
- <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="cancelVar">
+ <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="cancelRequestVar">
<sequence/>
</onMessage>
</pick>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Buyer.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,33 +1,33 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
<partnerLinks>
- <partnerLink myRole="BuyerRequester" name="BuyerToBroker" partnerLinkType="tns:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
+ <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="byr:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
</partnerLinks>
<variables>
- <variable messageType="tns:makeEnquiryRequest" name="enquiryVar"/>
- <variable messageType="tns:makeEnquiryResponse" name="quoteListVar"/>
- <variable messageType="tns:buyRequest" name="buyVar"/>
- <variable messageType="tns:buyResponse" name="bookingReferenceVar"/>
- <variable messageType="tns:cancelRequest" name="cancelVar"/>
+ <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+ <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+ <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+ <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+ <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
</variables>
<sequence>
- <invoke inputVariable="enquiryVar" name="Send_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
- <receive name="Receive_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="quoteListVar"/>
+ <invoke inputVariable="makeEnquiryRequestVar" name="Send_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ <receive name="Receive_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
<if>
<sequence>
<scope>
<sequence>
<scope>
<faultHandlers>
- <catch faultMessageType="tns:rejectedFault" faultName="tns:rejected" faultVariable="orderRejectedVar">
+ <catch faultMessageType="brk:rejectedFault" faultName="brk:rejected" faultVariable="rejectedFaultVar">
<sequence/>
</catch>
</faultHandlers>
<sequence>
- <invoke inputVariable="buyVar" name="Send_buy" operation="buy" outputVariable="bookingReferenceVar" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
+ <invoke inputVariable="buyRequestVar" name="Send_buy" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
</sequence>
</scope>
</sequence>
@@ -35,7 +35,7 @@
</sequence>
<else>
<sequence>
- <invoke inputVariable="cancelVar" name="Send_cancel" operation="cancel" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
+ <invoke inputVariable="cancelRequestVar" name="Send_cancel" operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
</sequence>
</else>
</if>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)CreditAgency.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)CreditAgency.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,29 +1,29 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common@CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgencyArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common@CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgencyArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
<partnerLinks>
- <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="tns:BrokerToCreditAgencyServiceLT"/>
+ <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="cay:BrokerToCreditAgencyServiceLT"/>
</partnerLinks>
<variables>
- <variable messageType="tns:checkCreditRequest" name="creditCheckRequestVar"/>
- <variable messageType="tns:checkCreditResponse" name="creditCheckOkVar"/>
- <variable messageType="tns:invalidCreditFault" name="creditCheckInvalidVar"/>
+ <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="cay:invalidCreditFault" name="invalidCreditFaultVar"/>
</variables>
<sequence>
<pick>
- <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckRequestVar">
+ <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditRequestVar">
<sequence>
<scope>
<sequence>
<if>
<sequence>
- <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckOkVar"/>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditResponseVar"/>
</sequence>
<else>
<sequence>
- <reply faultName="tns:invalidCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckInvalidVar"/>
+ <reply faultName="cay:invalidCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="invalidCreditFaultVar"/>
</sequence>
</else>
</if>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierQuoteEngine.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierQuoteEngine.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierQuoteEngine.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,15 +1,15 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace=""/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngineArtifacts.wsdl" namespace=""/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngineArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
<partnerLinks>
- <partnerLink myRole="SupplierQuoteEngineService" name="BrokerToSupplierQuoteEngine" partnerLinkType="ns1:BrokerToSupplierQuoteEngineServiceLT"/>
+ <partnerLink myRole="SupplierBehavior" name="BrokerToSupplierQuoteEngine" partnerLinkType="spr:BrokerToSupplierQuoteEngineServiceLT"/>
</partnerLinks>
<variables>
- <variable messageType="ns1:getQuoteRequest" name="requestForQuoteVar"/>
- <variable messageType="ns1:getQuoteResponse" name="quoteVar"/>
+ <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+ <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
</variables>
<sequence>
- <receive createInstance="yes" name="Receive_requestForQuote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior" variable="requestForQuoteVar"/>
- <reply name="Send_quote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior" variable="quoteVar"/>
+ <receive createInstance="yes" name="Receive_requestForQuote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteRequestVar"/>
+ <reply name="Send_quote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteResponseVar"/>
</sequence>
</process>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierTxnProcessor.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierTxnProcessor.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker(a)SupplierTxnProcessor.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,18 +1,18 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace=""/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl" namespace=""/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
<partnerLinks>
- <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="ns2:BrokerToSupplierTxnProcessorServiceLT"/>
+ <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="spr:BrokerToSupplierTxnProcessorServiceLT"/>
</partnerLinks>
<variables>
- <variable messageType="ns1:confirmRequest" name="orderConfirmedVar"/>
- <variable messageType="ns1:confirmResponse" name="bookingReferenceVar"/>
+ <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+ <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
</variables>
<sequence>
<pick createInstance="yes">
- <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior" variable="orderConfirmedVar">
+ <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmRequestVar">
<sequence>
- <reply name="Send_bookingReference" operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior" variable="bookingReferenceVar"/>
+ <reply name="Send_bookingReference" operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmResponseVar"/>
</sequence>
</onMessage>
</pick>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Buyer.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -7,17 +7,17 @@
</partnerLinks>
<variables>
<variable messageType="sto:buyRequest" name="buyRequestVar"/>
- <variable messageType="sto:buyResponse" name="buyConfirmedVar"/>
+ <variable messageType="sto:buyResponse" name="buyResponseVar"/>
</variables>
<sequence>
<scope>
<faultHandlers>
- <catch faultMessageType="sto:BuyFailedFault" faultName="sto:BuyFailed" faultVariable="buyFailedVar">
+ <catch faultMessageType="sto:BuyFailedFault" faultName="sto:BuyFailed" faultVariable="BuyFailedFaultVar">
<sequence/>
</catch>
</faultHandlers>
<sequence>
- <invoke inputVariable="buyRequestVar" name="Send_BuyRequest" operation="buy" outputVariable="buyConfirmedVar" partnerLink="BuyerToStore" portType="sto:StoreInterface"/>
+ <invoke inputVariable="buyRequestVar" name="Send_BuyRequest" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToStore" portType="sto:StoreInterface"/>
</sequence>
</scope>
</sequence>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)CreditAgency.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)CreditAgency.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -3,22 +3,22 @@
<import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
<import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
<partnerLinks>
- <partnerLink myRole="CreditAgencyService" name="StoreToCreditAgency" partnerLinkType="pur:StoreToCreditAgencyServiceLT"/>
+ <partnerLink myRole="CreditAgencyInterface" name="StoreToCreditAgency" partnerLinkType="pur:StoreToCreditAgencyServiceLT"/>
</partnerLinks>
<variables>
- <variable messageType="pur:checkCreditRequest" name="creditCheckRequestVar"/>
- <variable messageType="pur:checkCreditResponse" name="creditCheckOkVar"/>
- <variable messageType="pur:CreditCheckFailedFault" name="creditCheckInvalidVar"/>
+ <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="pur:CreditCheckFailedFault" name="CreditCheckFailedFaultVar"/>
</variables>
<sequence>
- <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="creditCheckRequestVar"/>
+ <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditRequestVar"/>
<if>
<sequence>
- <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="creditCheckOkVar"/>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditResponseVar"/>
</sequence>
<else>
<sequence>
- <reply faultName="pur:CreditCheckFailed" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="creditCheckInvalidVar"/>
+ <reply faultName="pur:CreditCheckFailed" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="CreditCheckFailedFaultVar"/>
</sequence>
</else>
</if>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Store.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Store.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods(a)Store.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -3,29 +3,29 @@
<import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
<import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_StoreArtifacts.wsdl" namespace="http://www.jboss.org/examples/store"/>
<partnerLinks>
- <partnerLink myRole="StoreService" name="BuyerToStore" partnerLinkType="sto:BuyerToStoreServiceLT"/>
+ <partnerLink myRole="StoreInterface" name="BuyerToStore" partnerLinkType="sto:BuyerToStoreServiceLT"/>
<partnerLink name="StoreToCreditAgency" partnerLinkType="sto:StoreToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
</partnerLinks>
<variables>
<variable messageType="sto:buyRequest" name="buyRequestVar"/>
- <variable messageType="pur:checkCreditRequest" name="creditCheckRequestVar"/>
- <variable messageType="pur:checkCreditResponse" name="creditCheckOkVar"/>
- <variable messageType="sto:buyResponse" name="buyConfirmedVar"/>
- <variable messageType="sto:BuyFailedFault" name="buyFailedVar"/>
+ <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+ <variable messageType="sto:BuyFailedFault" name="BuyFailedFaultVar"/>
</variables>
<sequence>
<receive createInstance="yes" name="Receive_BuyRequest" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyRequestVar"/>
<scope>
<faultHandlers>
- <catch faultMessageType="pur:CreditCheckFailedFault" faultName="pur:CreditCheckFailed" faultVariable="creditCheckInvalidVar">
+ <catch faultMessageType="pur:CreditCheckFailedFault" faultName="pur:CreditCheckFailed" faultVariable="CreditCheckFailedFaultVar">
<sequence>
- <reply faultName="sto:BuyFailed" name="Send_BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyFailedVar"/>
+ <reply faultName="sto:BuyFailed" name="Send_BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="BuyFailedFaultVar"/>
</sequence>
</catch>
</faultHandlers>
<sequence>
- <invoke inputVariable="creditCheckRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface"/>
- <reply name="Send_BuyConfirmed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyConfirmedVar"/>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface"/>
+ <reply name="Send_BuyConfirmed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyResponseVar"/>
</sequence>
</scope>
</sequence>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Buyer.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,22 +1,22 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
<partnerLinks>
- <partnerLink name="BuyerToSeller" partnerLinkType="tns:BuyerToSellerLT" partnerRole="SellerRequester"/>
+ <partnerLink name="BuyerToSeller" partnerLinkType="byr:BuyerToSellerLT" partnerRole="SellerRequester"/>
</partnerLinks>
<variables>
- <variable messageType="tns:checkCreditRequest" name="creditCheckRequestVar"/>
- <variable messageType="tns:checkCreditResponse" name="creditCheckOkVar"/>
+ <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
</variables>
<sequence>
<scope>
<faultHandlers>
- <catch faultMessageType="tns:insufficientCreditFault" faultName="tns:insufficientCredit" faultVariable="creditCheckInvalidVar">
+ <catch faultMessageType="slr:insufficientCreditFault" faultName="slr:insufficientCredit" faultVariable="insufficientCreditFaultVar">
<sequence/>
</catch>
</faultHandlers>
<sequence>
- <invoke inputVariable="creditCheckRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="BuyerToSeller" portType="tns:SellerBehavior"/>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BuyerToSeller" portType="slr:SellerBehavior"/>
</sequence>
</scope>
</sequence>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Seller.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Seller.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault(a)Seller.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,23 +1,23 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess@Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_SellerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess@Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_SellerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
<partnerLinks>
- <partnerLink myRole="SellerService" name="BuyerToSeller" partnerLinkType="tns:BuyerToSellerServiceLT"/>
+ <partnerLink myRole="SellerBehavior" name="BuyerToSeller" partnerLinkType="slr:BuyerToSellerServiceLT"/>
</partnerLinks>
<variables>
- <variable messageType="tns:checkCreditRequest" name="creditCheckRequestVar"/>
- <variable messageType="tns:checkCreditResponse" name="creditCheckOkVar"/>
- <variable messageType="tns:insufficientCreditFault" name="creditCheckInvalidVar"/>
+ <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="slr:insufficientCreditFault" name="insufficientCreditFaultVar"/>
</variables>
<sequence>
- <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckRequestVar"/>
+ <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditRequestVar"/>
<if>
<sequence>
- <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckOkVar"/>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditResponseVar"/>
</sequence>
<else>
<sequence>
- <reply faultName="tns:insufficientCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckInvalidVar"/>
+ <reply faultName="slr:insufficientCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="insufficientCreditFaultVar"/>
</sequence>
</else>
</if>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,124 +1,128 @@
-<?xml version="1.0" encoding="Cp1252"?>
-<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ESBBroker" name="ESBBroker" author="gary" version="0.2" targetNamespace="http://www.pi4soa.org/ESBBroker">
- <typeDefinitions>
- <nameSpaces description="Target Namespace for ESBBroker" prefix="tns" uRI="http://www.pi4soa.org/ESBBroker"/>
- <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
- <informationTypes description="This is the information type BookingReference" name="BookingReference" elementName="bookingReference"/>
- <informationTypes description="This is the information type Buy" name="Buy" elementName="buy"/>
- <informationTypes description="This is the information type Cancel" name="Cancel" elementName="cancel"/>
- <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
- <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
- <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
- <informationTypes description="This is the information type Enquiry" name="Enquiry" typeName="" elementName="enquiry"/>
- <informationTypes description="This is the information type OrderConfirmed" name="OrderConfirmed" elementName="orderConfirmed"/>
- <informationTypes description="This is the information type OrderRejected" name="OrderRejected" elementName="orderRejected"/>
- <informationTypes description="This is the information type Quote" name="Quote" elementName="quote"/>
- <informationTypes description="This is the information type QuoteList" name="QuoteList" elementName="quoteList"/>
- <informationTypes description="This is the information type RequestForQuote" name="RequestForQuote" elementName="requestForQuote"/>
- <informationTypes description="This is the information type URIType" name="URIType"/>
- <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/(a)informationTypes.12"/>
- <roleTypes description="This is the role type Broker" name="Broker">
- <behaviors description="This is the behavior BrokerBehavior" name="BrokerBehavior"/>
- </roleTypes>
- <roleTypes description="This is the role type Buyer" name="Buyer">
- <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
- </roleTypes>
- <roleTypes description="This is the role type CreditAgency" name="CreditAgency">
- <behaviors description="This is the behavior CreditAgencyBehavior" name="CreditAgencyBehavior"/>
- </roleTypes>
- <roleTypes description="This is the role type Supplier" name="Supplier">
- <behaviors description="This is the behavior SupplierBehavior" name="SupplierBehavior"/>
- </roleTypes>
- <relationshipTypes description="Relationship between Broker and CreditAgency" name="BrokerToCreditAgencyRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.2"/>
- <relationshipTypes description="Relationship between Broker and Supplier" name="BrokerToSupplierRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.3"/>
- <relationshipTypes description="Relationship between Buyer and Broker" name="BuyerToBrokerRel" firstRoleType="//@typeDefinitions/(a)roleTypes.1" secondRoleType="//@typeDefinitions/(a)roleTypes.0"/>
- <participantTypes description="This is the participant type Broker" name="Broker" roleTypes="//@typeDefinitions/(a)roleTypes.0">
- <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Broker" name="conversationType"/>
- </participantTypes>
- <participantTypes description="This is the participant type Buyer" name="Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.1">
- <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Buyer" name="conversationType"/>
- </participantTypes>
- <participantTypes description="This is the participant type CreditAgency" name="CreditAgency" roleTypes="//@typeDefinitions/(a)roleTypes.2">
- <semanticAnnotations annotation="overlord.cdl.samples.Common@CreditAgency" name="conversationType"/>
- </participantTypes>
- <participantTypes description="This is the participant type Supplier" name="Supplier" roleTypes="//@typeDefinitions/(a)roleTypes.3">
- <semanticAnnotations annotation="" name="conversationType"/>
- </participantTypes>
- <channelTypes description="This is the channel type BrokerChannelType" name="BrokerChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.0"/>
- <channelTypes description="This is the channel type CreditAgencyChannelType" name="CreditAgencyChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.2"/>
- <channelTypes description="This is the channel type SupplierChannelType" name="SupplierChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.3"/>
- </typeDefinitions>
- <choreographies description="Choreography flow for the ESBBroker process" name="ESBBrokerProcess" root="true">
- <enclosedChoreographies name="CompleteTransaction">
- <participantDefinitions name="SupplierTxnProcessor" roleTypes="//@typeDefinitions/(a)roleTypes.3">
- <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="conversationType"/>
- </participantDefinitions>
- <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" free="true" roleTypes="//@typeDefinitions/(a)roleTypes.0 //@typeDefinitions/(a)roleTypes.1"/>
- <variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/(a)channelTypes.1"/>
- <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/(a)channelTypes.2"/>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Buy" name="BuyRequestExchange" type="//@typeDefinitions/(a)informationTypes.1"/>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCredit" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CheckCredit" name="CheckCreditRequestExchange" type="//@typeDefinitions/(a)informationTypes.3"/>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Choice" description="Evaluate Credit Check Result">
- <activities xsi:type="org.pi4soa.cdl:Sequence" description="Sufficient Credit">
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditResponse" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditResponse" name="CheckCreditResponseRespondExchange" type="//@typeDefinitions/(a)informationTypes.5" action="Respond"/>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="ConfirmBooking" operation="confirm" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.2" relationship="//@typeDefinitions/(a)relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.0/(a)participantDefinitions.0">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/(a)informationTypes.7"/>
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/(a)informationTypes.0" action="Respond"/>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/(a)informationTypes.0" action="Respond" faultName=""/>
- </activities>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Sequence" description="Insufficient Credit">
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditFailed" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditFailed" name="CheckCreditFailedRespondExchange" type="//@typeDefinitions/(a)informationTypes.4" action="Respond" faultName="invalidCredit"/>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/(a)informationTypes.8" action="Respond" faultName="rejected"/>
- </activities>
- </activities>
- </activities>
- </enclosedChoreographies>
- <enclosedChoreographies name="RequestForQuote">
- <participantDefinitions name="SupplierQuoteEngine" roleTypes="//@typeDefinitions/(a)roleTypes.3">
- <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="conversationType"/>
- </participantDefinitions>
- <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/(a)channelTypes.2"/>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="RFQ" operation="getQuote" channelVariable="//@choreographies.0/@enclosedChoreographies.1/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.1/(a)participantDefinitions.0">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction RFQ" name="RFQRequestExchange" type="//@typeDefinitions/(a)informationTypes.11"/>
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction RFQ" name="RFQRespondExchange" type="//@typeDefinitions/(a)informationTypes.9" action="Respond"/>
- </activities>
- </enclosedChoreographies>
- <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" roleTypes="//@typeDefinitions/(a)roleTypes.0 //@typeDefinitions/(a)roleTypes.1"/>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Enquiry" name="EnquiryRequestExchange" type="//@typeDefinitions/(a)informationTypes.6"/>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:While" name="SendRFQToSuppliers">
- <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/(a)enclosedChoreographies.1"/>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:When" name="WhenQuotesReceivedOrTimeout">
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Enquiry" name="EnquiryRespondExchange" type="//@typeDefinitions/(a)informationTypes.10" action="Respond"/>
- </activities>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Choice">
- <activities xsi:type="org.pi4soa.cdl:Sequence">
- <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/(a)enclosedChoreographies.0" waitForCompletion="false">
- <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/(a)variableDefinitions.0" thisRole="//@typeDefinitions/(a)roleTypes.1" freeVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" freeRole="//@typeDefinitions/(a)roleTypes.1"/>
- <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/(a)variableDefinitions.0" thisRole="//@typeDefinitions/(a)roleTypes.0" freeVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" freeRole="//@typeDefinitions/(a)roleTypes.0"/>
- </activities>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Sequence">
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="Cancel" operation="cancel" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Cancel" name="CancelRequestExchange" type="//@typeDefinitions/(a)informationTypes.2"/>
- </activities>
- </activities>
- </activities>
- </choreographies>
-</org.pi4soa.cdl:Package>
+<?xml version="1.0" encoding="UTF-8"?>
+<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ESBBroker" name="ESBBroker" author="gary" version="0.2" targetNamespace="http://www.pi4soa.org/ESBBroker">
+ <typeDefinitions>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="tns" uRI="http://www.pi4soa.org/ESBBroker"/>
+ <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="brk" uRI="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="byr" uRI="http://www.pi4soa.org/ESBBroker/Buyer"/>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="cay" uRI="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <nameSpaces description="Target Namespace for ESBBroker" prefix="spr" uRI="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <informationTypes description="This is the information type BookingReference" name="BookingReference" elementName="bookingReference"/>
+ <informationTypes description="This is the information type Buy" name="Buy" elementName="buy"/>
+ <informationTypes description="This is the information type Cancel" name="Cancel" elementName="cancel"/>
+ <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
+ <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
+ <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
+ <informationTypes description="This is the information type Enquiry" name="Enquiry" typeName="" elementName="enquiry"/>
+ <informationTypes description="This is the information type OrderConfirmed" name="OrderConfirmed" elementName="orderConfirmed"/>
+ <informationTypes description="This is the information type OrderRejected" name="OrderRejected" elementName="orderRejected"/>
+ <informationTypes description="This is the information type Quote" name="Quote" elementName="quote"/>
+ <informationTypes description="This is the information type QuoteList" name="QuoteList" elementName="quoteList"/>
+ <informationTypes description="This is the information type RequestForQuote" name="RequestForQuote" elementName="requestForQuote"/>
+ <informationTypes description="This is the information type URIType" name="URIType"/>
+ <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/(a)informationTypes.12"/>
+ <roleTypes description="This is the role type Broker" name="Broker">
+ <behaviors description="This is the behavior BrokerBehavior" name="BrokerBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type Buyer" name="Buyer">
+ <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type CreditAgency" name="CreditAgency">
+ <behaviors description="This is the behavior CreditAgencyBehavior" name="CreditAgencyBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type Supplier" name="Supplier">
+ <behaviors description="This is the behavior SupplierBehavior" name="SupplierBehavior"/>
+ </roleTypes>
+ <relationshipTypes description="Relationship between Broker and CreditAgency" name="BrokerToCreditAgencyRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.2"/>
+ <relationshipTypes description="Relationship between Broker and Supplier" name="BrokerToSupplierRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.3"/>
+ <relationshipTypes description="Relationship between Buyer and Broker" name="BuyerToBrokerRel" firstRoleType="//@typeDefinitions/(a)roleTypes.1" secondRoleType="//@typeDefinitions/(a)roleTypes.0"/>
+ <participantTypes description="This is the participant type brk:Broker" name="brk:Broker" roleTypes="//@typeDefinitions/(a)roleTypes.0">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Broker" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type byr:Buyer" name="byr:Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.1">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Buyer" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type cay:CreditAgency" name="cay:CreditAgency" roleTypes="//@typeDefinitions/(a)roleTypes.2">
+ <semanticAnnotations annotation="overlord.cdl.samples.Common@CreditAgency" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type spr:Supplier" name="spr:Supplier" roleTypes="//@typeDefinitions/(a)roleTypes.3">
+ <semanticAnnotations annotation="" name="conversationType"/>
+ </participantTypes>
+ <channelTypes description="This is the channel type BrokerChannelType" name="BrokerChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.0"/>
+ <channelTypes description="This is the channel type CreditAgencyChannelType" name="CreditAgencyChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.2"/>
+ <channelTypes description="This is the channel type SupplierChannelType" name="SupplierChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.3"/>
+ </typeDefinitions>
+ <choreographies description="Choreography flow for the ESBBroker process" name="ESBBrokerProcess" root="true">
+ <enclosedChoreographies name="CompleteTransaction">
+ <participantDefinitions name="SupplierTxnProcessor" roleTypes="//@typeDefinitions/(a)roleTypes.3">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="conversationType"/>
+ </participantDefinitions>
+ <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" free="true" roleTypes="//@typeDefinitions/(a)roleTypes.0 //@typeDefinitions/(a)roleTypes.1"/>
+ <variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/(a)channelTypes.1"/>
+ <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/(a)channelTypes.2"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Buy" name="BuyRequestExchange" type="//@typeDefinitions/(a)informationTypes.1"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCredit" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CheckCredit" name="CheckCreditRequestExchange" type="//@typeDefinitions/(a)informationTypes.3"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Choice" description="Evaluate Credit Check Result">
+ <activities xsi:type="org.pi4soa.cdl:Sequence" description="Sufficient Credit">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditResponse" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditResponse" name="CheckCreditResponseRespondExchange" type="//@typeDefinitions/(a)informationTypes.5" action="Respond"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="ConfirmBooking" operation="confirm" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.2" relationship="//@typeDefinitions/(a)relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.0/(a)participantDefinitions.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/(a)informationTypes.7"/>
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/(a)informationTypes.0" action="Respond"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/(a)informationTypes.0" action="Respond" faultName=""/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Sequence" description="Insufficient Credit">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditFailed" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditFailed" name="CheckCreditFailedRespondExchange" type="//@typeDefinitions/(a)informationTypes.4" action="Respond" faultName="invalidCredit"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/(a)informationTypes.8" action="Respond" faultName="rejected"/>
+ </activities>
+ </activities>
+ </activities>
+ </enclosedChoreographies>
+ <enclosedChoreographies name="RequestForQuote">
+ <participantDefinitions name="SupplierQuoteEngine" roleTypes="//@typeDefinitions/(a)roleTypes.3">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="conversationType"/>
+ </participantDefinitions>
+ <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/(a)channelTypes.2"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="RFQ" operation="getQuote" channelVariable="//@choreographies.0/@enclosedChoreographies.1/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.1/(a)participantDefinitions.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction RFQ" name="RFQRequestExchange" type="//@typeDefinitions/(a)informationTypes.11"/>
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction RFQ" name="RFQRespondExchange" type="//@typeDefinitions/(a)informationTypes.9" action="Respond"/>
+ </activities>
+ </enclosedChoreographies>
+ <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" roleTypes="//@typeDefinitions/(a)roleTypes.0 //@typeDefinitions/(a)roleTypes.1"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Enquiry" name="EnquiryRequestExchange" type="//@typeDefinitions/(a)informationTypes.6"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:While" name="SendRFQToSuppliers">
+ <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/(a)enclosedChoreographies.1"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:When" name="WhenQuotesReceivedOrTimeout">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Enquiry" name="EnquiryRespondExchange" type="//@typeDefinitions/(a)informationTypes.10" action="Respond"/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Choice">
+ <activities xsi:type="org.pi4soa.cdl:Sequence">
+ <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/(a)enclosedChoreographies.0" waitForCompletion="false">
+ <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/(a)variableDefinitions.0" thisRole="//@typeDefinitions/(a)roleTypes.1" freeVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" freeRole="//@typeDefinitions/(a)roleTypes.1"/>
+ <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/(a)variableDefinitions.0" thisRole="//@typeDefinitions/(a)roleTypes.0" freeVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" freeRole="//@typeDefinitions/(a)roleTypes.0"/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Sequence">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="Cancel" operation="cancel" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.2">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Cancel" name="CancelRequestExchange" type="//@typeDefinitions/(a)informationTypes.2"/>
+ </activities>
+ </activities>
+ </activities>
+ </choreographies>
+</org.pi4soa.cdl:Package>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,44 +1,46 @@
-<?xml version="1.0" encoding="Cp1252"?>
-<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ReqRespFault" name="ReqRespFault" author="gary" version="0.3" targetNamespace="http://www.pi4soa.org/ReqRespFault">
- <typeDefinitions>
- <nameSpaces description="Target Namespace for ReqRespFault" prefix="tns" uRI="http://www.pi4soa.org/ReqRespFault"/>
- <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
- <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
- <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
- <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
- <informationTypes description="This is the information type URIType" name="URIType"/>
- <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/(a)informationTypes.3"/>
- <roleTypes description="This is the role type Buyer" name="Buyer">
- <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
- </roleTypes>
- <roleTypes description="This is the role type Seller" name="Seller">
- <behaviors description="This is the behavior SellerBehavior" name="SellerBehavior"/>
- </roleTypes>
- <relationshipTypes description="Relationship between Buyer and Seller" name="BuyerToSellerRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.1"/>
- <participantTypes description="This is the participant type Buyer" name="Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.0">
- <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Buyer" name="conversationType"/>
- </participantTypes>
- <participantTypes description="This is the participant type Seller" name="Seller" roleTypes="//@typeDefinitions/(a)roleTypes.1">
- <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Broker" name="conversationType"/>
- </participantTypes>
- <channelTypes description="This is the channel type SellerChannelType" name="SellerChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.1"/>
- </typeDefinitions>
- <choreographies description="Choreography flow for the ReqRespFault process" name="ReqRespFaultProcess" root="true">
- <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" roleTypes="//@typeDefinitions/(a)roleTypes.1 //@typeDefinitions/(a)roleTypes.0"/>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/(a)informationTypes.0"/>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Choice">
- <activities xsi:type="org.pi4soa.cdl:Sequence">
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckValid" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckValid" name="CreditCheckValidRespondExchange" type="//@typeDefinitions/(a)informationTypes.2" action="Respond"/>
- </activities>
- </activities>
- <activities xsi:type="org.pi4soa.cdl:Sequence">
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckInvalid" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckInvalid" name="CreditCheckInvalidRespondExchange" type="//@typeDefinitions/(a)informationTypes.1" action="Respond" faultName="insufficientCredit"/>
- </activities>
- </activities>
- </activities>
- </choreographies>
-</org.pi4soa.cdl:Package>
+<?xml version="1.0" encoding="UTF-8"?>
+<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ReqRespFault" name="ReqRespFault" author="gary" version="0.3" targetNamespace="http://www.pi4soa.org/ReqRespFault">
+ <typeDefinitions>
+ <nameSpaces description="Target Namespace for ReqRespFault" prefix="tns" uRI="http://www.pi4soa.org/ReqRespFault"/>
+ <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
+ <nameSpaces description="Target Namespace for ReqRespFault" prefix="byr" uRI="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+ <nameSpaces description="Target Namespace for ReqRespFault" prefix="slr" uRI="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
+ <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
+ <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
+ <informationTypes description="This is the information type URIType" name="URIType"/>
+ <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/(a)informationTypes.3"/>
+ <roleTypes description="This is the role type Buyer" name="Buyer">
+ <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
+ </roleTypes>
+ <roleTypes description="This is the role type Seller" name="Seller">
+ <behaviors description="This is the behavior SellerBehavior" name="SellerBehavior"/>
+ </roleTypes>
+ <relationshipTypes description="Relationship between Buyer and Seller" name="BuyerToSellerRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.1"/>
+ <participantTypes description="This is the participant type byr:Buyer" name="byr:Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.0">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Buyer" name="conversationType"/>
+ </participantTypes>
+ <participantTypes description="This is the participant type slr:Seller" name="slr:Seller" roleTypes="//@typeDefinitions/(a)roleTypes.1">
+ <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker@Broker" name="conversationType"/>
+ </participantTypes>
+ <channelTypes description="This is the channel type SellerChannelType" name="SellerChannelType" referenceToken="//@typeDefinitions/(a)tokens.0" roleType="//@typeDefinitions/(a)roleTypes.1"/>
+ </typeDefinitions>
+ <choreographies description="Choreography flow for the ReqRespFault process" name="ReqRespFaultProcess" root="true">
+ <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0" roleTypes="//@typeDefinitions/(a)roleTypes.1 //@typeDefinitions/(a)roleTypes.0"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/(a)informationTypes.0"/>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Choice">
+ <activities xsi:type="org.pi4soa.cdl:Sequence">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckValid" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckValid" name="CreditCheckValidRespondExchange" type="//@typeDefinitions/(a)informationTypes.2" action="Respond"/>
+ </activities>
+ </activities>
+ <activities xsi:type="org.pi4soa.cdl:Sequence">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckInvalid" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckInvalid" name="CreditCheckInvalidRespondExchange" type="//@typeDefinitions/(a)informationTypes.1" action="Respond" faultName="insufficientCredit"/>
+ </activities>
+ </activities>
+ </activities>
+ </choreographies>
+</org.pi4soa.cdl:Package>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -17,6 +17,8 @@
*/
package org.jboss.savara.tools.bpel.parser;
+import java.io.InputStream;
+
import junit.framework.TestCase;
import junit.framework.TestResult;
import junit.framework.TestSuite;
@@ -27,23 +29,30 @@
import org.scribble.conversation.model.ConversationNotation;
import org.scribble.extensions.RegistryFactory;
import org.scribble.model.ModelReference;
+import org.scribble.model.admin.Context;
public class ParserTest extends TestCase {
public static TestSuite suite() {
TestSuite suite = new TestSuite("BPEL->Conversation Parser Tests");
- suite.addTest(new BPELToConversationTest("ESBBroker@Broker"));
- suite.addTest(new BPELToConversationTest("ESBBroker@Buyer"));
- suite.addTest(new BPELToConversationTest("ESBBroker@CreditAgency"));
- suite.addTest(new BPELToConversationTest("ESBBroker@SupplierQuoteEngine"));
- suite.addTest(new BPELToConversationTest("ESBBroker@SupplierTxnProcessor"));
- suite.addTest(new BPELToConversationTest("PurchaseGoods@Buyer"));
- suite.addTest(new BPELToConversationTest("PurchaseGoods@CreditAgency"));
- suite.addTest(new BPELToConversationTest("PurchaseGoods@Store"));
- suite.addTest(new BPELToConversationTest("ReqRespFault@Buyer"));
- suite.addTest(new BPELToConversationTest("ReqRespFault@Seller"));
- suite.addTest(new BPELToConversationTest("LoanApprovalService@Service"));
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_Broker", "ESBBroker@Broker"));
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_Buyer", "ESBBroker@Buyer"));
+ suite.addTest(new BPELToConversationTest("ESBBrokerProcess_CreditAgency", "ESBBroker@CreditAgency"));
+ suite.addTest(new BPELToConversationTest("RequestForQuote_SupplierQuoteEngine", "ESBBroker@SupplierQuoteEngine"));
+ suite.addTest(new BPELToConversationTest("CompleteTransaction_SupplierTxnProcessor", "ESBBroker@SupplierTxnProcessor"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_Buyer", "PurchaseGoods@Buyer"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_CreditAgency", "PurchaseGoods@CreditAgency"));
+ suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_Store", "PurchaseGoods@Store"));
+ suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Buyer", "ReqRespFault@Buyer"));
+ suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Seller", "ReqRespFault@Seller"));
+
+ /**
+ * TODO: (SAVARA-150) Commenting out this test for now, as we now need the accompanying WSDL to be able to
+ * resolve the message type's underlying XSD element or type.
+ *
+ suite.addTest(new BPELToConversationTest("LoanApprovalService@Service", "LoanApprovalService@Service"));
+ */
return suite;
}
@@ -59,9 +68,10 @@
*
* @param name The test name
*/
- public BPELToConversationTest(String name) {
- super(name);
- m_name = name;
+ public BPELToConversationTest(String bpelName, String scvName) {
+ super(bpelName+"->"+scvName);
+ m_bpelName = bpelName;
+ m_scvName = scvName;
}
/**
@@ -72,7 +82,7 @@
public void run(TestResult result) {
result.startTest(this);
- String filename="testmodels/"+m_name+".bpel";
+ String filename="testmodels/"+m_bpelName+".bpel";
java.io.InputStream is=
ParserTest.class.getResourceAsStream(filename);
@@ -87,7 +97,7 @@
org.scribble.model.admin.DefaultModelListener l=
new org.scribble.model.admin.DefaultModelListener();
- org.scribble.model.Model model=p.parse(ref, is, l, null);
+ org.scribble.model.Model model=p.parse(ref, is, l, new ResourceLoaderContext());
if (model == null) {
result.addError(this, new Throwable("Model is null"));
@@ -152,7 +162,7 @@
protected void checkResults(TestResult result, String conv) {
boolean f_valid=false;
- String filename="results/"+m_name+".scv";
+ String filename="results/"+m_scvName+".scv";
java.io.InputStream is=
ParserTest.class.getResourceAsStream(filename);
@@ -184,7 +194,7 @@
}
if (f_valid == false) {
- String bpelfile="testmodels/"+m_name+".bpel";
+ String bpelfile="testmodels/"+m_bpelName+".bpel";
java.net.URL url=ParserTest.class.getResource(bpelfile);
@@ -216,7 +226,7 @@
resultsDir.mkdirs();
}
- java.io.File resultFile=new java.io.File(resultsDir, m_name+".expected");
+ java.io.File resultFile=new java.io.File(resultsDir, m_scvName+".expected");
if (resultFile.exists() == false) {
try {
@@ -236,12 +246,43 @@
}
} else {
result.addError(this, new Throwable("Unable to obtain URL for BPEL model source '"+
- m_name+"': "+url));
+ m_bpelName+"': "+url));
}
}
}
}
- private String m_name=null;
+ private String m_bpelName=null;
+ private String m_scvName=null;
}
+
+ public static class ResourceLoaderContext implements Context {
+
+ public ResourceLoaderContext() {
+ }
+
+ public InputStream getResource(ModelReference ref, String uri) {
+ String filename="testmodels/"+uri;
+
+ java.io.InputStream is=
+ ParserTest.class.getResourceAsStream(filename);
+
+ return(is);
+ }
+
+ public java.net.URI getResourceURI(ModelReference ref, String uri) {
+ String filename="testmodels/"+uri;
+
+ java.net.URI ret=null;
+
+ try {
+ ret = ParserTest.class.getResource(filename).toURI();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ return(ret);
+ }
+
+ }
}
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,20 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <partnerLinks>
+ <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="spr:BrokerToSupplierTxnProcessorServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+ <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+ </variables>
+ <sequence>
+ <pick createInstance="yes">
+ <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmRequestVar">
+ <sequence>
+ <reply name="Send_bookingReference" operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmResponseVar"/>
+ </sequence>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="confirmRequest">
+ <wsdl:part element="orderConfirmed" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="confirmResponse">
+ <wsdl:part element="bookingReference" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteResponse">
+ <wsdl:part element="quote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteRequest">
+ <wsdl:part element="requestForQuote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SupplierBehavior">
+ <wsdl:operation name="confirm">
+ <wsdl:input message="spr:confirmRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:confirmResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <wsdl:input message="spr:getQuoteRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:getQuoteResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="confirm">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SupplierService">
+ <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+ <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <wsdl:import location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BrokerToSupplierTxnProcessorServiceLT">
+ <plnk:role name="SupplierTxnProcessorService" portType="ns1:SupplierBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)Broker.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)Broker.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)Broker.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,65 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="BrokerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <partnerLinks>
- <partnerLink myRole="BrokerService" name="BuyerToBroker" partnerLinkType="tns:BuyerToBrokerServiceLT"/>
- <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="tns:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
- <partnerLink name="BrokerToCreditAgency" partnerLinkType="tns:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
- <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="tns:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
- </partnerLinks>
- <variables>
- <variable messageType="enquiry" name="enquiryVar"/>
- <variable messageType="requestForQuote" name="requestForQuoteVar"/>
- <variable messageType="quote" name="quoteVar"/>
- <variable messageType="quoteList" name="quoteListVar"/>
- <variable messageType="buy" name="buyVar"/>
- <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
- <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
- <variable messageType="orderConfirmed" name="orderConfirmedVar"/>
- <variable messageType="bookingReference" name="bookingReferenceVar"/>
- <variable messageType="orderRejected" name="orderRejectedVar"/>
- <variable messageType="cancel" name="cancelVar"/>
- </variables>
- <sequence>
- <receive createInstance="yes" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="enquiryVar"/>
- <while>
- <sequence>
- <scope>
- <sequence>
- <invoke inputVariable="requestForQuoteVar" operation="getQuote" outputVariable="quoteVar" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior"/>
- </sequence>
- </scope>
- </sequence>
- </while>
- <reply operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="quoteListVar"/>
- <pick>
- <onMessage operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="buyVar">
- <sequence>
- <scope>
- <sequence>
- <scope>
- <faultHandlers>
- <catch faultMessageType="CreditCheckInvalid" faultName="invalidCredit" faultVariable="creditCheckInvalidVar">
- <sequence>
- <reply faultName="tns:rejected" operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="orderRejectedVar"/>
- </sequence>
- </catch>
- </faultHandlers>
- <sequence>
- <invoke inputVariable="creditCheckRequestVar" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior"/>
- <invoke inputVariable="orderConfirmedVar" operation="confirm" outputVariable="bookingReferenceVar" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior"/>
- <reply operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="bookingReferenceVar"/>
- </sequence>
- </scope>
- </sequence>
- </scope>
- </sequence>
- </onMessage>
- <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="cancelVar">
- <sequence/>
- </onMessage>
- </pick>
- </sequence>
-</process>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)Buyer.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,43 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="BuyerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <partnerLinks>
- <partnerLink myRole="BuyerRequester" name="BuyerToBroker" partnerLinkType="tns:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
- </partnerLinks>
- <variables>
- <variable messageType="enquiry" name="enquiryVar"/>
- <variable messageType="quoteList" name="quoteListVar"/>
- <variable messageType="buy" name="buyVar"/>
- <variable messageType="bookingReference" name="bookingReferenceVar"/>
- <variable messageType="cancel" name="cancelVar"/>
- </variables>
- <sequence>
- <invoke inputVariable="enquiryVar" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
- <receive operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="quoteListVar"/>
- <if>
- <sequence>
- <scope>
- <sequence>
- <scope>
- <faultHandlers>
- <catch faultMessageType="orderRejected" faultName="rejected" faultVariable="orderRejectedVar">
- <sequence/>
- </catch>
- </faultHandlers>
- <sequence>
- <invoke inputVariable="buyVar" operation="buy" outputVariable="bookingReferenceVar" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
- </sequence>
- </scope>
- </sequence>
- </scope>
- </sequence>
- <else>
- <sequence>
- <invoke inputVariable="cancelVar" operation="cancel" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
- </sequence>
- </else>
- </if>
- </sequence>
-</process>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)CreditAgency.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)CreditAgency.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,36 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common@CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="CreditAgencyPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
- <partnerLinks>
- <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="tns:BrokerToCreditAgencyServiceLT"/>
- </partnerLinks>
- <variables>
- <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
- <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
- <variable messageType="CreditCheckInvalid" name="creditCheckInvalidVar"/>
- </variables>
- <sequence>
- <pick>
- <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckRequestVar">
- <sequence>
- <scope>
- <sequence>
- <if>
- <sequence>
- <reply operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckOkVar"/>
- </sequence>
- <else>
- <sequence>
- <reply faultName="tns:invalidCredit" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckInvalidVar"/>
- </sequence>
- </else>
- </if>
- </sequence>
- </scope>
- </sequence>
- </onMessage>
- </pick>
- </sequence>
-</process>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)SupplierQuoteEngine.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)SupplierQuoteEngine.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)SupplierQuoteEngine.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,15 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace=""/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="SupplierQuoteEnginePartnerLinkTypes.wsdl" namespace=""/>
- <partnerLinks>
- <partnerLink myRole="SupplierQuoteEngineService" name="BrokerToSupplierQuoteEngine" partnerLinkType="ns1:BrokerToSupplierQuoteEngineServiceLT"/>
- </partnerLinks>
- <variables>
- <variable messageType="requestForQuote" name="requestForQuoteVar"/>
- <variable messageType="quote" name="quoteVar"/>
- </variables>
- <sequence>
- <receive createInstance="yes" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior" variable="requestForQuoteVar"/>
- <reply operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior" variable="quoteVar"/>
- </sequence>
-</process>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)SupplierTxnProcessor.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)SupplierTxnProcessor.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker(a)SupplierTxnProcessor.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,20 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace=""/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="SupplierTxnProcessorPartnerLinkTypes.wsdl" namespace=""/>
- <partnerLinks>
- <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="ns2:BrokerToSupplierTxnProcessorServiceLT"/>
- </partnerLinks>
- <variables>
- <variable messageType="orderConfirmed" name="orderConfirmedVar"/>
- <variable messageType="bookingReference" name="bookingReferenceVar"/>
- </variables>
- <sequence>
- <pick createInstance="yes">
- <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior" variable="orderConfirmedVar">
- <sequence>
- <reply operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior" variable="bookingReferenceVar"/>
- </sequence>
- </onMessage>
- </pick>
- </sequence>
-</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,66 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BrokerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <partnerLinks>
+ <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="brk:BuyerToBrokerServiceLT"/>
+ <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="brk:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
+ <partnerLink name="BrokerToCreditAgency" partnerLinkType="brk:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+ <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="brk:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+ <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+ <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+ <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+ <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+ <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+ <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+ <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+ <variable messageType="brk:rejectedFault" name="rejectedFaultVar"/>
+ <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryRequestVar"/>
+ <while>
+ <sequence>
+ <scope>
+ <sequence>
+ <invoke inputVariable="getQuoteRequestVar" name="Send_requestForQuote" operation="getQuote" outputVariable="getQuoteResponseVar" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </while>
+ <reply name="Send_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
+ <pick>
+ <onMessage operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyRequestVar">
+ <sequence>
+ <scope>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="cay:invalidCreditFault" faultName="cay:invalidCredit" faultVariable="invalidCreditFaultVar">
+ <sequence>
+ <reply faultName="brk:rejected" name="Send_orderRejected" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="rejectedFaultVar"/>
+ </sequence>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior"/>
+ <invoke inputVariable="confirmRequestVar" name="Send_orderConfirmed" operation="confirm" outputVariable="confirmResponseVar" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior"/>
+ <reply name="Send_bookingReference" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyResponseVar"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </scope>
+ </sequence>
+ </onMessage>
+ <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="cancelRequestVar">
+ <sequence/>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="rejectedFault">
+ <wsdl:part element="orderRejected" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="makeEnquiryRequest">
+ <wsdl:part element="enquiry" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="buyResponse">
+ <wsdl:part element="bookingReference" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="makeEnquiryResponse">
+ <wsdl:part element="quoteList" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="buyRequest">
+ <wsdl:part element="buy" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="cancelRequest">
+ <wsdl:part element="cancel" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="BrokerBehavior">
+ <wsdl:operation name="buy">
+ <wsdl:input message="brk:buyRequest">
+ </wsdl:input>
+ <wsdl:output message="brk:buyResponse">
+ </wsdl:output>
+ <wsdl:fault message="brk:rejectedFault" name="rejected">
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="makeEnquiry">
+ <wsdl:input message="brk:makeEnquiryRequest">
+ </wsdl:input>
+ <wsdl:output message="brk:makeEnquiryResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="cancel">
+ <wsdl:input message="brk:cancelRequest">
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="BrokerBehaviorBinding" type="brk:BrokerBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="buy">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/buy"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="rejected">
+ <soap:fault name="rejected" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="makeEnquiry">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/makeEnquiry"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="cancel">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/cancel"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="BrokerService">
+ <wsdl:port binding="brk:BrokerBehaviorBinding" name="BrokerBehaviorPort">
+ <soap:address location="http://localhost:8080/BrokerService/BrokerBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Broker" xmlns:ns2="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:ns3="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker">
+ <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BuyerToBrokerServiceLT">
+ <plnk:role name="BrokerBehavior" portType="ns1:BrokerBehavior"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BrokerToSupplierQuoteEngineLT">
+ <plnk:role name="SupplierQuoteEngineRequester" portType="ns2:SupplierBehavior"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BrokerToCreditAgencyLT">
+ <plnk:role name="CreditAgencyRequester" portType="ns3:CreditAgencyBehavior"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BrokerToSupplierTxnProcessorLT">
+ <plnk:role name="SupplierTxnProcessorRequester" portType="ns2:SupplierBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,43 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
+ <partnerLinks>
+ <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="byr:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+ <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+ <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+ <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+ <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
+ </variables>
+ <sequence>
+ <invoke inputVariable="makeEnquiryRequestVar" name="Send_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ <receive name="Receive_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
+ <if>
+ <sequence>
+ <scope>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="brk:rejectedFault" faultName="brk:rejected" faultVariable="rejectedFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="buyRequestVar" name="Send_buy" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+ </scope>
+ </sequence>
+ <else>
+ <sequence>
+ <invoke inputVariable="cancelRequestVar" name="Send_cancel" operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Broker" xmlns:ns2="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer">
+ <wsdl:import location="ESBBrokerProcess_Buyer.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
+ <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BuyerToBrokerLT">
+ <plnk:role name="BrokerRequester" portType="ns1:BrokerBehavior"/>
+ <plnk:role name="BrokerBehavior" portType="ns2:BuyerBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,36 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common@CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgencyArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <partnerLinks>
+ <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="cay:BrokerToCreditAgencyServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="cay:invalidCreditFault" name="invalidCreditFaultVar"/>
+ </variables>
+ <sequence>
+ <pick>
+ <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditRequestVar">
+ <sequence>
+ <scope>
+ <sequence>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="cay:invalidCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="invalidCreditFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+ </scope>
+ </sequence>
+ </onMessage>
+ </pick>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="checkCreditResponse">
+ <wsdl:part element="CreditCheckOk" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="checkCreditRequest">
+ <wsdl:part element="CreditCheckRequest" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="invalidCreditFault">
+ <wsdl:part element="CreditCheckInvalid" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="CreditAgencyBehavior">
+ <wsdl:operation name="checkCredit">
+ <wsdl:input message="cay:checkCreditRequest">
+ </wsdl:input>
+ <wsdl:output message="cay:checkCreditResponse">
+ </wsdl:output>
+ <wsdl:fault message="cay:invalidCreditFault" name="invalidCredit">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CreditAgencyBehaviorBinding" type="cay:CreditAgencyBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="checkCredit">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/CreditAgency/checkCredit"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="invalidCredit">
+ <soap:fault name="invalidCredit" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CreditAgencyService">
+ <wsdl:port binding="cay:CreditAgencyBehaviorBinding" name="CreditAgencyBehaviorPort">
+ <soap:address location="http://localhost:8080/CreditAgencyService/CreditAgencyBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency">
+ <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+ <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+ <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BrokerToCreditAgencyServiceLT">
+ <plnk:role name="CreditAgencyService" portType="ns1:CreditAgencyBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="confirmRequest">
+ <wsdl:part element="orderConfirmed" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="confirmResponse">
+ <wsdl:part element="bookingReference" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteResponse">
+ <wsdl:part element="quote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteRequest">
+ <wsdl:part element="requestForQuote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SupplierBehavior">
+ <wsdl:operation name="confirm">
+ <wsdl:input message="spr:confirmRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:confirmResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <wsdl:input message="spr:getQuoteRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:getQuoteResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="confirm">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SupplierService">
+ <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+ <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)Buyer.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,24 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:com.acme.purchasing" xmlns:tns="http://www.pi4soa.org/purchase" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Purchasing@Buyer" name="PurchaseGoodsProcess_Buyer" targetNamespace="http://www.pi4soa.org/purchase" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="BuyerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <partnerLinks>
- <partnerLink name="BuyerToStore" partnerLinkType="tns:BuyerToStoreLT" partnerRole="StoreRequester"/>
- </partnerLinks>
- <variables>
- <variable messageType="BuyRequest" name="buyRequestVar"/>
- <variable messageType="BuyConfirmed" name="buyConfirmedVar"/>
- </variables>
- <sequence>
- <scope>
- <faultHandlers>
- <catch faultMessageType="BuyFailed" faultName="BuyFailed" faultVariable="buyFailedVar">
- <sequence/>
- </catch>
- </faultHandlers>
- <sequence>
- <invoke inputVariable="buyRequestVar" operation="buy" outputVariable="buyConfirmedVar" partnerLink="BuyerToStore" portType="tns:StoreBehavior"/>
- </sequence>
- </scope>
- </sequence>
-</process>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)CreditAgency.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)CreditAgency.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,26 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:com.acme.purchasing" xmlns:tns="http://www.pi4soa.org/purchase" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common@CreditAgency" name="PurchaseGoodsProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/purchase" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="CreditAgencyPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <partnerLinks>
- <partnerLink myRole="CreditAgencyService" name="StoreToCreditAgency" partnerLinkType="tns:StoreToCreditAgencyServiceLT"/>
- </partnerLinks>
- <variables>
- <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
- <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
- <variable messageType="CreditCheckInvalid" name="creditCheckInvalidVar"/>
- </variables>
- <sequence>
- <receive createInstance="yes" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckRequestVar"/>
- <if>
- <sequence>
- <reply operation="checkCredit" partnerLink="StoreToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckOkVar"/>
- </sequence>
- <else>
- <sequence>
- <reply faultName="tns:CreditCheckFailed" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckInvalidVar"/>
- </sequence>
- </else>
- </if>
- </sequence>
-</process>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)Store.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)Store.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods(a)Store.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,32 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:com.acme.purchasing" xmlns:tns="http://www.pi4soa.org/purchase" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Purchasing@Store" name="PurchaseGoodsProcess_Store" targetNamespace="http://www.pi4soa.org/purchase" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="StorePartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/purchase"/>
- <partnerLinks>
- <partnerLink myRole="StoreService" name="BuyerToStore" partnerLinkType="tns:BuyerToStoreServiceLT"/>
- <partnerLink name="StoreToCreditAgency" partnerLinkType="tns:StoreToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
- </partnerLinks>
- <variables>
- <variable messageType="BuyRequest" name="buyRequestVar"/>
- <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
- <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
- <variable messageType="BuyConfirmed" name="buyConfirmedVar"/>
- <variable messageType="BuyFailed" name="buyFailedVar"/>
- </variables>
- <sequence>
- <receive createInstance="yes" operation="buy" partnerLink="BuyerToStore" portType="tns:StoreBehavior" variable="buyRequestVar"/>
- <scope>
- <faultHandlers>
- <catch faultMessageType="CreditCheckInvalid" faultName="CreditCheckFailed" faultVariable="creditCheckInvalidVar">
- <sequence>
- <reply faultName="tns:BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="tns:StoreBehavior" variable="buyFailedVar"/>
- </sequence>
- </catch>
- </faultHandlers>
- <sequence>
- <invoke inputVariable="creditCheckRequestVar" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="StoreToCreditAgency" portType="tns:CreditAgencyBehavior"/>
- <reply operation="buy" partnerLink="BuyerToStore" portType="tns:StoreBehavior" variable="buyConfirmedVar"/>
- </sequence>
- </scope>
- </sequence>
-</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,24 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Purchasing@Buyer" name="PurchaseGoodsProcess_Buyer" targetNamespace="http://www.jboss.org/savara/examples" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_BuyerArtifacts.wsdl" namespace="http://www.jboss.org/savara/examples"/>
+ <partnerLinks>
+ <partnerLink name="BuyerToStore" partnerLinkType="tns:BuyerToStoreLT" partnerRole="StoreRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="sto:buyRequest" name="buyRequestVar"/>
+ <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+ </variables>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="sto:BuyFailedFault" faultName="sto:BuyFailed" faultVariable="BuyFailedFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="buyRequestVar" name="Send_BuyRequest" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToStore" portType="sto:StoreInterface"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.jboss.org/examples/store" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.jboss.org/savara/examples">
+ <wsdl:import location="PurchaseGoodsProcess_Buyer.wsdl" namespace="http://www.jboss.org/savara/examples"/>
+ <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <plnk:partnerLinkType name="BuyerToStoreLT">
+ <plnk:role name="StoreRequester" portType="ns1:StoreInterface"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,26 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Common@CreditAgency" name="PurchaseGoodsProcess_CreditAgency" targetNamespace="java:org.jboss.savara.examples.purchasing" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <partnerLinks>
+ <partnerLink myRole="CreditAgencyInterface" name="StoreToCreditAgency" partnerLinkType="pur:StoreToCreditAgencyServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="pur:CreditCheckFailedFault" name="CreditCheckFailedFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditRequestVar"/>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="pur:CreditCheckFailed" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="CreditCheckFailedFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CreditAgency" targetNamespace="java:org.jboss.savara.examples.purchasing">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="checkCreditRequest">
+ <wsdl:part name="content" type="pur:CreditCheckRequest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="CreditCheckFailedFault">
+ <wsdl:part name="content" type="pur:CreditCheckInvalid">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="checkCreditResponse">
+ <wsdl:part name="content" type="pur:CreditCheckOk">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="CreditAgencyInterface">
+ <wsdl:operation name="checkCredit">
+ <wsdl:input message="pur:checkCreditRequest">
+ </wsdl:input>
+ <wsdl:output message="pur:checkCreditResponse">
+ </wsdl:output>
+ <wsdl:fault message="pur:CreditCheckFailedFault" name="CreditCheckFailed">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CreditAgencyInterfaceBinding" type="pur:CreditAgencyInterface">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="checkCredit">
+ <soap:operation soapAction="java:org.jboss.savara.examples.purchasing/checkCredit"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="CreditCheckFailed">
+ <soap:fault name="CreditCheckFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CreditAgencyService">
+ <wsdl:port binding="pur:CreditAgencyInterfaceBinding" name="CreditAgencyInterfacePort">
+ <soap:address location="http://localhost:8080/CreditAgencyService/CreditAgencyInterfacePort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="java:org.jboss.savara.examples.purchasing" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="java:org.jboss.savara.examples.purchasing">
+ <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <plnk:partnerLinkType name="StoreToCreditAgencyServiceLT">
+ <plnk:role name="CreditAgencyInterface" portType="ns1:CreditAgencyInterface"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,32 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Purchasing@Store" name="PurchaseGoodsProcess_Store" targetNamespace="http://www.jboss.org/examples/store" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_StoreArtifacts.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <partnerLinks>
+ <partnerLink myRole="StoreInterface" name="BuyerToStore" partnerLinkType="sto:BuyerToStoreServiceLT"/>
+ <partnerLink name="StoreToCreditAgency" partnerLinkType="sto:StoreToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="sto:buyRequest" name="buyRequestVar"/>
+ <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+ <variable messageType="sto:BuyFailedFault" name="BuyFailedFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_BuyRequest" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyRequestVar"/>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="pur:CreditCheckFailedFault" faultName="pur:CreditCheckFailed" faultVariable="CreditCheckFailedFaultVar">
+ <sequence>
+ <reply faultName="sto:BuyFailed" name="Send_BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="BuyFailedFaultVar"/>
+ </sequence>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface"/>
+ <reply name="Send_BuyConfirmed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyResponseVar"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Store" targetNamespace="http://www.jboss.org/examples/store">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="BuyFailedFault">
+ <wsdl:part name="content" type="sto:BuyFailed">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="buyRequest">
+ <wsdl:part name="content" type="sto:BuyRequest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="buyResponse">
+ <wsdl:part name="content" type="sto:BuyConfirmed">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="StoreInterface">
+ <wsdl:operation name="buy">
+ <wsdl:input message="sto:buyRequest">
+ </wsdl:input>
+ <wsdl:output message="sto:buyResponse">
+ </wsdl:output>
+ <wsdl:fault message="sto:BuyFailedFault" name="BuyFailed">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="StoreInterfaceBinding" type="sto:StoreInterface">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="buy">
+ <soap:operation soapAction="http://www.jboss.org/examples/store/buy"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="BuyFailed">
+ <soap:fault name="BuyFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="StoreService">
+ <wsdl:port binding="sto:StoreInterfaceBinding" name="StoreInterfacePort">
+ <soap:address location="http://localhost:8080/StoreService/StoreInterfacePort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.jboss.org/examples/store" xmlns:ns2="java:org.jboss.savara.examples.purchasing" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.jboss.org/examples/store">
+ <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+ <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+ <plnk:partnerLinkType name="BuyerToStoreServiceLT">
+ <plnk:role name="StoreInterface" portType="ns1:StoreInterface"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="StoreToCreditAgencyLT">
+ <plnk:role name="CreditAgencyRequester" portType="ns2:CreditAgencyInterface"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault(a)Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault(a)Buyer.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault(a)Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,23 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="BuyerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
- <partnerLinks>
- <partnerLink name="BuyerToSeller" partnerLinkType="tns:BuyerToSellerLT" partnerRole="SellerRequester"/>
- </partnerLinks>
- <variables>
- <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
- <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
- </variables>
- <sequence>
- <scope>
- <faultHandlers>
- <catch faultMessageType="CreditCheckInvalid" faultName="insufficientCredit" faultVariable="creditCheckInvalidVar">
- <sequence/>
- </catch>
- </faultHandlers>
- <sequence>
- <invoke inputVariable="creditCheckRequestVar" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="BuyerToSeller" portType="tns:SellerBehavior"/>
- </sequence>
- </scope>
- </sequence>
-</process>
Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault(a)Seller.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault(a)Seller.bpel 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault(a)Seller.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -1,25 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess@Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
- <import importType="http://schemas.xmlsoap.org/wsdl/" location="SellerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
- <partnerLinks>
- <partnerLink myRole="SellerService" name="BuyerToSeller" partnerLinkType="tns:BuyerToSellerServiceLT"/>
- </partnerLinks>
- <variables>
- <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
- <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
- <variable messageType="CreditCheckInvalid" name="creditCheckInvalidVar"/>
- </variables>
- <sequence>
- <receive createInstance="yes" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckRequestVar"/>
- <if>
- <sequence>
- <reply operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckOkVar"/>
- </sequence>
- <else>
- <sequence>
- <reply faultName="tns:insufficientCredit" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckInvalidVar"/>
- </sequence>
- </else>
- </if>
- </sequence>
-</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,23 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+ <partnerLinks>
+ <partnerLink name="BuyerToSeller" partnerLinkType="byr:BuyerToSellerLT" partnerRole="SellerRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+ </variables>
+ <sequence>
+ <scope>
+ <faultHandlers>
+ <catch faultMessageType="slr:insufficientCreditFault" faultName="slr:insufficientCredit" faultVariable="insufficientCreditFaultVar">
+ <sequence/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BuyerToSeller" portType="slr:SellerBehavior"/>
+ </sequence>
+ </scope>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer">
+ <wsdl:import location="ReqRespFaultProcess_Buyer.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+ <wsdl:import location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <plnk:partnerLinkType name="BuyerToSellerLT">
+ <plnk:role name="SellerRequester" portType="ns1:SellerBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,25 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess@Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_SellerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <partnerLinks>
+ <partnerLink myRole="SellerBehavior" name="BuyerToSeller" partnerLinkType="slr:BuyerToSellerServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+ <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+ <variable messageType="slr:insufficientCreditFault" name="insufficientCreditFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditRequestVar"/>
+ <if>
+ <sequence>
+ <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditResponseVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="slr:insufficientCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="insufficientCreditFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="checkCreditRequest">
+ <wsdl:part element="CreditCheckRequest" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="checkCreditResponse">
+ <wsdl:part element="CreditCheckOk" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="insufficientCreditFault">
+ <wsdl:part element="CreditCheckInvalid" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SellerBehavior">
+ <wsdl:operation name="checkCredit">
+ <wsdl:input message="slr:checkCreditRequest">
+ </wsdl:input>
+ <wsdl:output message="slr:checkCreditResponse">
+ </wsdl:output>
+ <wsdl:fault message="slr:insufficientCreditFault" name="insufficientCredit">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SellerBehaviorBinding" type="slr:SellerBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="checkCredit">
+ <soap:operation soapAction="http://www.pi4soa.org/ReqRespFault/Seller/checkCredit"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="insufficientCredit">
+ <soap:fault name="insufficientCredit" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SellerService">
+ <wsdl:port binding="slr:SellerBehaviorBinding" name="SellerBehaviorPort">
+ <soap:address location="http://localhost:8080/SellerService/SellerBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller">
+ <wsdl:import location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+ <plnk:partnerLinkType name="BuyerToSellerServiceLT">
+ <plnk:role name="SellerBehavior" portType="ns1:SellerBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,15 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker@SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngineArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <partnerLinks>
+ <partnerLink myRole="SupplierBehavior" name="BrokerToSupplierQuoteEngine" partnerLinkType="spr:BrokerToSupplierQuoteEngineServiceLT"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+ <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_requestForQuote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteRequestVar"/>
+ <reply name="Send_quote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteResponseVar"/>
+ </sequence>
+</process>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+ </types>
+ <wsdl:message name="confirmRequest">
+ <wsdl:part element="orderConfirmed" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="confirmResponse">
+ <wsdl:part element="bookingReference" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteResponse">
+ <wsdl:part element="quote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getQuoteRequest">
+ <wsdl:part element="requestForQuote" name="content">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SupplierBehavior">
+ <wsdl:operation name="confirm">
+ <wsdl:input message="spr:confirmRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:confirmResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <wsdl:input message="spr:getQuoteRequest">
+ </wsdl:input>
+ <wsdl:output message="spr:getQuoteResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="confirm">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getQuote">
+ <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SupplierService">
+ <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+ <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl 2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+ <wsdl:import location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+ <plnk:partnerLinkType name="BrokerToSupplierQuoteEngineServiceLT">
+ <plnk:role name="SupplierBehavior" portType="ns1:SupplierBehavior"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/test/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/test/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java 2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/test/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java 2010-11-12 12:21:09 UTC (rev 464)
@@ -18,6 +18,7 @@
package org.jboss.savara.tools.bpel.model.change;
import org.scribble.conversation.model.Conversation;
+import org.scribble.conversation.model.Run;
import org.scribble.model.*;
import org.scribble.model.change.DefaultModelChangeContext;
import org.scribble.model.change.ModelChangeContext;
@@ -28,7 +29,9 @@
public class ModelChangeUtilsTest extends TestCase {
private static final String MY_ROLE = "MyRole";
+ private static final String MY_LOCATED_ROLE = "MyLocatedRole";
private static final String MY_OTHER_ROLE = "MyOtherRole";
+ private static final String MY_OTHER_LOCATED_ROLE = "MyOtherLocatedRole";
public void testInitialiseContracts() {
ModelChangeContext context=new DefaultModelChangeContext(null, null);
@@ -44,7 +47,7 @@
ln.setRole(r);
conv.setLocatedName(ln);
- ModelChangeUtils.addContracts(context, conv);
+ ModelChangeUtils.addContracts(context, conv, true);
Contract c2=ModelChangeUtils.getContract(context, MY_ROLE);
@@ -71,7 +74,7 @@
ln.setRole(r);
conv.setLocatedName(ln);
- ModelChangeUtils.addContracts(context, conv);
+ ModelChangeUtils.addContracts(context, conv, true);
Conversation conv2=new Conversation();
LocatedName ln2=new LocatedName();
@@ -84,7 +87,7 @@
ln2.setRole(r2);
conv2.setLocatedName(ln2);
- ModelChangeUtils.addContracts(context, conv2);
+ ModelChangeUtils.addContracts(context, conv2, true);
Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
@@ -112,38 +115,71 @@
Conversation conv=new Conversation();
LocatedName ln=new LocatedName();
- Role r=new Role();
- r.setName(MY_ROLE);
+ Role r1=new Role();
+ r1.setName(MY_LOCATED_ROLE);
+ ln.setRole(r1);
+ conv.setLocatedName(ln);
- Contract c=new Contract();
- r.getAnnotations().put(Contract.class.getName(), c);
+ Contract c1=new Contract();
+ r1.getAnnotations().put(Contract.class.getName(), c1);
- ln.setRole(r);
- conv.setLocatedName(ln);
+ Role r2=new Role();
+ r2.setName(MY_ROLE);
- ModelChangeUtils.addContracts(context, conv);
+ Contract c2=new Contract();
+ r2.getAnnotations().put(Contract.class.getName(), c2);
+
+ RoleList rl=new RoleList();
+ rl.getRoles().add(r2);
+ conv.getBlock().getContents().add(rl);
+
+ ModelChangeUtils.addContracts(context, conv, true);
- java.util.List<DeclarationBinding> bindings=new java.util.Vector<DeclarationBinding>();
+ Conversation subconv=new Conversation();
+ LocatedName subln=new LocatedName();
+ Role subr1=new Role();
+ subr1.setName(MY_OTHER_LOCATED_ROLE);
+ subln.setRole(subr1);
+ subconv.setLocatedName(subln);
+ Run run=new Run();
+ conv.getBlock().getContents().add(run);
+ run.setInlineDefinition(subconv);
+
DeclarationBinding db=new DeclarationBinding();
- db.setDeclaration(r);
+ db.setDeclaration(r2);
db.setBoundName(MY_OTHER_ROLE);
- bindings.add(db);
+ run.getBindings().add(db);
- ModelChangeUtils.pushRoleContractMapping(context, bindings);
+ ModelChangeUtils.pushRoleContractMapping(context, run);
- Contract c2=ModelChangeUtils.getContract(context, MY_ROLE);
- Contract c3=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
+ Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
+ Contract c4=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
- if (c2 != null) {
+ if (c3 != null) {
fail("Contract for "+MY_ROLE+" should be null");
}
- if (c3 == null) {
+ if (c4 == null) {
fail("Contract for "+MY_OTHER_ROLE+" should NOT be null");
}
- if (c3 != c) {
+ Contract c5=ModelChangeUtils.getContract(context, MY_LOCATED_ROLE);
+ Contract c6=ModelChangeUtils.getContract(context, MY_OTHER_LOCATED_ROLE);
+
+ if (c5 != null) {
+ fail("Contract for "+MY_LOCATED_ROLE+" should be null");
+ }
+
+ if (c6 == null) {
+ fail("Contract for "+MY_OTHER_LOCATED_ROLE+" should NOT be null");
+ }
+
+ if (c6 != c1) {
+ fail("Located role's Contract not the same as the one stored");
+ }
+
+ if (c4 != c2) {
fail("Contract not the same as the one stored");
}
}
@@ -153,39 +189,83 @@
Conversation conv=new Conversation();
LocatedName ln=new LocatedName();
- Role r=new Role();
- r.setName(MY_ROLE);
+ Role r1=new Role();
+ r1.setName(MY_LOCATED_ROLE);
- Contract c=new Contract();
- r.getAnnotations().put(Contract.class.getName(), c);
-
- ln.setRole(r);
+ ln.setRole(r1);
conv.setLocatedName(ln);
- ModelChangeUtils.addContracts(context, conv);
+ Role r2=new Role();
+ r2.setName(MY_ROLE);
+
+ RoleList rl=new RoleList();
+ rl.getRoles().add(r2);
+ conv.getBlock().getContents().add(rl);
+
+ Conversation subconv=new Conversation();
+ LocatedName subln=new LocatedName();
+ Role subr1=new Role();
+ subr1.setName(MY_OTHER_LOCATED_ROLE);
+ subln.setRole(subr1);
+ subconv.setLocatedName(subln);
+
+ Contract c1=new Contract();
+ subr1.getAnnotations().put(Contract.class.getName(), c1);
+
+ Role r3=new Role();
+ r3.setName(MY_OTHER_ROLE);
+
+ Contract c2=new Contract();
+ r3.getAnnotations().put(Contract.class.getName(), c2);
- java.util.List<DeclarationBinding> bindings=new java.util.Vector<DeclarationBinding>();
+ RoleList rl2=new RoleList();
+ rl2.getRoles().add(r3);
+ subconv.getBlock().getContents().add(rl2);
+ // Add contracts for subconv as if root, as normally
+ // this would be done by pushing the contracts, so this
+ // is just being used to setup the appropriate context
+ ModelChangeUtils.addContracts(context, subconv, true);
+
+ Run run=new Run();
+ conv.getBlock().getContents().add(run);
+ run.setInlineDefinition(subconv);
+
DeclarationBinding db=new DeclarationBinding();
- db.setDeclaration(r);
+ db.setDeclaration(r2);
db.setBoundName(MY_OTHER_ROLE);
- bindings.add(db);
+ run.getBindings().add(db);
- ModelChangeUtils.popRoleContractMapping(context, bindings);
+ ModelChangeUtils.popRoleContractMapping(context, run);
- Contract c2=ModelChangeUtils.getContract(context, MY_ROLE);
- Contract c3=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
+ Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
+ Contract c4=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
- if (c2 == null) {
+ if (c3 == null) {
fail("Contract for "+MY_ROLE+" should NOT be null");
}
- if (c3 != null) {
+ if (c4 != null) {
fail("Contract for "+MY_OTHER_ROLE+" should be null");
}
- if (c2 != c) {
+ Contract c5=ModelChangeUtils.getContract(context, MY_LOCATED_ROLE);
+ Contract c6=ModelChangeUtils.getContract(context, MY_OTHER_LOCATED_ROLE);
+
+ if (c5 == null) {
+ fail("Contract for "+MY_LOCATED_ROLE+" should NOT be null");
+ }
+
+ if (c6 != null) {
+ fail("Contract for "+MY_OTHER_LOCATED_ROLE+" should be null");
+ }
+
+ if (c3 != c2) {
fail("Contract not the same as the one stored");
}
+
+ if (c5 != c1) {
+ fail("Contract not the same as the one stored");
+ }
}
}
15 years, 5 months
savara SVN: r463 - branches/1.1.x/distribution/src/files/jbossesb.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-11-12 06:59:39 -0500 (Fri, 12 Nov 2010)
New Revision: 463
Modified:
branches/1.1.x/distribution/src/files/jbossesb/jbossesb-properties-validator.xml
Log:
Change to make use of the new ESB interceptor class.
Modified: branches/1.1.x/distribution/src/files/jbossesb/jbossesb-properties-validator.xml
===================================================================
--- branches/1.1.x/distribution/src/files/jbossesb/jbossesb-properties-validator.xml 2010-11-12 11:13:06 UTC (rev 462)
+++ branches/1.1.x/distribution/src/files/jbossesb/jbossesb-properties-validator.xml 2010-11-12 11:59:39 UTC (rev 463)
@@ -143,7 +143,7 @@
<properties name="filters">
<property name="org.jboss.soa.esb.filter.1" value="org.jboss.internal.soa.esb.message.filter.MetaDataFilter"/>
<property name="org.jboss.soa.esb.filter.2" value="org.jboss.internal.soa.esb.message.filter.GatewayFilter"/>
- <property name="org.jboss.soa.esb.filter.10" value="org.jboss.savara.validator.jbossesb.ValidatorFilter" />
+ <property name="org.jboss.soa.esb.filter.10" value="org.jboss.savara.validator.jbossesb.JBossESBInterceptor" />
</properties>
<properties name="rules">
15 years, 5 months
savara SVN: r462 - branches/1.1.x/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-11-12 06:13:06 -0500 (Fri, 12 Nov 2010)
New Revision: 462
Modified:
branches/1.1.x/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java
Log:
Created jira (SAVARA-150) to keep track of the commented out parser test.
Modified: branches/1.1.x/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java
===================================================================
--- branches/1.1.x/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java 2010-11-11 18:05:22 UTC (rev 461)
+++ branches/1.1.x/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java 2010-11-12 11:13:06 UTC (rev 462)
@@ -48,7 +48,7 @@
suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Seller", "ReqRespFault@Seller"));
/**
- * TODO: Commenting out this test for now, as we now need the accompanying WSDL to be able to
+ * TODO: (SAVARA-150) Commenting out this test for now, as we now need the accompanying WSDL to be able to
* resolve the message type's underlying XSD element or type.
*
suite.addTest(new BPELToConversationTest("LoanApprovalService@Service", "LoanApprovalService@Service"));
15 years, 5 months