Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Tigerstripe Simple Model Tutorial"

(Document the new Project)
m (Corrected minor spelling errors)
 
(41 intermediate revisions by 4 users not shown)
Line 3: Line 3:
 
=Designing a simple Service Contract with Tigerstripe Workbench=
 
=Designing a simple Service Contract with Tigerstripe Workbench=
  
NOTE THIS IS A DRAFT PAGE
 
  
NOTE - THESE THREE PAGES TO BE DELETED...
+
* Create a New Tigerstripe Project to contain the  model.
 +
* Document the new Project by editing the Project Descriptor.
 +
* Create a Service End-point Model representing the integration point.
  
* [[Create a New Tigerstripe Project]] to contain the  model.
+
A '''[[Tigerstripe_Glossary#Tigerstripe Project|Tigerstripe Project]]''' contains the details of a Service Contract Model. More specifically, it contains the following:
* [[Document the new Project]] by editing the Project Descriptor.
+
* [[Create a Service End-point Model]] representing the integration point.
+
  
'''Tigerstripe''' projects contain the details of a Service Contract Model. More specifically, they contain the following:
+
* A set of '''[[Tigerstripe_Glossary#Artifact|Artifacts]]''' that define an Information Model and the Behavior Model used in a Service Contract.
 
+
* A '''[[Tigerstripe_Glossary#Project Descriptor|Project Descriptor]]''' (tigerstripe.xml), used to store additional properties about the project. Such properties can include the project version, description, but can also include properties that are used when generating code.
* A set of '''Model Artifacts''' that define an Information Model and the Behavior Model used in a Service Contract.
+
* A '''project descriptor''' (tigerstripe.xml), used to store additional properties about the project. Such properties can include the project version, description, but can also include properties that are used when generating code.
+
 
* A set of diagrams providing a graphical representation of the Service Contract.
 
* A set of diagrams providing a graphical representation of the Service Contract.
 +
 +
This tutorial will guide you through creating a simple model and the generation of some simple output. (Creation of diagrams is covered in a subsequent tutorial).
 +
 +
