Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

Common Questions: Books on Writing JavaScript for Alfresco

Writing JavaScript for Alfresco

As a leading Alfresco partner, we receive a lot of questions on best practices for implementation and usage of the platform. We will begin sharing this ECM knowledge through a series entitled Common Questions. In this installment, we look at a question we received about the best books and resources around writing JavaScript for Alfresco. If you have any questions, feel free to contact us today.


Alfresco 3 Cookbook – Writing JavaScript for Alfresco
Alfresco 3 Cookbook – Snig Bhaumik

Question:

Do you have any recommendation on JavaScript books for Alfresco? We found Alfresco 3 Cookbook online and would like to know if there is a more recent version or of any resources you have around writing JavaScript for Alfresco.

Answer:

Unfortunately, the Alfresco 3 Cookbook has not been updated in a long time. While you may find some great material in there, your mileage may vary.

Packt recently released a new version of the Alfresco Developer Guide as Bindu Wavell, our Chief Architect, is a technical reviewer. The new version can be found here.

Alfresco Development Tutorial – Writing JavaScript for Alfresco
Alfresco Development Tutorial – Jeff Potts

The current updates to this book include several recipe-style, step-by-step sections to quickly get things done. This is a go-to book for Alfresco development, but the current edition is old enough that some key things—like how to create an extension project—have changed significantly. A lot of this information comes from Jeff Potts’ Alfresco Development Tutorial series. He has done a great job of keeping this series up to date.

Another book from Packt that talks about writing JavaScript and Java for WebScripts can be seen here. It’s quite a bit newer than the previous one and is focused on WebScripts rather than covering more general topics.

You can also view Bindu’s Alfresco Summit presentation where he talks about creating JavaScript administration scripts.

Another great new resource is the Alfresco community site. This is a Jive platform site that has all the old forum and wiki content, but also a lot of activity from the community. It’s a great place to ask development questions and get answers from true rockstars in the community.

Finally, we would be remiss if we didn’t mention that the developer documentation at Alfresco has improved drastically over the past year and a half. You may find some good info here.

Alfresco Developer Help: Simplifying Alfresco Extension Development

Simplifying Extension Development in the Yeoman Generator

In this blog post, Bindu Wavell discusses how to create a project structure in the Yeoman generator that is appropriate for customized Alfresco implementations. This drastically reduces the need to search for and copy/paste data in multiple locations. This new alf-dev-helper project focus on reducing clicks in the UI when working on development tasks—eventually, we expect other types of helpers to be added.

Simplifying Alfresco Extension Development

Bindu Wavell, Chief Architect at Zia Consulting

As you may know, Zia Consulting has been working on an open-source Alfresco Yeoman generator that allows for Alfresco extension project scaffolding based on the Alfresco all-in-one archetype

This project also includes some wizards for adding common extensions such as actions, behaviors, models, and web scripts to your project. Additionally, it has helpers for adding AMP files to your project. One of these helpers is alfresco:amp-add-common. Based on which version of the SDK you are using, and if you are targeting Community or Enterprise, this will offer you a list of third-party AMPs that can be added to your project (multi-selection is possible).

In order to do this, the generator relies on these modules being published to a public Maven repository such as Maven Central or Alfresco Artifacts. Initially, the only two AMPs available from one of these repositories were Support Tools for Enterprise installs and Uploader Plus.

We have been advocating in the community for folks to start publishing their AMPs to a public Maven repository. At BeeCon 2016 we had a good discussion with Florian Maul, the author of the awesome JavaScript Console add-on. He went through the process of getting his AMPs pushed to Maven Central and published a how-to article.

There are now a growing number of high-value AMPs available via one of the public Maven repositories. These include common modules such as:

  • Alfresco Office Services (AOS)
  • JavaScript Console
  • Records Management (RM)
  • Support Tools
  • Uploader Plus

In addition, we have recently seen some more specialized projects pushing their AMPs to a public repository, these include:

  • JavaMelody
  • JScript Extensions
  • Share Inbound Calendar Invites
  • Share Site Announcements
  • Share Site Creators
  • Share Site Space Templates

The alfresco:amp-add-common sub-generator supports adding any/all of these to your Yeoman generated projects with a single command.

For years I have felt it should be possible for developers to jump from any node in a document library view directly to the node browser. This is a very simple customization and I finally got around to coding this up in a reusable project. The project is called alfresco-dev-helper and is now also published to Maven Central and has been added to the alfresco:amp-add-common subgenerator.

