Scribble.orgCommunity Documentation

Chapter 2. Choreography Description Designer

2.1. Choreography Concepts
2.1.1. Type Definitions
2.1.2. Activities
2.1.3. Expressions
2.1.4. Choreography Session Identity
2.1.5. Structure
2.2. Creating a new Choreography
2.3. Monitoring a Choreography
2.3.1. Configuring the Project
2.3.2. Running the Monitor
2.4. Semantic Annotations
2.4.1. Using Semantic Annotations
2.4.2. Customizing Semantic Annotations
2.5. Importing
2.5.1. WS-CDL
2.6. Exporting
2.6.1. WS-CDL
2.6.2. HTML
2.6.3. Service Description
2.7. Preferences

This section presents the different components that can be found in the Choreography Description. Although most of the concepts are very similar to their WS-CDL counterparts, some of the concepts are not directly related. Therefore, where necessary, the mapping between a Choreography Description component and its equivalent WS-CDL syntax will be explained.

The type definitions are primarily defined on the Base Types tab of the Choreography Description Designer. However the Role Type, Behavior and Relationship Type components can also be created using the Roles and Relationships tab.

Each of the different types will be discussed further in the following sub-sections.

As mentioned above, the Relationship Type represents a static association between two Role Types. The Channel Type represents a more dynamic concept. If a channel is thought of as a connection between a client and server, then the Channel Type only defines the Role Type associated with the server.

This enables the structure of the communication channels between the related participants to be dynamically changed during the course of a transaction. For example, a channel can be established from Role A to Role B, and then the participant acting as Role A could send its 'client' end of the channel to another participant (e.g. Role C). From this point, Role C can continue to communicate with Role A using the same channel instance. In this example, there would also need to be two Relationship Types, one from Role A to Role B, and another from Role C to Role B, to declare from a static perspective that these roles can communicate.

Therefore Channel Types are defined to support a more dynamic re-configuration of the communication paths between the participants in a conversation.

A Channel Type can define a set of restrictions on the use of its channel instances. These restrictions can include defining the types of communications that can be conducted over the channels, or limiting which other channels can be passed across an instance of this Channel Type. These restrictions can be statically checked to ensure that the choreography has used the instances of the channel type correctly.

The properties of the channel type are:

PropertyDescription
NameThe name of the channel type
DescriptionLonger descriptive text to explain the purpose of the type within the choreography
ActionThis property defines whether the channel type supports "request/response" or just "request" or just "response" messages
Role TypeThis property identifies the destination role type associated with the channel type - this role type is effectively the provider of the service
BehaviorThis field defines the optional behavior, within the identified role, that this channel type is associated with
Reference TokenThis field identifies the type of the service endpoint reference
UsageThis field identifies the permitted usage pattern for the instances of this channel type - "once" means that only a single interaction can be performed on a channel instance, "unlimited" means that it can be used any number of times

Within a complex choreography, that has multiple channel instances (whether the same or different channel type), it is necessary to ensure they each have their own identity. It is also important to understand how these many channel instances relate to each other within a particular choreography session instance.

The information required to derive the identity of a channel instance is defined using the 'Identity' element(s) under the channel type. This mechanism is described further in another section.

The Channel Type can declare restrictions on the channels that are passed (within an interaction) across an instance of this channel type. These restrictions are defined by creating a 'Passed Channel Details' element under the channel type. The properties for this element are:

PropertyDescription
NameThe name of the channel type
DescriptionLonger descriptive text to explain the purpose of the passed channel restrictions
ActionThis property defines whether the channel type can be passed within both a request/response, or only in either a request or a response
ChannelThe channel type being passed
NewWhether the passed channel is being created, and the 'client' end of this new channel is being passed to enable the other end of the current channel instance to be able to 'callback' the participant sending the passed (newly created) channel instance

A Token is simply an alias for a piece of information of a particular type.

A Token Locator is a means of extracting a piece of information (aliased by a token), from a complex data type (e.g. a message).

We may have two or more data types that all contain a particular piece of information (such as an id). If we wish to refer to the piece of information in a consistent manner, regardless of the different data types, then we need a way to reference this field using an appropriate alias.

Therefore, the first step is to declare a token to represent the generic piece of information we are interested in. The Token element has a name property to uniquely identify the token, a description property and finally a reference to the Information Type appropriate for the Token.

