Property Converter 2 Component

I had a meeting with a customer last week and introduced the Property Converter component to them and it quickly became a design discussion.  The result was, I took the OpenNTF project and implemented these changes.  The result is a new hidden component that can have N number of properties defined and you can attach a script (JavaScript) to each of those properties to do transformations or string manipulations.  The other modification is both the new and the old component now stores the scripts in the component data (which now transports with the composite application).  This should greatly reduce the amount of Java code and custom actions many people do to manipulate strings (properties).  This also means any time you need a new transformation you simply create a new property.

Once I get the legal approvals I will be submitting this back to OpenNTF.

New features:

PropertyConverter

  • Now saves the script with the component.
  • Now uses the new API’s for tooling in the CAE
  • The Save button and text field is hidden/readonly in the runtime
  • Test button now publishes the value to the property broker.
  • Added it to the CAE palette under “OpenNTF” category

PropertyConvert2 – brand new component

  • Based on the original concept but allows N number of properties to be created.
  • Each property is associated with its own script.
  • All scripts and properties are stored with the component in the CA.xml
  • The test button publishes the property.
  • Added it to the CAE palette under “OpenNTF” category

Here is a sample of the components in the run time (can be Notes or Expeditor) – realistically these would be hidden so they would be more like service level components.  The red lines show the flow of the wiring and I used a basic web browser component to display the resulting text.  You can imagine these components are hidden and you would only have your normal application components visible and these components doing the transformation.

(click on image to make larger)

propertyconvert2-runtime

Components in the CAE:

Notice the Save buttons and the script is now enabled for editing.  The component “knows” when it is in edit mode and allows the assembler to modify scripts and add properties.

(click on image to make larger)

propertyconvert2-cae

4 thoughts on “Property Converter 2 Component

  1. Very cool!
    An idea for a new feature could be support for Javascript-Java calls, e.g. to provide some tool libraries for the Javascript runtime. For example to dump information like a history of past properties to a textfield or write something in the status bar of the client.

    Like

  2. Another feature I thought would be good for this plugin was the ability to script whether or not a property is fired. Currently, the PropertyConverter always assumes you are going to pass the property value through, with some kind of transformation, but what if you wanted to only allow properties whose values fit a certain pattern to be fired? Ex: only fire phone# property if the phone # is in a certain area code, or only international phone #’s.

    Like

  3. And while we’re at it, another interesting feature: The ability to combine multiple input properties and fire on a particular output property. Ex: A host system’s Account Info screen has last name, first name and MI on 3 separate fields. When you land on Account Info, combine the LName, FName and MI into a single string, formatted like “, “, and push this onto a wire that is connected to a ‘full name’ field on a web page.
    This is getting pretty advanced, but I could see the value of being able to do this kind of thing without having to create a new plugin.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s