Besides the new open in node browser document library action, this add-on enables the execute script action that is provided out-of-the-box, but disabled by default. It also exposes the change type action on the browse screens.

Simplifying Extension Development – Exposed Document Library Actions
Exposed Document Library Actions

My plan for this project is to include simple extensions to the platform and share those that will be most useful for developers. I would not expect this module to be deployed to production.

In summary, we are continuing to make progress on the Yeoman generator for Alfresco. Recently, we have been making it easier to quickly add some useful AMPs and have started work on a sister project to the Yeoman generator where some helpful developer tools that run inside the platform and share will be made available to you.

Bindu Wavel, Chief Architect at Zia Consulting

Bindu Wavell is the Chief Architect at Zia Consulting. He has been involved in enterprise system integration consulting for the past 24 years. At Zia, Bindu provides guidance and mentoring around enterprise content management architecture and design in addition to working hands-on with customers to deliver high-value solutions. Bindu has been working on enterprise content management engagements for the past 10 years. Previously he worked at eConvergent and Aspect Communications focusing on customer relationship management systems. Bindu is passionate about tea and quite interested in hobby robotics and automation.

Ephesoft: Four Features of Practical Innovation

By Jake Karnes, ECM Consultant at Zia Consulting

With an eye to the future, Ephesoft continues to deliver practical innovation which improves the capabilities and usability of its core platform, Ephesoft Transact. Ephesoft demonstrates this commitment to current and future customers with four new features: cross-section extraction, automatic data conversion, paragraph extraction, and automatic regular expression suggestions and creations.

Ephesoft INNOVATE 2016 brought together leading minds to discuss the latest industry advances. Software companies face the persistent challenge of delivering practical innovation while staying true to their product’s role in a customer’s organization. Ephesoft tackles this problem with a two-pronged approach. Ephesoft remains on the cutting edge of document capture technology with their new big data analytics platform—Ephesoft Insight. Insight promises to extract content and meaning from documents scattered across an organization using machine learning and patented text-based analysis. In addition to pushing the envelope with Insight, Ephesoft is continuing to expand and strengthen Ephesoft Transact.

Feature 1: Cross-Section Extraction

Ephesoft Transact, formerly Ephesoft Enterprise, adds several powerful features in the upcoming 4.1 release with roots in customer feedback and provide out-of-the-box functionality which previously required customization. One such feature is cross-section extraction. This technique uses the intersection of two keys to find the correct value. In the example below, the two keys are “Services Borrower Did Not Shop For” and “Borrower-Paid” which meet at the value “$236.55.” This triangulation using multiple keys allows for the extraction of values which are ill-suited for existing extraction methods such as table extraction.

closingcostdetails

Feature 2: Automatic Data Conversion

Another feature which comes from business use cases is automatic data conversion. This feature allows extracted dates and other values to be automatically normalized to a standard format. For example, a date extracted as “MAR 21 2016” can automatically be converted to “03/15/2016” and vice versa. Other possible data conversions include predefined suffixes and prefixes, data replacement, upper or lower case conversion, and more. One novel use for this functionality would be to clean up imperfect OCR results. The extraction rules could be defined to allow for missing or erroneous characters, and the values could then be corrected during this data conversion step by removing or substituting the known, correct character(s).

dateconversion

Feature 3: Automatic Regular Expression Suggestion and Creation

Another example of Ephesoft’s dedication to improving user experience by expanding Transact’s functionality is the new, automatic regular expression suggestion and creation. Ephesoft has recognized the pain of writing regular expressions by hand, and helps minimize these efforts by suggesting regular expressions automatically. These suggestions are sourced from Ephesoft’s own library of common regular expressions, such as emails, dollar amounts, and dates. But Ephesoft can even help you create custom regular expressions based on the examples provided during extraction training. This strikes a powerful balance between the flexibility to write your own and the ease of having them automatically suggested or created for you. The usefulness of regular expressions is now unlocked without burdening the user with learning the complex regular expression notation. As an added bonus, this feature is already included in the latest release of Transact, and further information can be found at Ephesoft’s wiki page here or in a video demonstration below.

Feature 4: Paragraph Extraction

Paragraph extraction demonstrates Ephesoft Transact capabilities of mining valuable information from unstructured documents. This features enables the user to define values to be extracted from within larger bodies of text, without specific keywords or fixed locations. As an example, consider the following sections of a mortgage note:

Paragraph extraction can be used to extract each of the highlighted values. Even values which wrap around multiple lines (e.g. “Super Mortgage Inc”) can be handled with ease. Previously, this would have required custom scripting or a complex combination of different extraction techniques. Paragraph extraction allows the user to unlock information from their documents which may have been unused before.

These features indicate that Ephesoft’s innovation is not limited to their groundbreaking analytics platform. They continue to implement practical innovation which is equally important for new and existing customers. These features provide straightforward solutions to common pain points. By inviting and accepting feedback from their customers and partners, Ephesoft is pushing the capture industry forward on multiple fronts.

borrow

Jake Karnes – ECM Consultant Zia ConsultingJake Karnes is an ECM Consultant at Zia Consulting. He extends and integrates Ephesoft and Alfresco to create complete content solutions. In addition to client integrations, Jake has helped create Zia stand-alone solutions such as mobile applications, mortgage automation, and analytic tools. He’s always eager to discuss software to the finest details, you can find Jake on LinkedIn.

Tech Post: Extracting Metadata in Alfresco

Extracting Metadata in Alfresco

by Jeff Rosler, Solutions Architect at Zia

When importing files, each is uploaded with additional information including things like title, description, and text. Out of the box, Alfresco extracts the properties that have been mapped and metadata is taken from the content using Apache Tika. The TikaAutoMetadataExtracter class loads the supported mime types so all users have to do is create a bean that references that class and then set the properties desired in extraction.

The following are some simple samples for how metadata can be pulled from different mime types and set to Alfresco properties. Since Apache Tika is used as a basic metadata extractor in Alfresco, you can use that to extract metadata for all the mime types that it supports. The current version of Tika that Alfresco is using (for Alfresco 5.0.2.5 and 5.1) is basically Tika 1.6 which supports the following file types. The TikaAutoMetadataExtracter class loads all the mime types that embedded version of Tika supports. So, all you need to do is to create a spring bean that references that class and set the properties to extract and set the Alfresco properties you’d like to have set. You don’t have to write any custom code.

Example 0 – Set logging to see what metadata can be extracted

Before defining your metadata extraction, it’s good to set your logging level for metadata extraction to DEBUG. When you do this, the extracted metadata for a file is shown in the log. This lets you correctly choose the embedded metadata property names to configure. You can set this by going to your log4j.properties file for the repo (alfresco) and adding the following line.

log4j.logger.org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter=DEBUG

Restart alfresco and import a file. You should see something like this in the log. You can see properties with name spaces such as dc:title (the dc stands for dublin core, a metadata standard) as well as other properties that don’t contain a namespace. You can use these embedded properties to map to standard or custom Alfresco properties.

2016-02-03 10:03:49,474 DEBUG [content.metadata.AbstractMappingMetadataExtracter]
 [http-bio-8080-exec-10] Extracted Metadata from ContentAccessor[ 
 contentUrl=store://2016/2/3/10/3/068b7c2b-1f7f-4b12-aa90-e78794eb8e77.bin, 
 mimetype=application/vnd.openxmlformats-officedocument.wordprocessingml.document,
 size=286436, encoding=UTF-8, locale=en_US]
 Found: {date=2016-01-22T18:59:00Z, Total-Time=1, extended-properties:AppVersion=14.0000,
 meta:paragraph-count=12, subject=beer, ipsum, meta:print-date=2016-01-22T18:59:00Z,
 Word-Count=405, meta:line-count=45, Manager=null, Template=Normal.dotm, Paragraph-Count=12,
 meta:character-count-with-spaces=2246, dc:title=Tom's Ipsum Beer, modified=2016-01-22T18:59:00Z,
 meta:author=Jeff Rosler, meta:creation-date=2015-12-31T15:49:00Z,
 Last-Printed=2016-01-22T18:59:00Z, extended-properties:Application=Microsoft Macintosh Word,
 author=Jeff Rosler, created=2015-12-31T15:49:00Z, Creation-Date=2015-12-31T15:49:00Z,
 Character-Count-With-Spaces=2246, Last-Author=Jeff Rosler, Character Count=1853, Page-Count=2,
 Application-Version=14.0000, extended-properties:Template=Normal.dotm, Author=Jeff Rosler,
 publisher=Zia Consulting, meta:page-count=2, cp:revision=4,
 Keywords=beer, ipsum, meta:word-count=405,
 dc:creator=Jeff Rosler, extended-properties:Company=Zia Consulting,
 description=beer, ipsum, dcterms:created=2015-12-31T15:49:00Z,
 Last-Modified=2016-01-22T18:59:00Z, dcterms:modified=2016-01-22T18:59:00Z,
 title=Tom's Ipsum Beer, Last-Save-Date=2016-01-22T18:59:00Z, meta:character-count=1853,
 Line-Count=45, meta:save-date=2016-01-22T18:59:00Z, Application-Name=Microsoft Macintosh Word,
 extended-properties:TotalTime=1, extended-properties:Manager=null,
 Content-Type=application/vnd.openxmlformats-officedocument.wordprocessingml.document,
 creator=Jeff Rosler, comments=null, dc:subject=beer, ipsum, meta:last-author=Jeff Rosler,
 xmpTPg:NPages=2, Revision-Number=4, meta:keyword=beer, ipsum, dc:publisher=Zia Consulting}

Example 1 – Set author, title, description

Specify your spring bean. You can name the id anything you want (that is a legitimate XML id) and point to the TikaAutoMetadataExtracter class (yes I know, that isn’t the way you spell Extractor, but the code has misspelled Extractor with an “e” instead of an “o”). In the code block below, we are overriding the default mapping and pointing to a separate property file. The properties could have been listed inline here, but pointing to the property files allows for easier editing.

 

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

   <bean id="extractor.auto" class="org.alfresco.repo.content.metadata.TikaAutoMetadataExtracter" parent="baseMetadataExtracter">
      <constructor-arg>
         <ref bean="tikaConfig"/>
      </constructor-arg>
      <property name="inheritDefaultMapping">
         <value>false</value>
      </property>
      <property name="mappingProperties">
         <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
            <property name="location">
               <value>classpath:alfresco/extension/TikaAutoMetadataExtracter.properties</value>
            </property>
        </bean>
      </property>
   </bean>

</beans>

After specifying your spring bean that points to a properties file (e.g. TikaAutoMetadataExtracter.properties), within the properties file, set any Alfresco namespaces you’re specifying for the content model and then each property to be mapped. Note that during the extraction if you specify properties on aspects, those aspects will be applied to the content node automatically for you. Note that you put the embedded metadata property name on the left of the equal sign and the Alfresco property on the right. If you are specifying an embedded property that has a namespace prefix (e.g. dc:title) remember to escape the colon with a backslash (e.g. dc\:title). You don’t need to do that on the property value, just the property.

 

# Namespaces
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
&nbsp;
# Mappings
author=cm:author
dc\:title=cm:title
description=cm:description

Example 2 – Setting multiple Alfresco properties 

Embedded Metadata can be mapped to multiple Alfresco properties by specifying those properties as comma separated values. The example below shows setting the embedded author value to both cm:author and cm:description.

 

# Namespaces
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
 
# Mappings
author=cm:author,cm:description

Example 3 – Specifying when properties are extracted

The Metadata extractor has something called an OverwritePolicy. The OverwritePolicy specifies when an Alfresco property is overwritten. For example, you might not want your extractor to overwrite every time a new version is stored of a file as this would overwrite any of the mapped property values that were updated manually via Share or automatically through actions, workflows or other processes. Therefore, Alfresco defaults the OverwritePolicy to PRAGMATIC. This basically sets it to extract if the extracted property is not null  and the Alfresco property is not set or is empty.

However, if you want to change the behavior so that the extraction happens all the time (e.g. when content is updated), then you should set the OverwritePolicy to EAGER. This can be done by passing that as a parameter within your extractor bean as can be seen below.

<bean id="extractor.auto" class="org.alfresco.repo.content.metadata.TikaAutoMetadataExtracter" parent="baseMetadataExtracter">
   <constructor-arg>
      <ref bean="tikaConfig"/>
   </constructor-arg>
   <property name="inheritDefaultMapping">
      <value>false</value>
   </property>
   <property name="overwritePolicy">
     <value>EAGER</value>
   </property>
 
   <property name="mappingProperties">
      <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
         <property name="location">
            <value>classpath:alfresco/extension/TikaAutoMetadataExtracter.properties</value>
         </property>
      </bean>
   </property>
</bean>

Example 4 – Setting tags

Support for mapping tags was added in Alfresco 4.2.c. Details are mentioned in this blog post. You can easily add that to your extraction mapping. It just needs to be enabled in the extract-metadata bean and then the mapping set within your properties file.

