Jeff D. Brown - Tech Notes

February 8, 2008

Presenting at Alfresco Chicago MeetUp on Feb. 12th

Filed under: ECM — jbrown @ 11:35 am

The Alfresco Community Meetup is a chance to learn about Alfresco and talk to your peers about how they are using Alfresco in their business space. CityTech will be teaming with Matria Healthcare to present a use case of how Alfresco is being used to solve their business challenges.

There will also be several informal (IE: laptop on pub table) demonstrations during the happy hour portion of the MeetUp as well. If you are interested in the Alfresco’s Advanced Workflow functionality or in how Alfresco can be integrated into your operation’s current application monitoring system, please stop by one the tables during a break and take a look.

The event is at a great Chicago location - Columbia Yacht Club, so we hope to see you there. You can register for the event at:

http://webcms.meetup.com/43/calendar/6927116/ 

February 4, 2008

Alfresco Advanced Workflow and task due dates.

Filed under: ECM — jbrown @ 9:03 am

I recently developed a workflow where the requirements called to dynamically assign task due dates relative to the task creation date. For example, a particular task was required to automatically have a due date assigned that is 3 business days from the date the task is created.

The challenge here is to ensure the due date is assigned to an actual business work day. Out of the box, Alfresco does not include this functionality. However, Alfresco does include the jBPM Business Calendar which we can use to solve this requirement. The org.jbpm.calendar.BusinessCalendar class comes bundled as part of the jBPM jar files included with Alfresco.

The BusinessCalendar class allows you to set the normal working days and working hours for a company as well as to indicate any holidays observed by the company. This is done using an XML configuration file. This file is found within the same jBPM jar file, but can be copied out, customized, and placed in your classpath with the same directory structure and file name. The file can be found at org/jbpm/calandar/jbpm.business.calendar.properties within the 3rd-party JAR: /3rd Party/lib/jbpm/jbpm-jpdl-3.2-patched.jar (as of Alfresco EE2.1.1). Place a customized copy of this file, complete with the same directory structure under the WEB-INF/classes directory of your extension project.

Alfresco already uses the BusinessCalendar class for the workflow Timer node and it can be leveraged for setting task due dates with a single custom class. To do so, create a custom class that extends the jBPM ActionHandler class. In the example below, I extended from the Spring-enabled descendant in case I needed access to any of of the Spring beans. Ends up I did not, but I left it in for future enhancements anyway. The custom action takes a String parameter that contains a valid jBPM duration string and adds that duration to the current date/time to set the current task’s due date.

AssignBusinessDueDate.java

The following example shows this class called from the task creation event in a process definition:

<task-node name="some task">
<task name="citytechwf:genericTask" swimlane="accountants">
<event type="task-create">
<action class="com.citytechinc.repo.workflow.jbpm.AssignBusinessDueDate">
<addDuration>5 business days</addDuration>
</action>
</event>
</task>
</task-node>

November 15, 2007

Ubuntu Gutsy (7.10) workaround for Apani Nortel VPN Client

Filed under: Linux — jbrown @ 11:27 pm

 This is huge news for those that use Ubuntu Linux, or want to, but are limited by the need to also use the Nortel VPN client.  The folks over at the Ubuntu forums have a workaround that works on Ubuntu Gutsy  (7.10) and the Apani 3.5 client.

http://ubuntuforums.org/showthread.php?t=110843&page=8 

You can download a timed eval copy of the VPN client here: http://www.apani.com/vpn-clients/nortel-overview.php

Note that the Ubuntu workaround discussed on the forum link above starts with the Red Hat tar file from Apani, not the vanilla Linux tar.

November 8, 2007

Great things from the Alfresco Community Conference

Filed under: ECM — jbrown @ 11:49 am

Just returned from New York City where we attended the inaugural Alfresco Community Conference. The conference was attended by both community and enterprise Alfresco customers as well as Alfresco integration partners. We flew out late Tuesday night, attended the conference Wednesday and then flew back Wednesday night. Not even time to have dinner at a great NYC restaurant!

The quick trip was well worth it however. Since most of the Alfresco team is quite spread out geographically, this was an opportunity to meet face-to-face with many we had worked with via email, phone, and the forums over the past few years.

I won’t go into all the details of everything covered at the conference at this time. You can see the complete agenda here: Conference Agenda and I suspect others will detail the great discussions led by both John Powell and John Newton. However, I do want to discuss a few of the major new features we can expect to see in the coming months. These are major advancements in out-of-the-box functionality and two particularly are in areas that we are seeing growing interest in from our clients.

Collaboration

The first is the Collaboration module that will be available in the v2.9 Community Edition. This module integrates popular wiki and blogging tools (MediaWiki and WordPress) into Alfresco and allows Alfresco to serve as the repository for such content as well as to integrate it’s workflow and search capabilities with these tools. We also saw a demo of the use of email-addressable content and spaces that allowed emails be stored in the repository. The content type of the email was even dynamic based on the context. For example, an email addressed to the alias of a Forum Topic space was seen as a post content type.

