Extending processor state and its property

To extend the processor state and its property, do the following:
  1. Create a new class extending com.ibm.btt.automaton.DSEState, which is located in bttcore.jar.
    1. Add bttcore.jar to the build path of your project:
      Screen caputre showing how to add bttcore.jar to the build path of your project
    2. Right-click your project, and select New > Class. The New Java™ Class dialog box pops up. In the Package field, click Browse to select a package. In the Name field, enter the name of this new class. In the Superclass field, enter com.ibm.btt.automaton.DSEState. Click Finish. The class is created. See the following screen capture:

      Screen capture showing the New class dialog box.

  2. Open btt.xml file, and find the processors section and add the following code to the classtable configuration:
    field id="newState" value="package.NewState" /

    Screen capture showing the code that should be added to the classtable configuration

    Note: By default the btt.xml file is located in $D(RAD)\pluginscom.ibm.btt.tools.transaction.dominate_6.1.2\config. You can also configure the btt.xml using the Deployment Description Editor tool. For more information, see .
  3. If your Transaction Editor is opened before you define the extensions, right-click any blank space in the editor and select Reload BTT Global Settings in the pop-up menu so that your changes can be applied.
  4. To extend the property of the processor state, add the following code to the class you created:
    import com.ibm.btt.annotation.ATTR; 
    @ATTR( { "newProperty1#String#REQUIRED","newProperty2#String#IMPLIED"}) 
    where:
    • newProperty1 is the property name;
    • String is the property type;
    • REQUIRED refers to if the property is required or implied.
    • By default, the properties of the parent class are extended. If you do not want to extend the properties of the parent class, you can add the configuration as follows: @EXTEND("no").
Following is the code sample after you extend the processor state and its property:
package btt;

import com.ibm.btt.automaton.DSEState;
import com.ibm.btt.annotation.ATTR;  
@ATTR( { "newProperty1#String#REQUIRED","newProperty2#String#IMPLIED"}) 
public class myState extends DSEState {

}
And the Properties view is also updated to reflect your changes. The following screen capture shows the Properties view after you add two new properties to the :
Screen capture showing the Properties view after you add two new properties