NOTE: When setting tags, don’t do this while running from the Alfresco SDK using springloaded. Tagging won’t work and as soon as you try and import some content with tags (after you’ve made the updates below), your content will fail to load.

ALSO NOTE: I noticed in Alfresco 5.0 that the embedded keywords are getting concatenated into a single comma separated tag. This has been identified as a bug and a JIRA (MNT-15497) was created for fixing it. The fix was put in 5.0.4 and 5.1.1.

The following code block can be added to your spring bean xml config file to enable tagging.

 

<!--
    Override metadata extraction bean from action-services-context.xml to turn on the taggingService and enableStringTagging
    This will allow keywords to get mapped to tags.
 -->
<bean id="extract-metadata" class="org.alfresco.repo.action.executer.ContentMetadataExtracter" parent="action-executer">
  <property name="nodeService">
    <ref bean="NodeService" />
  </property>
  <property name="contentService">
    <ref bean="ContentService" />
  </property>
  <property name="dictionaryService">
    <ref bean="dictionaryService" />
  </property>
  <property name="taggingService">
      <ref bean="TaggingService" />
  </property>
  <property name="metadataExtracterRegistry">
    <ref bean="metadataExtracterRegistry" />
  </property>
  <property name="applicableTypes">
    <list>
      <value>{http://www.alfresco.org/model/content/1.0}content</value>
    </list>
  </property>
  <property name="carryAspectProperties">
    <value>true</value>
  </property>
  <property name="enableStringTagging">
    <value>true</value>
  </property>
</bean>

After tagging is enabled, just update your property file to map the appropriate embedded Keywords property to cm:taggable. The example below uses the embedded Keywords property.

# Namespaces
namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
 
# Mappings
Keywords=cm:taggable

 

Metadata and Alfresco by Jeff Rosler, Solutions ArchitectJeff Rosler has more than 15 years’ experience architecting and developing enterprise content management solutions for customers across multiple verticals to help solve different business challenges. These solutions include digital asset management, component content management using XML, business process management, and web content management utilizing Alfresco and related standards, technologies, and products.

Webinar Series: Insurance in 2016 – Process Efficiency and Data Security

As we move into 2016, many insurance organizations are looking to transition from their end-of-year strategic planning towards the achievement of their set goals. Whether property and casualty, life insurance, reinsurance, or any other type, top priorities are improving process efficiency to deliver measurable business results and enhancing data security to mitigate enterprise risk. But, how can you get there? Our three-part webinar series shows how leveraging automation technologies can deliver a rapid ROI in document processing and also provide your organization with our Universal Content Security. Each webinar is 30 minutes in length and includes a demonstration and specific customer examples.

Webinar 1: Automating Claims Processing 
See how a leading insurance provider revolutionized their business using Intelligent Document Capture and a modern, integrated ECM content hub.

Watch Now!

Webinar 2: Automating Contracts and AP 
Learn to automate common back office business processes —from contracts management to AP—with tools like Document Assembly and enterprise integration into ERP systems such as SAP or Microsoft Dynamics.

Watch Now!

Webinar 3: Addressing Cyber Security
Discover how the application of data security can be automated across the entire organization and extended to external collaboration tools from email to Dropbox.

Watch Now!

Zia Lightning Talks: Alfresco Email Templates

Zia conducts monthly, internal lightning talk sessions. These short, five-minutes presentations cover topics important to Zia, our partners, and the industry. We’ve decided to start sharing some of these useful presentations with you. This post covers the talk presented by Lucas Patingre, ECM Architect at Zia Consulting.

Despite some companies trying to shut down internal emails, they are still frequently used as a notification tool. Right out-of-the box, Alfresco gives us the ability to send inline emails—written directly in the code—in both html and text formats, or to send the emails based on templates.

Benefits of Alfresco Templates

  • Separation of the view
    • Separating the presentation layer from the code makes it easier to work on the email structure or the dynamic content independently.
    • In the end, this will allow us to write and maintain more complex emais.
  • Localization
    • Alfresco supports multiple languages which manifests at several levels. The most obvious is the UI where all text is encapsulated within localized properties files to render based on user preferences.
    • For email templates, we can create one template file per language we want to support and then choose the right one at the time we send the email.
  • Edit online
    • The email templates are stored in the repository making it simple for an administrator to edit them without creating a new build of a customization.

How-To Use Alfresco Templates

  • Calling the action
    • Instead of passing raw text to the email action, you will pass the reference to a template node and a parameter map with the data to inject.

Before:

Action mail = actionService.createAction(MailActionExecuter.NAME);
mail.setParameterValue(MailActionExecuter.PARAM_SUBJECT, "Inline email subject");
mail.setParameterValue(MailActionExecuter.PARAM_TEXT, "Inline email body");

After:

Map<String, Object> model = new HashMap<String, Object>();
Action mail = actionService.createAction(MailActionExecuter.NAME);
mail.setParameterValue(MailActionExecuter.PARAM_SUBJECT, "Templated email subject");
mail.setParameterValue(MailActionExecuter.PARAM_TEMPLATE, getEmailTemplate());
mail.setParameterValue(MailActionExecuter.PARAM_TEMPLATE_MODEL, (Serializable) model);
  • Bootstrapping the email templates
    • While not mandatory, it’s better to bootstrap the templates to the repository instead of uploading them manually. You should end up with one template per language you want to support, similar to this:

Example

Note: The configuration used to bootstrap the templates is out of the scope of this blog post. You can find reliable resources online on how to bootstrap using the ImporterModuleComponent.

  • Localized email template fetching: getLocalizedSibling
      • The FileFolderService has an interesting method called getLocalizedSibling that can retrieve a localized (using the server’s locale) version of the template.
private NodeRef getEmailTemplate() {
    try {
        List<NodeRef> nodeRefs = searchService.selectNodes(
                nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE), EMAIL_TEMPLATE_XPATH, null,
                nameSpaceService, false);
        if (nodeRefs.size() != 1) {
            logger.error("Cannot find the saved search notification email template: " + EMAIL_TEMPLATE_XPATH);
            return null;
        }
        return fileFolderService.getLocalizedSibling(nodeRefs.get(0));
    } catch (SearcherException e) {
        logger.error("Cannot find the saved search notification email template: " + EMAIL_TEMPLATE_XPATH, e);
    }
    return null;
}

Capabilities of FTL Templates

  • Basic variable injection
    • This is extracted from the default “Following” email template in Alfresco
<html>
    <#assign followerFullName>${followerFirstName} ${followerLastName}</#assign>
    <body>
        <table>
            <tr>
                <td>
                    <img src="${shareUrl}/res/components/images/help-people-bw-64.png" />
                </td>
                <td>
                    <div>${(followerFullName?trim)?html} is now following you.</div>
                    <div><#if followerJobTitle??>${followerJobTitle?html}<br/></#if></div>
                </td>
            </tr>
        </table>
    </body>
</html>
  • Freemarker logic
    • This is extracted from the default “Activities” email template in Alfresco. As activities can be one of several kinds and we want to format the notification differently for each kind, it requires more ftl logic. I have remove much of the actual display work to mainly keep the logic structures.
<div>
    <#if activities?exists && activities?size > 0>
        <#list activities as activity>
            <#if activity.siteNetwork??>
                <#assign firstVar="Something">
                <#assign otherVar=false>
                <#switch activity.activityType>
                    <#case "org.alfresco.site.user-joined">
                    <#case "org.alfresco.site.user-left">
                        <#assign firstVar="Something else">
                    <#break>
                    <#case "org.alfresco.site.user-role-changed">
                        <#assign otherVar=true>
                    <#default>
                </#switch>
                <div class="activity">
                    <#if otherVar>${firstVar}<#else>Not var</#if>
                </div>
            </#if>
        </#list>
    </#if>
</div>
  • Handle nodes
    • Another useful is the ability to fetch nodes and access their different properties. To use this, you will need to inject “companyhome” in your email template.
<table>
    <tr>
        <th>Modified date</th>
        <th>Modifier</th>
        <th>File</th>
    </tr>
    <#list savedSearch.getNewResults() as savedSearchResult>
        <#assign savedSearchResultNode=companyhome.nodeByReference[savedSearchResult.toString()]>
        <tr>
            <td>${savedSearchResultNode.properties.modified?date}</td>
            <td><a href="${shareUrl}/page/user/${savedSearchResultNode.properties.modifier?html}/profile">${savedSearchResultNode.properties.modifier}</a></td>
            <td><a href="${viewUrl}${savedSearchResultNode.properties['sys:node-uuid']}">${savedSearchResultNode.properties.name}</a></td>
        </tr>
    </#list>
</table>

From this, you can see the benefits of utilizing these templates to create a more streamlined deployment of your email communications. If you have any questions on how to best implement this approach, please contact us today.

Three Areas of Successful Workflow Implementation

Written by Ryan McVeigh – VP of ECM Solutions, Sales

Recently I was in discussion with our team as we contemplated a response to a proposal request. This particular request was heavily focused on workflow which lead to a spirited discussion. It occurs to me that often at Zia, we are cautious about scoping workflow implementation work. There’s good reason for this, as workflows are that type of software in our business that is heavily utilized by our client’s users, so we have to get them right. Workflows also typically have integration points with other pieces of software. What that tells us is that there is reason to be clear on both the technical and user-facing components of the implementation. Interestingly, the Java portion of this isn’t really the hard part. Our team agrees that ultimately writing the software, drawing the diagram and creating the workflow isn’t where the time is spent. I find that I get caution from my team around duration of workflow implementation and when we look closely at why that is, we can attribute the overall effort to three distinct areas:

  1. Requirements Gathering: This is where we collaborate with our client to understand their business process. We guide our clients on what makes for a successful workflow or business process implementation in Alfresco given their unique environment and build a successful implementation plan. Many organizations that Zia has worked with to implement workflows require multiple design iterations to finalize the requirements for their business processes. We recommend clients allow an appropriate amount of time in their project plan to finalize requirements for automated business processes.
  2. Implementation: This is the relatively straightforward part. Creating the software, implementing the workflow and integration points, and testing.
  3. User Acceptance Testing Loop: Users need to test and provide feedback, fix bugs and update, then test again.  This loop is important to enable users to get hands on experience with the workflow. Workflow Adoption-2

These three areas are ultimately very straightforward. What happens in reality is users learn through this process and the workflow changes – and thus we spend more time than it would seem is required for a workflow implementation. The lesson learned here is that workflow actually takes a reasonable amount of calendar time to implement, but not in the traditional sense. Time is spent more in getting user consensus and feedback which simply takes time, than in writing software.

This brings us to what does this mean to you, our reader? Well, if you’re thinking about implementing workflow as a developer, prepare yourself for the feedback loop. If you’re an Alfresco customer, what can you do to expedite this cycle? First, work on your requirements for the “To Be” process ahead of engaging your integrator. Second, don’t try to implement your existing broken process! I always tell folks to start small, get a quick win and build upon that. This seems obvious, but more often than not, folks request complex processes. These are not very easy to implement and usually do not facilitate user adoption or produce user satisfaction. Consider these trends before approaching the automation of business processes. Remember you cannot please everyone. Finally, be on point when it is time to test and verify. Be patient and don’t expect a perfect business process, but rather something that can work and can be built upon over time.

New Video Demo: HR “Offboarding”

For those outside the HR department, one area that is typically “hidden” when considering the cost and complexity of document processing is the “offboarding” of employees – either through termination or resignation. With both company and regulatory requirements for documentation and data, and ranging in source from Paper to Email to E-Forms, for many organizations the need for automation of “offboarding” rivals that of “onboarding”.

This demo will show:

  • Creation of “Offboarding” Case – with Dynamic Role-Based Views & Templates and Zia’s Document Assembly offering
  • Processing of Case – with Advanced Workflow, Office / Email Integration, and Annotation/Redaction
  • Employee Collaboration – featuring Alfresco One Cloud Collaboration
  • Leveraging Intelligent Capture to automate the classification & extraction processes

Lightning Talks: Alfresco Share Evaluators (Predefined and Custom)

Customizing the Alfresco Share user interface may require actions/indicators based on something about the node to be actioned (property, state, type, etc). For example, you may only want to enable an action for a node if of a specific type. This can be achieved by using Evaluators. Alfresco provides a number of out of the box evaluators. Additionally, more robust evaluators can be created by extending the classes used to support the out of the box evaluators. In this Lightning Talk from ECM Architect Mike Wallach, the predefined evaluators will be described and a walk through of how to utilize some of the out of the box evaluators will be given. Additionally, an example of extending the base evaluator to create an evaluator for a custom condition will be presented.

New Video Presentation: Document Assembly

Each month at Zia Consulting we gather to present Lightning Talks–a series of 5-minute presentations on virtually any topic of interest to the group. This month Senior Solutions Engineer Jon Solove presented “Document Assembly” where he discussed how to automatically build documents utilizing boilerplate text, clause libraries, and metadata.