> > > Version 2 Rulesets :: What Works and What Doesn’t

Version 2 Rulesets :: What Works and What Doesn’t

22nd December 2016

Cleo Clarify version 2 ruleset

With the release of Clarify 4.6 users now have the option to use Version 2 Rulesets and take advantage of the the new transformation engine

Users might be told they need to re-do their rulesets from scratch but that is not possible/feasible in most cases. We will show users how they can convert their rulesets on their own.


Copy Ruleset


Open up the ruleset in the text editor and add the following text on the first line:

#content/*ruleset 2 */

See example below:

Cleo Clarify version 2 ruleset header with content tag


Once #content/*ruleset 2 */ is added and the ruleset is saved, users will see MANY, MANY errors, like below:

Cleo Clarify version 2 ruleset errors in file editor

These errors can be easily cleaned up when we analyze the examples above. For example

SetToEmptyString().execute()  is replaced with RawMove().execute(“ ”)

MoveWithTrim() is replaced with Move()

HasContent() is replaced with IsNotNull()

In most cases users can perform a search/replace to make the needed updates. there are cases where a manual update will be needed. In such cases as ConvertDateFormat() we will need to do the following

  • Create a new Date variable called DT
  • Use 2 new rules: CreateDateTimeFromString() and FormatDateTime()

BEFORE with ConvertDateFormat()

new ConvertDateFormat().execute(this.documentDate, “yyyy-MM-dd”, “yyyyMMdd”) => #[this.documentDate]

AFTER without ConvertDateFormat()

new CreateDateTimeFromString().execute(this.documentDate, “yyyy-MM-dd”) => #[this.DT]
new FormatDateTime().execute(this.DT, “yyyMMdd”) => #[this.documentDate]


In addition to updating the rules, we need to update the source and target options. In the example below, we are converting a flatfile to x12 ruleset.

Version 1:


Version 2:


In our next post we will show users how to convert Business Process Scripts to utilize the new Transformation engine

By: on