The next step is to define a Token Locator to describe how the information related to the token can be extracted from an Information Type (representing the complex data type) that contains this field. One token locator would be required for each combination of token and data type that contains the token field. The locator has properties:

PropertyDescription
DescriptionLonger descriptive text to explain the purpose of the token locator
Information TypeThe information type that is being examined to retrieve the information associated with the token
PartIf the information being examined to extract the token field is a WSDL1.1 message, then this optional part name can identify the appropriate part of a multipart message
QueryThe XPath expression used to extract the field from the source information
TokenThe token representing the data to be extracted

The list of activities within the choreography description are described in this section.

The Assign activity provides the mechanism for assigning values to one or more variables, within an atomic unit. This means that if a failure should occur during this assignment activity, then the activity will undo any work it has already done, leaving the state as it was prior to the activity commencing.

The result of an assignment, where the source information is unavailable (see isVariableAvailable function), is undefined. A Conditional or When activity, used in conjunction with the isVariableAvailable function,can be used to ensure this does not happen.

The Assign activity requires an associated role type. This role type indicates at which role the assignments are being performed. The role type can be selected from a dropdown list, which will contain any role types that have been defined within the Choreography Description:

The next step is to define the information associated with each variable that is being assigned. This is achieved by creating a new 'Copy Details' element, under the assign component, for each variable being assigned:

The properties for this 'Copy Details' element are described in the table below:

PropertyDescription
NameShort name for this component
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
Source ExpressionThe XPath expression used to derive the value that will be copied into the target variable - if a source expression is defined, then the following source variable field should not be specified (i.e. these fields are mutually exclusive)
Source VariableThe source variable whose value will be copied into the target variable - if a source variable is defined, then the source expression field should not be specified (i.e. these fields are mutually exclusive)
Source Variable PartIf a source variable is specified that represents a WSDL1.1 multipart message, then this field can be used to specify the relevant part name
Target VariableThe target variable into which the copied value will be assigned
Target Variable PartIf a target variable is specified that represents a WSDL1.1 multipart message, then this field can be used to specify the relevant part name
Cause ExceptionIf this field is specified, then this copy statement is intended to cause an exception (of the type defined by the value within this field) to be raised

The Finalize activity is used to initiate the finalization handling for a choreography that has previously been performed (using the Perform activity).

The finalization details are defined with the following properties:

PropertyDescription
NameShort name to identify the finalize activity
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
ChoreographyThis property defines a reference to the enclosed choreography that is being finalized - and can be selected from a dropdown list
Choreography Instance IdThis property is an optional XPath expression, and can be used to identify a specific instance of the choreography to be finalized, in cases where multiple instances of this choreography have been performed
FinalizerThis property references the finalization handler that is to be used within the enclosing choreography

The Interaction activity is the main activity that represents the communication between the various participants and roles defined within a choreography.

Unlike most business process specifications, which identify the act of communication from a particular endpoint's perspective using a send or receive primitive, the choreography is defined from the global perspective. Therefore the Interaction activity encapsulates both the sending of messages and the subsequent receiving of these messages as a single concept. This ensures that both endpoints nvolved in a communication are correctly synchronized.

The Interaction defines the following properties:

PropertyDescription
NameA short name used to describe the interaction
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
AlignThis is a boolean property that indicates whether the result of this interaction should be aligned at the communicating endpoints - i.e. they both agree that they have the same resulting state before the interaction completes
Channel VariableThis is the reference to the variable that represents the channel instance on which to communicate
InitiateThis is a boolean property that indicates whether this interaction is responsible for initiating the choreography
OperationThe operation name, which should be valid for the receiving role type's behavior
RelationshipThe relationship type associated with this interaction
Timeout "From" Role Type Record DetailsWhenever a timeout occurs, the record details associated with this list will be performed at the 'from' role type
Timeout "To" Role Type Record DetailsWhenever a timeout occurs, the record details associated with this list will be performed at the 'to' role type
Time To CompleteThis field identifies the duration to wait for the interaction to complete, and if it does not complete during the specified time interval, then a timeout should occur

Associated with the interaction is one or more exchange elements. These elements provide the details of the messages that will be exchanged between the two roles involved in the interaction. The properties associated with an 'Exchange Details' element are:

PropertyDescription
NameA short name used to describe the exchange
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
ActionThis field identifies the direction of the message, whether it is a 'request' from the 'from role' to the 'to role', or a 'respond' message in the opposite direction, which may be a normal message or a fault
Fault NameThis optional field identifies the name of the fault associated with this exchange
Receive Cause ExceptionThis optional field is used to indicate the type associated with an exception that is raised at the receiving role, related to the direction of this exchange
Receive Record DetailsThis field provides a list of 'Record Details', associated with the same interaction, that are triggered in the receiving role
Receive VariableThis field identifies the optional variable that will contain the information received as part of the exchange
Receive Variable PartIf a receive variable is specified that represents a WSDL1.1 multipart message, then this field can be used to specify the relevant part name
Send Cause ExceptionThis optional field is used to indicate the type associated with an exception that is raised at the sending role, related to the direction of this exchange
Send Record DetailsThis field provides a list of 'Record Details', associated with the same interaction, that are triggered in the sending role
Send VariableThis field identifies the optional variable that contains the information being sent as part of the exchange
Send Variable PartIf a send variable is specified that represents a WSDL1.1 multipart message, then this field can be used to specify the relevant part name
TypeThis field identifies the information type for the information being exchanged

The 'Record Details' define information that must be assigned to variables as a result of an exchange occurring. The properties associated with this element are:

PropertyDescription
NameA short name used to describe the exchange
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
Cause ExceptionThis optional property indicates the type of exception that will be raised on the occurance of this record
Source ExpressionThis property defines the source XPath expression that will identify the value to be recorded. This field is mutually exclusive with the source variable field
Source VariableThe source variable whose value will be copied into the target variable. If a source variable is defined, then the source expression field should not be specified (i.e. these fields are mutually exclusive)
Source Variable PartIf a source variable is specified that represents a WSDL1.1 multipart message, then this field can be used to specify the relevant part name
Target Variable The target variable into which the copied value will be assigned
Target Variable PartIf a target variable is specified that represents a WSDL1.1 multipart message, then this field can be used to specify the relevant part name
WhenThis property identifies at what point the record statement should be performed in relation to the exchange it is associated with. It can have three values: before record before the exchange occurs, after record after the exchange occurs, or timeout record if a timeout occurs

The Perform activity is used to indicate that the activities within a referenced choreography should occur at this point.

This mechanism supports the modularization of choreographies into reusable entities. The perform activity can refer to choreographies that are either directly defined within the performing choreography, or that are defined at the top level of the Choreography Description.

To provide the greatest reuse of choreographies, the Perform activity provides the optionally capability to bind variables within the performing choreography with variables in the performed choreography. To achieve this binding, the variable in the performed choreography must be defined as a 'free' variable. This means that it has no direct storage of its own, but instead maps onto the storage of a variable contained within an enclosing choreography.

The properties associated with the Perform activity are:

PropertyDescription
DescriptionDescriptive text to explain the purpose of the activity within the choreography
ChoreographyThis property defines a reference to the choreography that is being performed - and can be selected from a dropdown list
Choreography Instance IdThis property is an optional XPath expression, and can be used to identify a specific instance of the choreography to be performed, in cases where multiple instances of this choreography will be performed and later finalized
Wait For CompletionThis property determines whether the performing choreography should wait for the performed choreography to complete, before preceding to the next activity

The variable binding information is specified in an element contained within the Perform activity, called the 'Bind Details', with the following properties:

PropertyDescription
NameShort name for this component
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
'This' VariableThis property defines the variable, within the performing choreography, that will be bound
'Free' VariableThis property defines the variable, within the performed choreography, that will be bound

The When component within the Choreography Description is used to describe a synchronization point where the choreography is dependent upon a predicate (condition) being true. If the information referenced within the condition is not available, then the condition will block until the information becomes available. At this point the predicate will be evaluated to determine if it is true, and if not the activity will continue to block until the predicate becomes true.

The When component has an optional 're-evaluation' condition, which is evaluated after all of the activities within the 'when' component have completed, to determine whether the conditional expression (associated with the 'when' component) should be evaluated again. This provides the ability for the When component to be repeated multiple times - each time being synchronized based on the expression associated with the 'when' component.

The semantics of the when component can be written as:

where C represents the condition and R represents the optional 're-evaluation' expression. The activities in the body of the When component are only performed if the condition C evaluates to true. Then the condition is only re-evaluated if R is either not specified, or evaluates to true.

Properties associated with this component:

PropertyDescription
NameShort name for this component
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
ExpressionThe XPath expression representing the predicate on which this 'when' component is synchronized
Re-Evaluate ConditionThe XPath expression to determine if the 'when' condition should be re-evaluated after the iteraction has completed

The When component is mapped onto the WS-CDL workunit activity. The syntax of a workunit is:

The expression field of the When component is mapped onto the guard attribute of the workunit, and the re-evaluation condition is mapped onto the repeat attribute.

The block attribute on the workunit will be set to 'true', as the When semantics require the condition to block until all of its information is available, and the predicate evaluates to true. The non-blocking semantics are described by the While activity.

The While component within the Choreography Description is used to describe a repetition that is dependent upon a condition being true. The condition is evaluated prior to performing each iteration of the activities contained within the scope of the While component.

What makes the semantics of the while component slightly different from a normal 'while' construct in a programming language, is that after an iteration has been performed, an optional 're-evaluation' condition can also be specified, to determine whether the conditional expression (associated with the while component) should be evaluated again. This provides the ability to break out of the repetition without unnecessarily complicating the while condition.

The semantics of the while component can be represented using the following:

where C represents the condition and R represents the optional 're-evaluation' expression. Each iteration only proceeds if the condition C evaluates to true, and the condition is only re-evaluated if R is not specified or also evaluates to true.

Properties associated with this component:

PropertyDescription
NameShort name for this component
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
ExpressionThe XPath expression to determine if the repetition should occur
Re-Evaluate ConditionThe XPath expression to determine if the repetition condition should be re-evaluated after the iteraction has completed

The While component is mapped onto the WS-CDL workunit activity. The syntax of a workunit is:

The expression field of the While component is mapped onto the guard attribute of the workunit, and the re-evaluation condition is mapped onto the repeat attribute.

The block attribute on the workunit will be set to 'false', as the While semantics do not wait for information to be available, or require the condition to be true before proceeding. The blocking semantics are described by the When activity.

Within expressions defined in a choreography, it is possible to make use of a set of pre-defined functions which are prefixed with the letters "cdl:". The list of these choreography description language functions are:

any getChannelIdentity(string varName)
        The function can be used to return the identity information associated with a channel instance.
 
 
any getChannelReference(string varName)
        The function can be used to return the endpoint reference information associated with a 
        channel instance.
 
 
date getCurrentDate(QName roleName)
        The function can be used to retrieve the current date. This function will be performed
    locally at the role identified by the roleName parameter.
 
 
dateTime getCurrentDateTime(QName roleName)
        The function can be used to retrieve the current date and time. This function will be
    performed locally at the role identified by the roleName parameter.
 
 
time getCurrentTime(QName roleName)
        function can be used to retrieve the current time. This function will be performed locally
    at the role identified by the roleName parameter.
 
 
any getVariable(string varName, string part, string documentPath, QName roleName?)
        The function can be used to obtain the information associated with a named variable. If the
    variable is a WSDL1.1 message, then it will also be necessary to identify the part of the message
    that should be retrieved.
 
 
boolean globalizedTrigger(string expression, string roleName, string expression2, string roleName2, ...)
        function provides a mechanism to describe, within a single activity expression, a list
    of distinct sub-expressions that should be projected to different roles associated with
    the activity. This enables the choreography designer to determine what relevant expression
    is required at the different roles, to ensure that those roles take the same path within
    the global choreography.
 
 
boolean hasDeadlinePassed(dateTime deadlineTime, QName roleName)
        The function can be used to determine whether a particular deadline time has passed.
    Generally this function will be used within the When activity as part of the blocking
    condition, to cause the choreography to wait for the impending deadline. It may also be
    used within the 'complete' condition for a choreography, to ensure that the choreography
    finishes before the specified time.
 
 
boolean hasDurationPassed(duration elapsedTime, QName roleName)
        The function can be used to determine whether a particular time interval has passed.
    Generally this function will be used within the When activity as part of the blocking
    condition, to cause the choreography to wait for the duration. It may also be used
    within the 'complete' condition for a choreography, to ensure that the choreography
    finishes within the specified duration.
 
 
