User bio
404 bio not found
Hamburg
Member since Jan 28, 2021
Replies:

 Hi Robert,

thanks for the advice. I was hoping that the interop production of IRIS is able to handle cases like that but couldn't find anything in the documentation. Anyway I followed your hint and found a lightweight solution.

Here is what one can do to avoid spamming the production log with error messages in case a transformation create objects that violate the uniqe index of the class definition.

  1. Use a class that extends Ens.Rule.FunctionSet
  2. Create a class method that calls the MyIndexExists() method which returns a boolean
  3. Return the inverted boolean (to align with the intention of the method name and a better understanding inside the rule definition of the production)
  4. Add a routing rule for the object that checks the condition before the source object is sent to the transformation (you can now choose your function set method from the fx dropdown when you click on the condition within the rule on the rule editor page)
Class My.FunctionSet Extends Ens.Rule.FunctionSet [ Abstract, System = 4 ]
{

ClassMethod IsNewMyClassObject(Prop1,Prop2) As %Boolean [CodeMode = expression, Final]
{
'##class(MyClass).MyIndexExists(Prop1, Prop2)    
}

}

 

Open Exchange applications:
Certifications & Credly badges:
Tommy has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Tommy has no followers yet.
Following: