How to validate the document creation with unique uid using automation chain
Hello, I need validate the creation of documents with unique uid. I need to use a condition on automation chain for verify the uid on documents in the repository but I don´t know how to do that? I have reviewed all operations in studio but I don't see something with conditions
Another way of doing it is to create the id automatically using Fn.getNextId (maybe using the metadata of the document) so that you will be sure to have a unique id. Find here an example on custom doc id generation : http://doc.nuxeo.com/x/pQM7
Doing the “count” fo your select is something that can be done easily with automation (using This.size() for exemple) but the problem is more that we don't currently any operation that would break the transaction nicely. The best option would be to write a JSF validator that does what you meant and reference it in the “validator” property of your widget. This is development with Nuxeo IDE.
Hi,
Since studio is using MVEL, i guess you can use the usual MVEL synthx for conditions: http://docs.codehaus.org/display/MVEL/MVEL+2.0+Control+Flow