boolean isVariableAvailable(string varName, QName roleName)
        The function is used to test whether a variable has been populated with some information.
    This is required to guard against the use of an unset variable in an invalid situation.
    If an unset variable is used within the When activity, the activity will block until the
    variable is set. However, in other cases the use of such a variable is undefined.
 
 
boolean variablesAligned(string varName, string withVarName, QName relationshipName)
        The function is used to determine whether two variables, at different roles (associated
    with a relationship), have 'aligned' values. Alignment means that there has been agreement
    that the two variables have the same value.
 
 
boolean hasExceptionOccurred(QName exceptionType)
        The function returns "true" if an exception of the type identified by the parameter
    exceptionType has occurred. Otherwise it returns "false".
 
 
boolean hasChoreographyCompleted(string choreoName, string choreoInstanceId?)
        The function returns true if the performed choreography associated with the parameter
    'choreoName' and OPTIONAL choreoInstanceId has a status of completed (whether successfully
    or not). If choreoInstanceId is not specified, the function will evaluate whether all
    performed choreographies, with the supplied name, have completed. If the named choreography
    has not been performed, prior to this function being called, it will return false.
 
 
string getChoreographyStatus(string choreoName, string choreoInstanceId?)
        The function returns the current status associated with the identified choreography and
    OPTIONAL choreoInstanceId . If choreoInstanceId is not specified, then there MUST only be
    a single instance of that performed choreography in the scope of the current choreography
    that is checking the status, otherwise a status of 'ambiguous' MUST be returned. The values
    of the status can be 'enabled', 'completed-successfully', 'completed-unsuccessfully',
    'closed', 'ambiguous', or 'instance-unknown'. The 'instance-unknown' status is encountered
    when this function is invoked and when the choreography has not been enabled.

XPath is a standard notation for querying information in an XML document. Although XPath defines many constructs for accessing this information, we have introduced the most useful features below.

If you would like to read more information about XPath, then the specification can be found at: http://www.w3.org/TR/xpath.

Primarily, XPath is an expression language for locating information within an XML document. Therefore the language provides a way to describe how to navigate the hierarchical nodes and determine which attribute, text field or node-set should be returned. The following table provides a subset of the possible accessors that can be used - refer to the XPath specification for more details. This table describes the abbreviated form of the locators, as this form is more compact:

This section discusses how channel instances are identified within the context of a choreography session.

This is important, as it enables messages to be correctly associated with the appropriate choreography session and channel instance, and it also enables an association to be established between multiple independent channel instances, to correlate them to the same session.

The Identity element is created as a child element of a Channel Type. The identity consists of one or more Token elements, which locate the specific parts of the composite identity information from a particular message (using Token Locators where appropriate).

The identity element has an associated type, which indicates its purpose in relating instances of the channel type to the choreography session. These types are:

The choreography is the main construct that groups a set of interactions into a meaningful business transaction. Choreographies represent a module that can be reused by other choreographies, using the Perform activity, enabling more comprehensive business protocols to be assembled from simplier protocol units.

The choreography has the following properties:

PropertyDescription
NameShort name for the choreography
DescriptionLonger descriptive text to explain the purpose of the choreography
Completion ConditionThe optional XPath expression used to determine when this choreography can be prematurely completed in a successful state
CoordinatedWhen set to true, this property indicates that all participants involved in the choreography will be coordinated so that they all complete at the same time, and with the same status
IsolationWhen this boolean property is set to true, it means that modifications made within the scope of this choreography, to bound variables in the performing choreography, will not be made visible until this choreography has successfully been completed - it also means that the enclosing and sibling choreographies will block when accessing those variables, until the isolated choreography has completed
RelationshipsThe optional list of relationship types that are associated with the choreography - if not defined, then the choreography will be implicitly associated with all relationship types
RootThis boolean property identifies whether this is the root choreography - only one top level choreography can be declared as root, which identifies it as the entry point into the set of choreographies included in the CDL package

Variables are used by a choreography to represent state information and channel instances. A choreography may require state information to be explicitly modeled and recorded in order to make a decision as to which path to take. A choreography that models only the observable interactions, without making any internal state visible, still needs to represent the channel instances on which interactions are performed.

The properties associated with a variable declaration are:

PropertyDescription
NameThe variable name
DescriptionLonger descriptive text to explain the purpose of the activity within the choreography
FreeWhen set to "true", specifies that the Variable must be bound to an equivalent (i.e. same type) variable within an enclosing choreography - this variable cannot be used in its own right without being bound
MutableWhen set to "false", specifies that the Variable information cannot change once initialized
Role TypesThis property represents the optional list of role types associated with the variable - if no list is provided, then the variable will be declared at all roles associated with the choreography
SilentThis property, if set to "true", indicates that the manipulation of the value associated with this variable is non-observable, i.e. it is modified within the internal implementation of the respective choreography participants
TypeThis property identifies the type of the variable - either an information type or channel type

Free variables can simply be thought of as links to real variables that have been declared in an enclosing (performing) choreography. This link is established when the enclosing choreography performs the current choreography and provides the necessary binding details to link the concrete variable with the free variable. These bound variables must be compatible in terms of type.

Silent variables can be used to define an expression in the choreography description that is based on information whose value is only known to the implemented endpoints. These variables will have their values modified by the internal implementation of an endpoint, and therefore it cannot be expressed in observable activities within the choreography.

To create a new Choreography Description, the first step is to locate the folder in which the file will be created. Once this folder has been found (or created), the user should select the 'New...' menu item (on the context menu), as follows:

The user should select the 'Other...' menu item from this menu, which will cause a wizard to be displayed with the various items that can be created. Within the list, there is a sub group with the title 'SOA'. This group contains an entry called 'Choreography Description' that should be selected:

The user should then press the 'Next' button to see the following form:

This form enables the user to select both the folder, within which the new Choreography Description should be created (defaults to the folder previously chosen when invoking the context menu), and the name of the choreography description (by default this is My.cdm).

From version 1.7.0, the new choreography description wizard also enables the main details associated with the top level choreography package to be preconfigured. When the filename is changed, the portion of the name without the .cdm is used to automatically update the Description, Choreography Name and Target Namespace fields. The initial portion of the target namespace can be changed within the preferences for the choreography designer.

When the 'Finish' button is pressed, a new Choreography Description file (with the specified name) will be created in the nominated folder. The Eclipse workbench will then switch into the Choreography perspective (a configurable layout with the appropriate windows required for the pi4soa tools) and an editor will automatically be opened for the newly created Choreography Description.

Monitoring a choreography requires the configuration of the project, in which the choreography to be monitored is located, to enable the monitor to receive service tracker information from the relevant target platform.

Due to the specific configuration details required for each target platform, this section will provide the information required for a specific platform (JBoss) as an example.

The configuration information for the monitor is contained within the pi4soa.xml file, located in the project's classpath. If this file does not already exist, then one needs to be created. The contents for a JBoss/JBossESB based project would be:

The information under the container node represents the configuration of the execution runtime within the Eclipse environment, showing that the client (launched when performing a service test) will report information to the service tracker.

The information of interest to the monitor is defined within the tracker node. This defines the JNDI and JMS configuration properties required by the monitor to listen for service tracker events on a JMS bus.

To monitor a choreography, select the Choreography->Monitor menu item from the context menu associated with the choreography file. This will launch the monitor GUI, and proceed to load the choreography description. If the monitor is unable to load the choreography, or has problems establishing a connection to the service tracker (i.e. JMS topic in the example configuration above), then an error will be reported.

The choreography monitor has three main display areas.

  1. The left hand panel is the tree showing:
    • Issues - these show the entries related to 'unexpected messages', 'errors' and 'warnings'. The errors and warnings can be system or user generated using the 'error' or 'warning' methods on the ExtensionContext (see developer documentation). Selecting one of these transactions will focus the monitor on the issues in that category.
    • Sessions - the list of choreography sessions being monitored. Selecting a session from the list focuses the monitor on that session.
    • Channels - the list of channels associated with the choreography. Selecting a channel from the list, focuses the monitor on all events associated with that channel.
  2. The top right panel shows the list of service tracker events associated with the current focus (as selected in the left hand tree). If no specific entry is selected, then all service tracker events (for all sessions) will be displayed.
  3. The bottom right panel shows the details related to a service tracker event selected from the top right hand panel.

Semantic annotations are a means of associating additional structured or freeform semantic information with a component in the choreography description model.

