Script based attribute customization in RTC 4.0.3: configuration editor improvements

During a recent review of the Process Enactment Workshop Lab 5 materials in a 4.0.3 test environment I had the opportunity to try some good enhancements and new features in the Attribute Customization configuration editor for script based customizations. I think these enhancements are pretty cool and maybe not as advertised as deserved, so I wanted to blog about them.

The enhancements and new features that I am going to describe are a consequence of the Support for in-place script editing for Script Provider Aspectlets story implemented in RTC 4.0.3.

Configuration UI changes: the first thing that will catch your eye is the new buttons and the blank area for script editing, where in the past you just had a link to download a sample code.


There’s also a small area at the beginning of the Configuration section that displays the result of a simple formal validation. In the previous screenshot, as no script is available yet, the validation of course fails and reports a warning. Anyway the validation is always at most a warning, so you are always able to save your customization and try to use it.

Let’s the review the basic operations you can perform using the new UI and new features …

1. Getting the sample script: this operation is as simple as clicking the “Fill in example” link. This will populate the editor with the contents of the sample script and advertise that the validation is successful (of course!). From that point you can begin to modify the sample script in place or save it for its management with your preferred script editing tool. Note that if the contents of a script based customization were already in place when you ask to load the sample, they will be replaced with these contents; so watch out not to save the changes and overwrite your script! A sample screenshot for the Calculated Value sample:



2. Editing the script: whether based on filled in sample or beginning from scratch, you can type your script contents in the in-place editor. The script contents are evaluated in this editor providing two basic functions:

  • Validation: basic formal validation that a dojo valid unique class name is declared; or when a problem with the script file management occurs. It will also warn you if scripts are not enabled in your instance.
  • Syntax highlighting: as you can see in the previous screenshot, the editor is javascript syntax sensible and provides coloring for easing the development and review of the code

3. Basic operations: the buttons labels are very self-explanatory, but I anyway briefly review their operations here …

  • Load …: allows you to load a script from the file system. Its contents will be displayed in the editor and saving your process configuration changes will save this loaded script as the new script to use for the customization.
  • Save As: allows you to save to file system the script the customization is based on.
  • Revert: basic undo functionality for the local unsaved changes in place editor.

3. Removing a customization: this is not directly part of the Configuration editor improvements, but it’s a good enhancement. Now when you try to remove a script based customization, you are given the choice of removing just the customization definition, or the script that is attachment to your process as well …



Now getting back to the Lab 5 of the Process Enactment Workshop materials, for now they still document the pre-4.0.3 version for which they were initially developed, so consider the following when going through them:

  • When you are instructed to download the script sample and modify it: you have to first click the “Fill in example” and then you can directly follow the lab instructions filling contents in the in place editor, or click “Save As” to edit it from your eclipse workspace.
  • No “Reload” is needed if you edit the scripts in place. Otherwise, you want to do a “Load” to upload the new contents from the file system.

With this brief post I just wanted to provide basic hints and advertisement of this cool improvement, and how to consider it when reviewing the Process Enactment Workshop. Note finally that even in the case when you write your scripts directly in the new editor, you will still want to save your scripts in the file system so you: (a) place them under source control and (b) you reuse them between project areas when no process sharing relationship between them exists.



One thought on “Script based attribute customization in RTC 4.0.3: configuration editor improvements

Leave a Reply

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

You are commenting using your 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