This module fills a major gap and now allows Alfresco to be the single source repository for all popular collaboration methods beyond the existing document collaboration. This code is already available in the v2.9 Community HEAD, so I can’t wait to check it out.

Flex

The integration with Flex http://flex.org/ for providing Rich Internet Applications (RIA) was the second major announcement. We saw a working demo of a Flex application being used to page through a virtual photo album of images stored in the Alfresco repository. This was done using the Flex API that is in v2.9 Community HEAD as well. The Alfresco team made it clear that they see Flex as the future of RIA and they plan to enhance the current JSP based web UI with a Flex version in the future. The difference in the user experience between a Flex application and a traditional HTML application is huge. I would compare it to watching football on a 50″ plasma HD versus the 36″ standard definition device. It is that type of jaw-dropping difference.

While I am discussing Flex, we saw some screenshots of the planned future “Alfresco Network Application” to be built using Flex. This application is targeted for the consumer and will allow “everyone” to take advantage of ECM transparently. This application is based on the social networking sites that have huge following already and are starting to gain some traction for enterprise use as well. There rough target for this is 2nd Qtr 2008 with the v3.0EE. That feature alone is worth it’s own blog coming soon.

iGoogle and FaceBook

Other features with 2.9 are Google gadget creation and FaceBook integration. We saw a demo of the familiar workflow tasks and spaces dashlets both displayed in iGoogle. I am guessing they take advantage of the new JavaScript workflow API as we saw them completely manage a workflow task from within iGoogle. For the FaceBook demo, we saw content in FaceBook being served and stored within the Alfresco repository real-time.

I also got a chance to pick David Caruana’s brain on some workflow ideas that I had as well as discuss the enhancements we can expect with version 2.2 and beyond. I have worked with David via the forums and support extensively over the last year, so it was a pleasure to finally talk in person.

That’s it for now.

October 17, 2007

Archived Alfresco Webinar available

Filed under: ECM — jbrown @ 10:26 am

In case you missed the webinar from 10/04 on advanced workflow and enterprise integration with Alfresco, the slides and audio are linked below:

Advanced Workflow and Enterprise Integration Webinar

October 5, 2007

Alfresco web scripts on BEA Service Bus.

Filed under: ECM, SOA / Integration — jbrown @ 10:32 am

We are just wrapping up a project where there was the need to expose Alfresco Web Scripts via the BEA AquaLogic Service Bus. This was a fairly simple process; however, there were a couple settings we had to tinker with. I will go over the details and hopefully it will save someone else some time down the road.

First some background for those who are not familiar. Alfresco is a professionally supported, open-source enterprise content management system (ECM). For this project, we used Alfresco as the ECM framework for a custom application that was based on document management and workflow. We were using the 2.1 Enterprise version of Alfresco, but this should also work for the 2.1 Community Editions as well. You can read more about Alfresco at: http://www.alfresco.com

AquaLogic Service Bus (ALSB) is a commercial product from BEA that serves as the ESB implementation for an SOA solution. The ALSB can be used to route, proxy, and orchestrate services. It also provides for centralized monitoring and governance of these services. The steps and screenshots I describe below are for ALSB v2.5. I suspect the steps would be the same with the new v2.6, but I have not had the chance to try. More info can be found at: http://www.bea.com

On with the details…

We leveraged the “Web Script” functionality available with Alfresco 2.1. This is a framework within Alfresco that allows you to create RESTful web services based on Alfresco content. In our case, we wrote a custom web script backed by a Java bean. That Java bean was responsible for pulling together several pieces of discreet content along with their properties and generating a single PDF summary document. Using the web script framework, we were able to expose this as an HTTP GET method and it returned a PDF document (CONTENT-TYPE = “application/pdf”).

As I go through the steps on ALSB, I will assume you have used this product before so I will only cover details specific to this use case. I also assume you have signed into the ALSB console and have created a project.

Step 1:

The first thing to do is to create a Service Account object. The Service Account determines how security credentials are used for the service. For simplicity in this example, select a “Static” type and enter your Alfresco credentials where provided. Note that in production, you would select “Pass Through” if both Alfresco and ALSB authenticate against the same directory. If they did not use the same directory you would select “Map” and map the ALSB credentials to the appropriate Alfresco credentials. Note that I am using the default HTTP Basic Authentication within Alfresco.

Step 2:

Next, create a Business Service object in this project:

  • Service Type = Messaging Service
  • Request Message Type = None (in my case the HTTP get as no request params.)
  • Response Message type = Text (note that this not truly the case, but we will take care of later)
  • Protocol = http
  • Endpoint URI = the Alfresco URL used to call your service. For example: http://127.0.0.1:8080/alfresco/service/ui/mycustomscript
  • HTTP Request Method = GET (In my case. POST should also work if your web script was setup for that)
  • Basic Authentication is Required – Checked (Note that unless your Alfresco web script allows guest access you will need to send in credentials.
  • Service Account – browse to the Service Account object that we created in the first step.
  • Follow HTTP redirects - Checked

Before clicking Save, your settings should look like this:

ALSB Business Service Screen Shot

Step 3:

Next, we need to create a Proxy Service object based on the Business Service object created above. Select the Same Request and Response Message Types and the same Protocol. Enter an Endpoint URI that the client will call. For example: /alfservice.

Since we used a Static Service Account type for the business service, leave the Basic Authentication Required unchecked. Note if you used a Map or Pass Through Service Account type, you would need to enable this option so that the proxy expected credentials to be passed from the client.

Your settings should look something like this:

ALSB Proxy Service screenshot

If you tried to test the Proxy Service now, it would fail because your web script is most likely not returning a Text content type (text/plain) as we indicated in the Business Service object. We set this to Text because ALSB does not have a application/pdf response type option and also because we do not want to tie ALSB to the web script’s response type if we have a choice.

Instead, we will instruct the Proxy to dynamically set the Content-Type within the HTTP Header to match the Content-Type coming from Alfresco. This way, your Alfresco web script can change content types without impacting the ALSB.

Step 5:

To do this, edit the proxy’s message flow and add a Pipeline Pair element. In the Response flow, add a Stage to handle this logic. Your message flow should now look something like this:

ALSB Proxy Message Flow screenshot

Next, edit the stage and add a Transport Headers Action. Select to set for the Inbound Response (inbound to the client, that is). Select the option to Pass all Headers thru the Pipeline.

Finally, select the HTTP Content-Type Header and the Action is Copy Header from Outbound Response. Before you click Save button, your screen should look like this:

ALSB Header screen shot


Once the ALSB session is Activated, you can test the Alfresco web script via the ALSB by calling the Endpoint URI you indicated in the Proxy Service configuration. Make sure you are pointing to the ALSB server and port and not the Alfresco server. For example, if ALSB is running locally on port 7001 use:

http://127.0.0.1:7001/alfservice

That’s it. A simple example, but you now have the option to do other actions in the proxy’s message flow as your requirements demand. You can also now monitor and set SLA targets and alerts for Alfresco services the same as you may already be doing for SOAP web services.

November 27, 2006

SOA - What is it again?

Filed under: SOA / Integration — jbrown @ 8:11 am

SOA - What is it?

In the past two years I have been asked multiple times by both technical and business people alike one question more than any other - “What is this SOA thing?” I think this is a common question because the marketing and press folks have done a very good job of muddying the water when it comes to tagging every piece of software as SOA-enabled, SOA-certified, etc.

The challenge is to explain what SOA is to the client - the people that pay the bills. SOA stands for Service Oriented Architecture and to start with, it is easy to define what SOA is not. SOA is not a single product you simply install and are done with it. I have had customers tell me not to worry about business requirements for a new system because “the SOA will handle all that”. Their understanding was that “the SOA” was a product you installed and it magically solved all the business problems. Hmmmm…..where is that salesperson? SOA is also not web services. It is true that web services are usually employed as part of a modern SOA solution, but in of themselves, they are not SOA.

So what is it and how do you explain it to your business customer?

SOA is a philosophy or vision of how software should be developed. Those that adhere to this philosophy believe that the most efficient way to build software is through a series of re-usable services. By “service” I mean any type of function that accomplishes a specific task. The idea is to build a layer of fine-grained functions and then begin building out more coarse-grained functions on top of that layer. A great business example is to imagine offering a coarse grained business service called AcceptPayment that within itself calls two services that are more fine-grained - AuthorizeCreditCard and PostPaymentToAR. At a recent conference, the speaker compared this composition of services to Legos and I agree that is a good analogy.

This service architecture promotes re-use, reduces maintenance, and is a more efficient way to design. The apex of SOA occurs once all the fine-grained services have been built and are easily available to coordinate into new coarse-grained business services as needed. This philosophy has been around for decades, but with the emergence of web services, it became much more popular and started to receive press and marketing attention.

So why is the term “SOA” in every article I have read in the past 2 years?

The reason for this surge is two-fold. First, with the introduction of web services, architects can now expose their services/functions in an accepted standard that is platform/language agnostic. Before web services, one could build using an SOA driven design and expose services within the firewall via RMI/EJB or JMS (assuming J2EE shop). To expose services outside the firewall to vendors for instance, one used CORBA or perhaps some custom format between the service producer and service consumer over HTTP.

The second reason for the increase in press was that a “look-up” technology known as UDDI was introduced. Before UDDI, one could build a business function as a service and expose it, but no one else could know about it. UDDI solved that problem by providing an agreed upon standard for marketing services to potential clients. Think of UDDI as a library for services. Because web services and UDDI are both open standards that began to get traction (web services much more than UDDI), this allowed software vendors to begin to make tools based on these standards.

The major software vendors started creating tools to easily expose web services and create web service clients for developers. They also began providing registry software based on the UDDI standard. These tools made the development of SOA driven design easier and MUCH more efficient. At that point, things really started to take off.

Powered by WordPress