It is possible to customize the templates and presentation style sheets associated with the pi4soa tool suite. The set of available annotation templates and presentation details are defined within a file called 'annotations.xml', located in the annotations folder of the org.pi4soa.common plugin.

An example of the contents of this file is:

The 'type' attribute on the annotation element defines the name that can be selected from the 'defined annotation' list by the user. The component attribute represents the Java class or interface to which the annotation can be applied. In this case, the 'org.pi4soa.cdl.StructuralType' represents all of the grouping constructs in the Choreography Description Model.

The W3C Web Service Choreography Description Language, or WS-CDL for short, provides a standard notation for describing the collaborative peer-to-peer interactions between a set of cooperating services. These services could be actual 'web services', or any form of SOA based service - i.e. WS-CDL is not bound to web services, although generally WSDL will be used to describe the abstract interface of a service.

As with most XML based notations, WS-CDL is not very easy to read or modify, without a detailed understand of the syntax and semantics of the specification. Therefore the pi4soa project provides a set of higher level tools which aim to make it easier for a user to understand business protocols, specified in WS-CDL, as well as modify and enhance them.

To enable the pi4soa tools to provide these usability benefits, it is necessary to convert the detailed XML representation associated with a WS-CDL document, into a higher level object model on which the pi4soa tools can effectively operate. Therefore it is necessary to import WS-CDL documents into the internal object model representation used by pi4soa tools.

First step is to decide which folder should be used to store the imported CDL model. Once selected (or created), then select the 'Import...' menu item (available on the context menu for the folder).

This will show an import wizard that will offer a list of possible items that can be imported. From the list, select the entry 'Import Choreography Description from WS-CDL' and press the 'Next' button. This will cause the wizard to present a form as shown in the following image:

The fully qualified name of the file containing the CDL document should be entered into the text field. A 'Browse' button is provided to enable the user to search the file system for the appropriate file.

Once the file name has been entered, press the 'Next' button to import the CDL. This will cause the CDL document to be validated. If there are any errors that prevent the CDL being imported, these will be displayed in the subsequent form:

If this window shows any errors, then the 'Finish' button will remain disabled and the user will only be able to cancel the task. However, if no errors have been detected, then the 'Finish' button can be pressed to cause the imported CDL document to be saved within the selected folder. The name of the imported CDL package will be used to name the file within the folder, followed by a '.cdm' extension.

First step is to decide which CDL file will be exported. Once chosen, then select the 'Export...' menu item (available on the context menu for the file).

This will show an export wizard that will offer a list of possible items (and formats) that can be exported. From the list, select the entry 'Other -> HTML' and press the 'Next' button. This will cause the wizard to present a form. This form contains a text field that should be used to enter the fully qualified name of the file into which the exported Choreography Description (html) should be stored. The user can press the 'Browse' button to search the file system, or enter the name directly.

If the selected file already exists (as shown in the image above) then the user will be asked if they wish to overwrite the current contents within the file. If they select 'No', then an error message will be shown at the top of the window.

When a valid file name has been entered, where permission has been given to overwrite the file (if it already exists), then the 'Finish' button will be enabled for the user to press. Once pressed, then the Choreography Description will be exported to its HTML representation.

The template used during the export of the choreography to HTML can be found in the org.pi4soa.cdl plugin installation directory, under the "templates/html" directory. The templating technology used is Apache Velocity. These templates can be customized by the user to change the contents or format of the exported documents. Other formats may be supported in the future.

The preferences for the Choreography Designer can be found on the Window->Preferences... menu item. The Choreography item has a Designer child node, that presents the following options:

The namespace prefix is used to prefix the target namespace associated with any newly created choreography descriptions (i.e. shown within the new choreography description wizard). This value, along with the name of the choreography, will also be used to define the value of the 'tns' prefixed org.pi4soa.cdl.NameSpace component within any new choreography descriptions.

The 'Include XML Schema' checkbox determines if newly created choreography descriptions should include a org.pi4soa.cdl.NameSpace component for the 'xsd' prefix, referencing the XML schema URI. This checkbox indicates the default value, which will be used by the new choreography description wizard, enabling the decision on whether the XML schema should be included to be choreography description specific.

The 'Enable Inference' checkbox determines if inference rules should be applied by the choreography designer. These rules aim to speed up creation and modification of choreography descriptions. However, if these rules are not desired, then they can be disabled.