Specifying Transitions for WSRR Promotion

If you’re using the promotion feature of WebSphere Services Registry and Repository (WSRR) to copy content from one registry instance to another on governance state changes, you’ll need to specify which transitions are used for promotion. This is described here. However, what may not be entirely clear are the names to be used for the transitions. These must map to the operation name of the governance transition, and not to the transition name itself. For example, the ‘Plan’ transition of the default governance lifecycle is defined in SACL like this:

<sacl:stateMachineDefinition ...
 targetNamespace="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/governance/DefaultLifecycle">
    ...
    <sacl:transition name="Transition1">
      <sacl:sourceState>InitialState1</sacl:sourceState>
      <sacl:operation name="Plan" portType="_:DefaultLifecycle"/>
      <sacl:targetState>State1</sacl:targetState>
    </sacl:transition>

Therefore, the transition is defined like this in the Promotion Properties:

  <transitions>
    <transition
     name="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/governance/DefaultLifecycle#Plan">
     ...
    </transition>
  </transitions>

Note the use of Plan rather than Transition1.

Thanks to Steve Groeger and Martin Smithson for their help with this tip.

Advertisements

Looking up Governance States in WSRR using WebSphere ESB

Let’s say you want to use the Endpoint Lookup primitive in WebSphere ESB to lookup an endpoint stored in WebSphere Services Registry and Repository (WSRR), but matching against the governance state of the endpoint. For example, you might want to only lookup endpoints which are in the ‘Managed’ state – i.e. they are deployed and ready to work with. How would you do this?

Well, in WebSphere ESB, when you’re specifying the properties of Endpoint Lookup primitive, you get the ability to specify Classifications. These are matched against Classifications in WSRR – including the governance state.

For example, let’s assume that we’ve loaded a WSDL document into WSRR and already transitioned it into the ‘Managed’ state. We’ve specified most of the properties for the Endpoint Lookup primitive already, such as the interface we are looking up. We now need to know what the syntax is for the Classification that we’re going to use. In WSRR, we go to the Configuration perspective in the admin console. Then we navigate to Active Configuration Profile / Classification Systems. We select Life Cycle Classifications and then click Edit. This should look like this:

Now click on Classes, expand out the tree, and you should see something like this:

Click on Managed and you’ll get to see the Class ID:

This is the important value, because this is the value that you’ll need to specify as a classification in your Endpoint Lookup primitive:

Now, when the lookup is performed, only endpoints in the Managed state will be returned.

Note: The classifications are logically ANDed together: if you specify multiple ones, the endpoint must match all of the classifications.

Thanks to Andrew Borley, Bernard Kufluk and David Bell for help with this tip.