Version 7

    This article outlines the functionality that should be tested before releasing a version of the Savara Eclipse Tooling.

     

     

    Setting up the Environment

     

    Download the latest version of Eclipse JEE.

     

    After building the release candidate for savara-core and savara-tools-eclipse repositories, install the plugins found in the savara-tools-eclipse/site/target folder.

     

    Import the example "purchasing" project found here: http://downloads.jboss.org/savara/examples/savara2-example-purchasing.zip (also referenced on the downloads page)

     

     

    Core Capabilities

     

    Scenarios

     

    This set of tests will check functionality associated with the scenarios.

     

    Generating BPMN2 artifacts from scenarios

     

    TEST SCN10: Select the SuccessfulPurchase.scn, InsufficientCredit.scn and CustomerUnknown.scn scenarios, and select the "Savara->BPMN2->Create Architecture and Designs" menu item. Enter a model name (e.g. P), and press OK.

     

    Confirm that:

    a) P.bpmn is equivalent to the architecture/PurchaseGoods.bpmn diagram

    b) That an appropriate model has been generated for the four roles, Buyer, Store, CreditAgency and Logistics.

     

    To further verify the choreography, select the P.bpmn file and choose the Savara->Generate->Contract menu item and generate the WSDL interfaces for the three roles Store, CreditAgency and Logistics.

     

     

    BPMN2 Choreography

     

    Simulate Scenarios against BPMN2 Choreography

     

    TEST CHOR10: Open SuccessfulPurchase.scn and press the "green play" button in the toolbar (with tooltip 'Simulate Scenario'). This will show a dialog window. Press the top '...' button and locate the architecture/PurchaseGoods.bpmn file.

     

    When asked "Should model be set for all roles", press the "Yes" button. This will initialise the same model against all roles in the scenario, which is appropriate for this test, as we are just testing against a single model. If each role was being tested against a different model then we would say 'No' and choose individual models for each role.

     

    Now just press the "Simulate" button and all the nodes on the scenario should go green.

     

     

    TEST CHOR11: Select the second interaction (CreditCheckRequest) and edit the first parameter details in the Properties view, e.g. add an 'X' to the end of the information in the Type field. Then perform the simulation again. This time the CreditCheckRequest interaction and subsequent interactions should show red nodes.

     

     

    TEST CHOR12: Open the InvalidStoreBehaviour.scn scenario file and repeat the same steps. This time the Store role should have three green nodes followed by three red nodes. This is correct, as under the circumstances (i.e. CustomerUnknown fault) the Store should not attempt to dispatch the order.

     

     

    TEST CHOR13: Open the InsufficientCredit.scn scenario file and repeat the same steps. This scenario should have all green nodes.

     

     

    TEST CHOR14: Open the CustomerUnknown.scn scenario file and repeat the same steps. This scenario should have all green nodes.

     

     

    Generate WSDL from BPMN2 Choreography

     

    TEST CHOR20: Select the architecture/PurchaseGoods.bpmn choreography and choose the "Savara->Generate->Contract" menu item. This will display a dialog showing the roles (Store, CreditAgency and Logistics). Once the OK button has been pressed, three wsdl files should be created in the same folder.

     

    Verify that the schema import location is correct (i.e. it should be in the relative folder "../schema").

     

     

     

    Generate BPMN2 Process Models from BPMN2 Choreography

     

    TEST CHOR30: Select the architecture/PurchaseGoods.bpmn choreography and choose the "Savara->Generate->Service" menu item. This will display a dialog showing the roles (Store, CreditAgency and Logistics). Select the Service Type "BPMN2 Process" for each of the roles, and then press the OK button. This will create three new projects, one per role.

     

    Verify the BPMN2 process models are equivalent to the ones created in SCN10.

     

     

     

    Generate BPEL (Switchyard) from BPMN2 Choreography

     

    TEST CHOR40: Select the architecture/PurchaseGoods.bpmn choreography and choose the "Savara->Generate->Service" menu item. This will display a dialog showing the roles (Store, CreditAgency and Logistics). Select the Service Type "BPEL (Switchyard)" for each of the roles, and then press the OK button. This will create three new projects, one per role.

     

    Verify the PurchaseGoods-Store project: make sure the src/main/resources folder contains a 'schema' sub-folder containing the three schema files. Also open the PurchaseGoods_Store.bpel process, located in the src/main/resources folder, to ensure it is valid BPEL, and represents the expected behaviour.

     

     

     

    WS-BPEL

     

    Simulate scenarios against WS-BPEL Process

     

    TEST BPEL10: Open SuccessfulPurchase.scn and press the "green play" button in the toolbar (with tooltip 'Simulate Scenario'). This will show a dialog window. As the scenario has been simulated before, it will have existing values associated with the single BPMN2 choreography. Therefore you will need to select the '...' button for each role and locate the appropriate BPEL process for the role. NOTE: the Buyer role does not have a BPEL process, and therefore select the "Don't Simulate" option on the Simulator combobox for the Buyer role.

     

    Once the BPEL processes have been located for the model fields for each role, just press the "Simulate" button and all the nodes on the scenario should go green.

     

     

    Generate BPMN2 Process Model from WS-BPEL Process

     

    TEST BPEL20: Select the src/main/resources/PurchaseGoods_Store.bpel process generated in CHOR40 and choose the "Savara->Generate->Service" menu item. This will display a dialog showing the single role (i.e. Store). Select the Service Type "BPMN2 Process"  and then press the OK button. This will create a new project.

     

    Verify the BPMN2 process model is equivalent to the ones created in CHOR30.

     

     

    Java (Switchyard)

     

    Generate Java (Switchyard) from BPMN2 Choreography

     

    TEST JSWYD10: Select the architecture/PurchaseGoods.bpmn choreography and choose the "Savara->Generate->Service" menu item. This will display a dialog showing the roles (Store, CreditAgency and Logistics). Select the Service Type "Java (Switchyard)" for each of the roles, and then press the OK button. This will create three new projects, one per role.

     

    Verify the project created for the Store role: make sure the src/main/resources folder contains a 'wsdl' folder containing the three wsdl definitions, and within that folder, a 'schema' sub-folder containing the three schema files. Also open the org.savara.examples.store.StoreImpl Java class, located in the src/main/java folder, to ensure it is valid Java, and represents the expected behaviour (with a number of TODO comments for the parts that need to be manually specified).

     

     

    Preview or Deprecated Capabilities

     

    SCA Java

     

    Generate SCA Java from BPMN2 Choreography

     

    TEST SCAJ10: Select the architecture/PurchaseGoods.bpmn choreography and choose the "Savara->Generate->Service" menu item. This will display a dialog showing the roles (Store, CreditAgency and Logistics). Select the Service Type "SCA Java" for each of the roles, and then press the OK button. This will create three new projects, one per role.

     

    Verify the project created for the Store role: make sure the src/main/resources folder contains a 'wsdl' folder containing the three wsdl definitions, and within that folder, a 'schema' sub-folder containing the three schema files, as well as a Store.composite file.

     

     

    Simulate scenario against SCA Java

     

    TEST SCAJ20: Firstly you need to obtain a fully implemented version of the generated classes. These can be obtained by downloading: http://downloads.jboss.org/savara/examples/purchasing_sca_impl.zip. This file contains a single implementation per role, and should be used to overwrite the appropriate Java class within each role's project.

     

    Open SuccessfulPurchase.scn and press the "green play" button in the toolbar (with tooltip 'Simulate Scenario'). This will show a dialog window. As the scenario has been simulated before, it will have existing values. Therefore you will need to select the '...' button for each role and locate the appropriate *.composite file for the role. NOTE: the Buyer role does not have a service implementation, and therefore select the "Don't Simulate" option on the Simulator combobox for the Buyer role.

     

    Once the *.composite files have been located for the model fields for each role, just press the "Simulate" button and all the nodes on the scenario should go green.