To run this tutorial you will need to have installed '''[[Tigerstripe_Glossary#Tigerstripe Workbench|Tigerstripe Workbench]]'''. See the installation tutorial [http://www.eclipse.org/tigerstripe/downloads.php here].
  
 
=Create a New Tigerstripe Project=
 
=Create a New Tigerstripe Project=
  
* From the '''File''' menu, select '''New''' and click '''Project'''. The '''New Project: Select a wizard''' dialog box opens.
+
Start up '''[[Tigerstripe_Glossary#Tigerstripe Workbench|Tigerstripe Workbench]]'''.
* Select '''Tigerstripe Project''' and click '''Next'''.  The '''New Tigerstripe Project''' dialog box displays.
+
  
* Alternatively, you can click the [[Image:new_project_icon.gif]] icon on the toolbar.  
+
# From the '''File''' menu, select '''New''' and click '''Project'''. The '''New Project: Select a wizard''' dialog box opens.
 +
# Select '''Tigerstripe Project''' and click '''Next'''.  The '''New Tigerstripe Project''' dialog box displays.
 +
# Alternatively, you can click the [[Image:Tigerstripe_new_project_icon.gif]] icon on the toolbar. <br> [[Image:Tigerstripe_new_project_wizard.gif]]
 +
# Enter a name for your project.
 +
#* For this tutorial, the project name is ''SimpleProject''.
 +
# Click '''Finish''' to create your new project.
  
[[Image:new_project_wizard.gif]]
 
  
* Enter a name for your project.
 
<ul>For this tutorial, the project name is ''SimpleProject''.</ul>
 
 
* Click '''Finish''' to create your new project.
 
  
  
 
Note: Click '''Help''' and select '''Help Contents''' for more information about other options available.
 
Note: Click '''Help''' and select '''Help Contents''' for more information about other options available.
 
  
 
=Document the new Project=
 
=Document the new Project=
  
Your newly created project should be empty and the descriptor for the project automatically opens. The '''Tigerstripe''' perspective displays.
+
Your newly created project should be empty and the descriptor (tigerstripe.xml) for the project automatically opens.
  
[[Image|new_project_open.gif]]
+
[[Image:Tigerstripe_new_project_open.gif]]
  
 
   
 
   
The following items should be visible from the '''Tigerstripe''' perspective:
+
The following items should be visible from the '''[[Tigerstripe_Glossary#Tigerstripe Perspective|Tigerstripe Perspective]]''':
  
* The '''Tigerstripe Explorer'''. Displays the '''Tigerstripe Project''' in the workspace.
+
* The '''[[Tigerstripe_Glossary#Tigerstripe Explorer|Tigerstripe Explorer]]''' which displays the contents of all '''[[Tigerstripe_Glossary#Tigerstripe project|Tigerstripe project]]s''' in the workspace.
 
* A multi-tab form. Contains details of your newly created project.
 
* A multi-tab form. Contains details of your newly created project.
* A properties view.  
+
* A '''[[Tigerstripe_Glossary#Problems view|Problems view]]'''. Any problems in the configuration of your project will be displayed here.
  
 
After you create a new project, you need to add some information about your project. This information is used when generating documentation for your project.
 
After you create a new project, you need to add some information about your project. This information is used when generating documentation for your project.
Line 52: Line 51:
 
To edit project details:
 
To edit project details:
  
* Enter the project name in the '''Name''' text box.
+
# Enter the project version information in the '''Version''' text box.
* Enter the project version information in the '''Version''' text box.
+
# Enter a project description in the '''Description''' text box.  
* Enter a project description in the '''Description''' text box.  
+
# Click '''Save'''.
* Click Save.
+
  
 
=Create a Service End-point Model=
 
=Create a Service End-point Model=
  
In '''Tigerstripe Workbench''', a ''Service Contract'' is modeled through a set of '''Model Artifacts''' stored in the project. A palette of service artifacts is available to you to model your Service Contract.
+
In '''[[Tigerstripe_Glossary#Tigerstripe Workbench|Tigerstripe Workbench]]''', a ''Service Contract'' is modeled through a set of '''[[Tigerstripe_Glossary#Artifact|Artifacts]]''' stored in the project. A palette of service artifacts is available to you to model your Service Contract.
  
There are two main categories of '''Model Artifacts''':
+
There are two main categories of '''[[Tigerstripe_Glossary#Artifact|Artifact]]''':
  
 
* ''Information Model Artifacts''. Allows you to capture details about the information model relevant to your Service Contract.
 
* ''Information Model Artifacts''. Allows you to capture details about the information model relevant to your Service Contract.
 
* ''Behavior Model Artifacts''. Allows you to specify how information is made available through the Service Contract. This information can range from unsolicited notifications to query mechanisms.
 
* ''Behavior Model Artifacts''. Allows you to specify how information is made available through the Service Contract. This information can range from unsolicited notifications to query mechanisms.
  
In addition, an '''Integration Point''' or '''Service Facade Artifact''' models an end-point (For example, a Web Service). The first step of this tutorial is to create a simple end-point and generate a Web Service Definition (.wsdl).
+
In addition, an '''Integration Point''' or '''[[Tigerstripe_Glossary#Session Facade Artifact|Session Facade Artifact]]''' models an end-point (For example, a Web Service). The next step of this tutorial is to create a simple end-point and generate a corresponding Web Service Definition (.wsdl).
  
 
To create an end-point and a Web Service Definition:
 
To create an end-point and a Web Service Definition:
  
* Click the '''Integration Point''' icon [[Image|new_session_icon.gif]]. The '''New Session Artifact''' dialog box displays.
+
# Right click on the 'src' folder of your project > New > Session Facade. The '''New Session Artifact''' dialog box displays.
* Enter the details about your new artifact and click '''Finish'''. The details of the newly created Integration Point or Service Facade Artifact display.
+
# Enter the details about your new artifact (the name should start with an upper case letter by convention) and click '''Finish'''. The details of the newly created Integration Point or '''[[Tigerstripe_Glossary#Session Facade Artifact|Session Facade Artifact]]''' display.
  
Note: Spaces and special characters are not allowed in an artifact name.
+
:Note: Spaces and special characters are not allowed in an artifact name.
  
In the '''Tigerstripe Explorer''', expand the src folder and you will see the newly created artifact in the model as shown below:
+
In the '''[[Tigerstripe_Glossary#Tigerstripe Explorer|Tigerstripe Explorer]]''', expand the src folder and you will see the newly created artifact in the model as shown below:
  
[[Image|facade_in_explorer.gif]]
+
[[Image:Tigerstripe_facade_in_ts_explorer.png]]
  
Adding a '''Method''' to your '''Facade Artifact'''
+
You now need to add a '''[[Tigerstripe_Glossary#Method|Method]]''' to your '''[[Tigerstripe_Glossary#Session Facade Artifact|Session Facade Artifact]]'''. A '''[[Tigerstripe_Glossary#Method|Method]]''' represents an operation available on a Service. An example of a method would be if you wanted to build a Service related to order handling, and you wanted to offer an operation on the Service to process orders.
  
A method represents an operation available on a Service. An example of a method would be if you wanted to build a Service related to order handling, and you wanted to offer an operation on the Service to process orders.
+
To add a '''[[Tigerstripe_Glossary#Method|Method]]''':
  
To add a method:
+
# Open your artifact editor by double clicking on the Session Facade artifact in Tigerstripe Explorer.
 +
# Scroll down to the '''Methods''' section, make sure it's expanded, and click on '''Add'''.
 +
# Enter a '''Name''' for your method.
 +
#* For this tutorial, name your method ''processOrder''.
 +
# Add a '''[[Tigerstripe_Glossary#Method argument|Method argument]]''' by clicking '''Add''' next to the '''Argument''' list.
 +
#* For this tutorial, name your method argument ''orderNumber'' and give it a type of int.
 +
# Click '''Save''' to save your changes.
  
* Open your artifact perspective.
+
In the '''[[Tigerstripe_Glossary#Tigerstripe Explorer|Tigerstripe Explorer]]''' you can expand the '''[[Tigerstripe_Glossary#Session Facade Artifact|Session Facade Artifact]]''' to show the defined '''[[Tigerstripe_Glossary#Method|methods]]'''.  
* Expand the '''Methods''' option and click Add.
+
* Enter a '''Name''' for your method.
+
For this tutorial, name your method ''processOrder''.
+
* Add a method argument by clicking Add next to the '''Method Argument''' section.
+
For this tutorial, name your method argument ''orderNumber''.
+
* Click '''Save''' to save your changes.
+
  
 
=Generate the service definition=
 
=Generate the service definition=
  
in Tigerstripe Workbench, project generation is handled through Tigerstripe plug-ins. Although advanced users can create their own plug-ins (see another tutorial on that topic), by default Tigerstripe Workbench ships with three basic plug-ins:
+
So far, you have created a basic model for a Service Contract and you have identified one single integration point with a single operation. In this step, you will generate a Web Service definition.
  
* A Java profile plug-in. Allows you to generate a Java-specific definition for your Service Contract Model.
+
In '''[[Tigerstripe_Glossary#Tigerstripe Workbench|Tigerstripe Workbench]]''', project generation is handled through '''[[Tigerstripe_Glossary#Tigerstripe Plugins|Tigerstripe Plugins]]'''. A '''[[Tigerstripe_Glossary#Tigerstripe Plugins|plugin]]''' defines the rules by which artifacts are rendered in the output, in terms of format (eg HTML, XML, Java) filename, and detailed file content.  
* A JMS/XML profile plug-in. Allows you to generate a series of XML Schemas that define a message-based implementation for your Service Contract Model.
+
* A WSDL profile plug-in. Allows you to generate a Web Service definition (.wsdl) for your Service Contract Model.
+
  
So far, you have created a basic model for a Service Contract and you have identified one single integration point with a single operation. In this tutorial, you will generate a Web Service definition.
+
Writing plugins is the subject of another tutorial '''[[Tigerstripe Simple Plugin Tutorial|here]]'''. '''At this point you should stop following this tutorial.  Create a Tigerstripe plugin project by following the tutorial link and come back to this section once the plugin has been created.
  
To generate a Web Service definition:
 
  
*  Double click the project descriptor (tigerstripe.xml) in the Tigerstripe Explorer. This opens your Tigerstripe project perspective.
+
At this point, it's assumed that the user has created a plugin project and deployed it in their Tigerstripe workbench.
* . Navigate to the Generation tab and enable the plug-ins so they are triggered once you generate your project.
+
  
      generationDetails
 
*  Click Save to save your changes.
 
*  Click the Generate icon generateIcon on the toolbar. The Generate Tigerstrip Project dialog box displays.
 
*  Accept the default Source Folder or click Browse to navigate to a new location and click Finish.
 
  
 +
To generate code from your model:
 +
 +
# Double click the '''[[Tigerstripe_Glossary#Project Descriptor|Project Descriptor]]''' (tigerstripe.xml) in the '''[[Tigerstripe_Glossary#Tigerstripe Explorer|Tigerstripe Explorer]]'''. This opens your Descriptor editor.
 +
#  Navigate to the '''Plugin Settings''' tab,  and click on the section heading for the plugin you have just deployed. This will open up a section where you can manipulate the properties of the plugin.
 +
#  Check the '''Enable''' checkbox so that it will be triggered once you '''Generate''' your project. (You can have many plugins enabled at the same time.)<br>
 +
#  Click '''Save''' to save your changes.
 +
#  Click the '''Generate''' icon [[Image:Tigerstripe_generate_icon.gif]] on the toolbar. The '''Generate Tigerstripe Project''' dialog box displays.
 +
#  Click '''Finish'''. The other options on this dialog will be mostly greyed out for now and their use will be covered in future tutorials.
 +
 +
'''[[Tigerstripe_Glossary#Tigerstripe Workbench|Tigerstripe Workbench]]''' will then (provided you have followed the instructions above) generate some output files, and will refresh the '''[[Tigerstripe_Glossary#Tigerstripe Explorer|Tigerstripe Explorer]]''' with the new files. Upon completion of the generate action, the '''[[Tigerstripe_Glossary#Tigerstripe Workbench|workbench]]''' will pop up the '''Generate result''' dialog which shows details of the generation action. Review this information and click on '''OK'''.
 +
 +
<!--
 
=Review the generated code=
 
=Review the generated code=
  
WSDL, XSD and Java files.
+
In the previous step, you generated a service definition. After completing that step, a new directory appeared in the '''[[Tigerstripe_Glossary#Tigerstripe Explorer|Tigerstripe Explorer]]''', called ''target/tigerstripe.gen''. This directory is the default directory where all generated code and files are placed after running the '''[[Tigerstripe_Glossary#Tigerstripe|Tigerstripe]]''' generation engine.
  
In the previous procedure, you generated a service definition. After completing that procedure, a new directory appeared in the Tigerstripe Explorer, called target. This directory is the default directory where all generated code and files are placed after running the Tigerstripe generation engine.
+
In the ''target/tigerstripe.gen'' directory will notice the following:
You will notice the following:
+
  
 
* a .wsdl file that provides a Web Service representation of the modeled Service Contract. In particular, the file contains the definition of the processOrder definition defined.
 
* a .wsdl file that provides a Web Service representation of the modeled Service Contract. In particular, the file contains the definition of the processOrder definition defined.
* a .xsd file that contains message definitions and their payload for a message-based implementation of the Service Contract.
 
 
* a set of Java files that contain the interface for an Enterprise Java Bean (EJB) representing the integration point for your Service Contract. This EJB contains one operation that corresponds to the processOrder operation that you defined in the model.
 
* a set of Java files that contain the interface for an Enterprise Java Bean (EJB) representing the integration point for your Service Contract. This EJB contains one operation that corresponds to the processOrder operation that you defined in the model.
  
Simply stated, you generated a technology specific implementation for three different technologies and maintained a semantic equivalence between them. You used the factory plug-ins for Java, XSD, and WSDL.
+
Simply stated, you generated a technology specific implementation for two different technologies and maintained a semantic equivalence between them.  
  
Note: To further refine your generated code, please refer to the corresponding tutorial that discusses the Tigerstripe plug-in definitions.
+
Note: To further refine your generated code, please refer to the corresponding tutorial '''[[Tigerstripe_Simple_Plugin_Tutorial|here]]''' that discusses the '''[[Tigerstripe_Glossary#Tigerstripe Plugins|Tigerstripe Plugins]]''' definitions.
 +
 
 +
-->
  
 
=Enhance your model=
 
=Enhance your model=
 
Adding patterns to further model the behavior of your Service Contract.
 
 
Tina M. Sharer
 
Designing a simple Service Contract with Tigerstripe Workbench
 
Page 6 of 6.
 
  
 
In this tutorial, you created a very simplistic view of a Service Contract with:
 
In this tutorial, you created a very simplistic view of a Service Contract with:
Line 141: Line 137:
 
* a single operation
 
* a single operation
  
Tigerstripe Workbench allows you to enhance your information model and behaviour related to a service through model artifacts called Entity Artifacts. An entity represents a unique item that exists either logically or physically in the context of a Service. That is, the Entity Artifact is stored with a unique key in a database. An Entity Artifact is represented by the Entity icon (anEntity).
+
'''[[Tigerstripe_Glossary#Tigerstripe Workbench|Tigerstripe Workbench]]''' allows you to enhance your information model and behaviour related to a service through model '''[[Tigerstripe_Glossary#Artifact|artifacts]]''' called '''[[Tigerstripe_Glossary#Managed Entity Artifact|Managed Entity Artifacts]]'''. A '''Managed Entity''' is a unique item that exists either logically or physically in the context of a Service. That is, the '''Managed Entity''' represents an item that is stored with a unique key in a database. '''[[Tigerstripe_Glossary#Managed Entity Artifact|Managed Entity Artifacts]]''' are the means by which these ''Managed Entities'' are described in the Tigerstripe model and are identified by the Entity icon [[Image:Tigerstripe_entity_artifact_icon.png‎]].
  
 
In this procedure, you will define an entity that models orders as they are handled and stored in an Order processing system. You will further define a relationship between your Integration Point (or Service Facade) and your Order entity to define how orders are processed through your service.
 
In this procedure, you will define an entity that models orders as they are handled and stored in an Order processing system. You will further define a relationship between your Integration Point (or Service Facade) and your Order entity to define how orders are processed through your service.
Line 147: Line 143:
 
To create an Order entity:
 
To create an Order entity:
  
* Click the Entity Artifact icon (newEntity). The New Entity Artifact dialog box appears.
+
# Right click on the package containing your Service Facade > New > Entity. The '''New Entity Artifact''' dialog box appears.<br>[[Image:Tigerstripe_new_entity_wizard.png]]
 +
# Enter a name for your new entity artifact.
 +
#* For this tutorial, name your entity artifact ''Order''.
 +
# '''Add''' an attribute for your entity artifact in the Attributes text box. '''[[Tigerstripe_Glossary#Attribute|Attributes]]''' describe the details of an entity.
 +
# Click '''Save'''. The newly created entity appears in your project.
 +
# After you create your entity artifact, you need to create a new Integration Point (or '''[[Tigerstripe_Glossary#Session Facade Artifact|Session Facade]]''')
 +
#* Name your Integration Point ''OrderFacade''.
 +
# Add your OrderFacade under implements field of your Order editor
 +
<!--# Navigate to the '''Details''' tab and define the specific details about your Integration Point.
 +
#* For this tutorial, add the Order entity you created as a Managed Entity. As a result, the Order entity will be managed through your service and consumers of your Service Facade can act upon orders; such as creating orders or deleting orders.-->
 +
# Click '''Save''' to save your changes.
 +
# Click the Generate icon [[Image:Tigerstripe_generate_icon.gif]] and review your generated code. <!--You will notice a new .wsdl file for your new Service Facade and this file contains the operations to create, read, updated, and delete order.-->
  
      newEntityWizard
+
<!--Making the Order entity as a Managed Entity of the OrderFacade Service Facade, the Tigerstripe plug-ins created create, read, update, and delete operations on the resulting web service. This is by default.-->
* Enter a name for your new entity artifact.
+
      For this tutorial, name your entity artifact Order.
+
* Add an attribute for your entity artifact in the Attributes text box. Attributes outline the details of an entity. The newly created entity appears in your project.
+
* After you create your entity artifact, you need to create a new Integration Point (or Service Facade).
+
      Name your Integration Point OrderFacade.
+
* Navigate to the Details tab and define the specific details about your Integration Point.
+
      For this tutorial, add the Order entity you created as a Managed Entity. As a result, the Order entity will be managed through your service and consumers of your Service Facade can act upon orders; such as creating orders or deleting orders.
+
* Click Save to save your changes.
+
* Click the Generate icon (generateIcon) and review your generated code. You will notice a new .wsdl file for your new Service Facade and this file contains the operations to create, read, updated, and delete order.
+
 
+
Making the Order entity as a Managed Entity of the OrderFacade Service Facade, the Tigerstripe plug-ins created create, read, update, and delete operations on the resulting web service. This is by default.
+
  
 
To further control the operations for managed entities:
 
To further control the operations for managed entities:
  
* Navigate to the Order entity.
+
# Navigate to the Order entity.
* Add a process method on the Details tab of the Entity Artifact. On the Details tab, you can control whether create, read, update, and delete operations are enabled or not, and whether additional operations should be generated on your Service Facade.
+
# Add a process method under Methods section of the Entity Artifact. <!--On the Details tab, you can control whether create, read, update, and delete operations are enabled or not, and whether additional operations should be generated on your Service Facade.-->
 
+
# Click '''Save''' to save your changes.
      managedEntityViewOnSession
+
# Click the Generate icon and review your generated code.
* Click Save to save your changes.
+
* Click the Generate icon and review your generated code.
+
  
Congratulations! You've completed your first Tigerstripe Workbench tutorial!
+
'''Congratulations!''' You've completed your first '''[[Tigerstripe_Glossary#Tigerstripe Workbench|Tigerstripe Workbench]]''' tutorial!

Latest revision as of 20:12, 17 November 2013

< To: Tigerstripe_Tutorials

Designing a simple Service Contract with Tigerstripe Workbench

  • Create a New Tigerstripe Project to contain the model.
  • Document the new Project by editing the Project Descriptor.
  • Create a Service End-point Model representing the integration point.

A Tigerstripe Project contains the details of a Service Contract Model. More specifically, it contains the following:

  • A set of Artifacts that define an Information Model and the Behavior Model used in a Service Contract.
  • A Project Descriptor (tigerstripe.xml), used to store additional properties about the project. Such properties can include the project version, description, but can also include properties that are used when generating code.
  • A set of diagrams providing a graphical representation of the Service Contract.

This tutorial will guide you through creating a simple model and the generation of some simple output. (Creation of diagrams is covered in a subsequent tutorial).

To run this tutorial you will need to have installed Tigerstripe Workbench. See the installation tutorial here.

Create a New Tigerstripe Project

Start up Tigerstripe Workbench.

  1. From the File menu, select New and click Project. The New Project: Select a wizard dialog box opens.
  2. Select Tigerstripe Project and click Next. The New Tigerstripe Project dialog box displays.
  3. Alternatively, you can click the Tigerstripe new project icon.gif icon on the toolbar.
    Tigerstripe new project wizard.gif
  4. Enter a name for your project.
    • For this tutorial, the project name is SimpleProject.
  5. Click Finish to create your new project.



Note: Click Help and select Help Contents for more information about other options available.

Document the new Project

Your newly created project should be empty and the descriptor (tigerstripe.xml) for the project automatically opens.

Tigerstripe new project open.gif


The following items should be visible from the Tigerstripe Perspective:

After you create a new project, you need to add some information about your project. This information is used when generating documentation for your project.

To edit project details:

  1. Enter the project version information in the Version text box.
  2. Enter a project description in the Description text box.
  3. Click Save.

Create a Service End-point Model

In Tigerstripe Workbench, a Service Contract is modeled through a set of Artifacts stored in the project. A palette of service artifacts is available to you to model your Service Contract.

There are two main categories of Artifact:

  • Information Model Artifacts. Allows you to capture details about the information model relevant to your Service Contract.
  • Behavior Model Artifacts. Allows you to specify how information is made available through the Service Contract. This information can range from unsolicited notifications to query mechanisms.

In addition, an Integration Point or Session Facade Artifact models an end-point (For example, a Web Service). The next step of this tutorial is to create a simple end-point and generate a corresponding Web Service Definition (.wsdl).

To create an end-point and a Web Service Definition:

  1. Right click on the 'src' folder of your project > New > Session Facade. The New Session Artifact dialog box displays.
  2. Enter the details about your new artifact (the name should start with an upper case letter by convention) and click Finish. The details of the newly created Integration Point or Session Facade Artifact display.
Note: Spaces and special characters are not allowed in an artifact name.

In the Tigerstripe Explorer, expand the src folder and you will see the newly created artifact in the model as shown below:

Tigerstripe facade in ts explorer.png

You now need to add a Method to your Session Facade Artifact. A Method represents an operation available on a Service. An example of a method would be if you wanted to build a Service related to order handling, and you wanted to offer an operation on the Service to process orders.

To add a Method:

  1. Open your artifact editor by double clicking on the Session Facade artifact in Tigerstripe Explorer.
  2. Scroll down to the Methods section, make sure it's expanded, and click on Add.
  3. Enter a Name for your method.
    • For this tutorial, name your method processOrder.
  4. Add a Method argument by clicking Add next to the Argument list.
    • For this tutorial, name your method argument orderNumber and give it a type of int.
  5. Click Save to save your changes.

In the Tigerstripe Explorer you can expand the Session Facade Artifact to show the defined methods.

Generate the service definition

So far, you have created a basic model for a Service Contract and you have identified one single integration point with a single operation. In this step, you will generate a Web Service definition.

In Tigerstripe Workbench, project generation is handled through Tigerstripe Plugins. A plugin defines the rules by which artifacts are rendered in the output, in terms of format (eg HTML, XML, Java) filename, and detailed file content.

Writing plugins is the subject of another tutorial here. At this point you should stop following this tutorial. Create a Tigerstripe plugin project by following the tutorial link and come back to this section once the plugin has been created.


At this point, it's assumed that the user has created a plugin project and deployed it in their Tigerstripe workbench.


To generate code from your model:

  1. Double click the Project Descriptor (tigerstripe.xml) in the Tigerstripe Explorer. This opens your Descriptor editor.
  2. Navigate to the Plugin Settings tab, and click on the section heading for the plugin you have just deployed. This will open up a section where you can manipulate the properties of the plugin.
  3. Check the Enable checkbox so that it will be triggered once you Generate your project. (You can have many plugins enabled at the same time.)
  4. Click Save to save your changes.
  5. Click the Generate icon Tigerstripe generate icon.gif on the toolbar. The Generate Tigerstripe Project dialog box displays.
  6. Click Finish. The other options on this dialog will be mostly greyed out for now and their use will be covered in future tutorials.

Tigerstripe Workbench will then (provided you have followed the instructions above) generate some output files, and will refresh the Tigerstripe Explorer with the new files. Upon completion of the generate action, the workbench will pop up the Generate result dialog which shows details of the generation action. Review this information and click on OK.


Enhance your model

In this tutorial, you created a very simplistic view of a Service Contract with:

  • a single integration point
  • a single operation

Tigerstripe Workbench allows you to enhance your information model and behaviour related to a service through model artifacts called Managed Entity Artifacts. A Managed Entity is a unique item that exists either logically or physically in the context of a Service. That is, the Managed Entity represents an item that is stored with a unique key in a database. Managed Entity Artifacts are the means by which these Managed Entities are described in the Tigerstripe model and are identified by the Entity icon Tigerstripe entity artifact icon.png.

In this procedure, you will define an entity that models orders as they are handled and stored in an Order processing system. You will further define a relationship between your Integration Point (or Service Facade) and your Order entity to define how orders are processed through your service.

To create an Order entity:

  1. Right click on the package containing your Service Facade > New > Entity. The New Entity Artifact dialog box appears.
    Tigerstripe new entity wizard.png
  2. Enter a name for your new entity artifact.
    • For this tutorial, name your entity artifact Order.
  3. Add an attribute for your entity artifact in the Attributes text box. Attributes describe the details of an entity.
  4. Click Save. The newly created entity appears in your project.
  5. After you create your entity artifact, you need to create a new Integration Point (or Session Facade)
    • Name your Integration Point OrderFacade.
  6. Add your OrderFacade under implements field of your Order editor
  7. Click Save to save your changes.
  8. Click the Generate icon Tigerstripe generate icon.gif and review your generated code.


To further control the operations for managed entities:

  1. Navigate to the Order entity.
  2. Add a process method under Methods section of the Entity Artifact.
  3. Click Save to save your changes.
  4. Click the Generate icon and review your generated code.

Congratulations! You've completed your first Tigerstripe Workbench tutorial!

Back to the top