This blog post in intended for anyone who is familiar with Nuxeo Studio and is interested to learn a bit more about automation chains. As noted in my previous post, creation of automation chains is a prominent feature in Nuxeo Studio which allows users to set a series of instructions that can be executed.

Operations

Automation chains are made up of multiple bits of instructions called ‘operations’. There are many operations that are already defined in Studio that are generally sufficient for most situations. These operations can include fetching a document, creating a task, and logging in as a specific user to name just a few. When creating an automation chain, a user simply needs to add one operation at a time for the task they have in mind. For example, if they want to have a chain where you login as the administrator and create a new document, they would only need to add the corresponding operations for logging in and creating a document.

MVEL Language

The Language is used to create the input values for the operations in an automation chain. MVEL helps determine what metadata should be extracted from specific data types, such as a document file’s title by calling expr:Document[“dc:title”]. With this, you can also set up your own variable names to temporarily hold data, and use them as needed. Here are some basic MVEL scripting features to take note of:

  • If you were to type “description” it would have no special interpretation and just literally mean “description”.
  • If you were to type “expr:description” the expr means to examine “description” as a scripting expression, and not as a literal one. This allows any scripting interpretation in the expression to return their value.
  • If you were to type “expr:Description – @{description}”, and “description” is a variable that holds a string value of “a standard file”, it would return “Description – a standard file”. Having @{} means that it will interpret anything inside the brackets as a variable, which is “a standard file” in this case.
  • It’s important to note that if the “expr:” part wasn’t there in the above example, it would just return “Description – @{description}” since it would return as a literal.

There are many more uses of the MVEL language for automation chains, which can be found at the following link: https://doc.nuxeo.com/display/NXDOC/Use+of+MVEL+in+Automation+Chains.

MVEL also has a list of operators to use, which can be found here: http://mvel.codehaus.org/Operators.

If you are curious to see a sample script that uses MVEL, there’s a posted example which creates a random number guessing game: https://github.com/mvel/mvel/blob/master/samples/scripts/randomguess.mvel.

User-Created Operations

Even though the Studio provides a vast amount of useful operations, those aren’t the only ones that are usable. Users are freely able to create their own operations themselves. However for this part, the user should be able to code with Java, and be able to utilize MVEL. This requires the installation of the Eclipse IDE, the Nuxeo SDK, and the Nuxeo IDE for Eclipse. The Nuxeo IDE has a wizard to help set up an operation template to give users a start. From here, the users are free to utilize the Nuxeo SDK library to code a specific operation they need. There’s a tutorial to create your first operation which results in the creation of a random string generator:

http://doc.nuxeo.com/display/NXDOC56/Coding+your+first+operation

To see more information related to creating an operation, refer to here too:

http://doc.nuxeo.com/display/NXDOC/Contributing+an+Operation

These are just the main features associated with automation chains, but I hope this helps anyone get a general idea about the usage of these chains with Nuxeo Studio. Next time, I’d like to elaborate on event handlers, which is the feature responsible for triggering automation chains.

Read More

Nuxeo Studio is an online service that provides a vast array of features to help users manage their enterprise content better in Nuxeo Platform. Being a user of the service as well as a Nuxeo integration engineer myself, I’d like to list some of the big features Nuxeo Studio has got going for itself.

1. Schema Definitions

Studio allows users to define a vast lists of schemes, or collection of metadata (like a potential Football Player schema would include their name, roster number, position, etc.). These help objectify groups of data to have a defined identity so they can be used in a means that makes sense to the user.

2. Workflows and Lifecycles

Nuxeo Studio provides a nice visual Lifecycle tool to set-up all the possible document states. This includes the starting state and all the possible paths from that state. With this, the studio provides a visual workflow tool that helps users make a roadmap on how documents are handled by users, and how it affects its lifecycle state.

3. Structure Templates

This tool alleviates any unnecessary work to manually create documents, by simply creating a template that automatically produces them. The user can define rules of what type of documents can be created, along with setting up an automatic control list of permissions for the created documents.

4. Content View Customization

Here, the user can define how content is displayed on the platform, as well as define the filter rules on how content can be organized and searched for. To do this, Nuxeo provides NXQL (the Nuxeo Query Language) as a means to query data from its database. It’s a handy language to pick up, and allows the content view to gain access to specific metadata so it can display them in a fashion that suits the users needs.

5. Automation Functions

Users are able to create users actions, automation chains, or event handlers, which allows top-level programming for almost everything with the users content. For automation chains, users can define a string of operations, like simply changing a document property. For user actions, users can apply those automation chains to be triggered when a user does something, like click a button. And for event handlers, users can set an automation chain to be triggered when a special document event happens, like when one is created.

While all of these are standout features of Nuxeo Studio, there are still more things the service can provide.Nuxeo has a vast amount of documentation posted online for everything above, and much more. You can find more information at http://doc.nuxeo.com/display/Studio/Nuxeo+Studio+Documentation+Center.

Read More