Checking objects using an enumeration

Can I check if objects exist (and create the missing ones) based on an enumeration using the object's Name attribute?\ Edit: Yes I mean the instances of an object, sorry. As Bas describes I mean to say to check if my Person object instance Jones is in the enumeration [Jones, Indiana, Indy]. I was hoping I could do this in the modeler itself, not using Java.
2 answers

Please clarify your question. What do you mean by checking if objects exist? Are you talking about instances of objects? So for example an object has a Name attribute which is filled with John, and you define an Enumeration in your project with enumeration values John, Jack, Jones and you want to see if there is an object matching one of the enumeration names? You can definitely do this using an xpath in a Java action, I'm not entirely sure if you can do this in the model itself. If you could edit your question to clarify, maybe someone else can answer this.


What you can do in microflow is the following:

  1. Create an exclusive split.
  2. Fill the expression I.E.: Object/Name = toString(Module.Enumeration.value)

Now the Name value must be exactly the same as the enumeration value to get the true as an outcome of the exclusice split.

When you want to make no difference in Uppercase or lowercase letters you can add the toLowerCase() function.

Then you will have the following expression toLowerCase(Object/Name) = toLowerCase(toString(Module.Enumeration.value))

I hope this helps you further.