Rule Editor Improvements in AEM Forms rule-editor-improvements-in-aem-forms

The rule editor enables users to add logic to AEM Adaptive Forms. AEM 6.3 improves the rule editor in several ways making it easier and faster for both technical and non-technical users alike to add intelligence.

Transcript
My name is Alistair Lee and in this video, I’m gonna walk through some of the changes to the rule editor in Adobe Experience Manager at 6.3 forms. The rule editor is what enables users to add logic to their forms. There’s two different views to the rule editor a visual editor, that’s ideal for non-technical users who can simply drag and drop form objects, logic and functions directly onto the editor itself as well as a code editor, That’s ideal for somebody who’s familiar with scripting and programming. We’ve improved both of them, so let’s take a look at some of those improvements now and start by selecting my route panel here and then choosing the rule editor. I’ve already started to edit some javascript so let me open this up, right away you’ll notice some improvements in the way the javascript looks. We’ve added syntax highlighting, You’ll notice auto indentation as I move to the next field, we’ve even incorporated the comments from the previous line. And as I started typing, some of the objects on my field, you’ll notice I’ve got the ability, to autocomplete that text as I click the dot I can see all of the different properties and methods associated with that object and I can either use my mouse or the keyboard to automatically select something like that. You’ll also notice that we’re able to validate the javascript dynamically so as we’re writing our code it’s automatically being validated so I’ve got some javascript here that’s automatically going to fetch an IP address for me. I’m going to click done. We’re gonna take a look at some of the improvements to the visual editor as well. First you’ll notice as I navigate to one of the dropdown list boxes for example Province and create a new rule, switch over here to the visual editor As I select something like is equal to the visual code editor now automatically prompts me with all of the different options that are available. Again making it easier especially for a non-technical user to write code. So if I want to create an if statement around the province equalling British Columbia I can easily add a condition to that. That’s true of dropdown list boxes It’s also true of radio buttons and so if you’re using a radio button, I’ll click create here and go into our visual editor, it automatically pre-populates the different options available in the radio button.
In addition to pre-populating all of this content for non-technical users, we’ve also added the ability to add Web services directly to the rule editor itself. Let me show you what I mean. I’ve got this IP address here, that we’re using to populate an IP address, Going to take that IP address and look up the country based on that. So using nothing more than the visual editor, I’m going to choose my IP address We’ll look at when the IP address has changed, in other words, when we’ve added a value to it and then we’ll invoke an action. In this case we’re gonna use the invoke service action I’m going to paste a WSDL, a web service, directly into the rule editor itself Now the rule editor goes out and finds the properties with that web service In this case, getGeoIP is the one I’m gonna want to use. And now I can simply drag and drop some values into these fields. I’m going to do that by opening my sidebar and dragging the IP address itself, as the value for our input, then dragging the country as the value for our output for the country code.
And clicking done, so we’re now able to incorporate Web services directly into the rule editor. If I hit close, we can test this formula, by clicking preview you’ll notice that the form automatically fetches my IP address and pre-populates the country. One of the other abilities we’ve added in the rule editor whether you’re using the visual editor, or the code editor, is the ability to easily disable rules as well. So if we go back to the rule editor. Select any of the objects on my form that have a rule on them which I can see by the little green light on this object I’ve now got the ability to click disable. To disable that rule, temporarily or permanently making it easier to test my forms. Those are some of the new features that we’ve added to the rule editor In Adobe Experience Manager 6.3 forms. Thanks for your time.

Some of the improvements to the Rule Editor include:

  • Multi-value form components display the component options automatically

  • The ability to specify a WSDL web service in the visual editor

  • The ability to disable rules

  • Enhancements to the code editor such as:

  • Syntax highlighting

    • Auto indentation
    • Hints and suggestions for Form objects, functions, and properties
    • Automatic completion of components names and common Javascript functions
recommendation-more-help
8de24117-1378-413c-a581-01e660b7163e