New features in Assemble Silverstone M2

General Connection API Features

  • Make it easier to set override parameters on Connection (6135)
    • setProtocolConfiguration(null, configMap)
      • Configuration will be supplied to whichever protocol is selected.
      • Previously had to name the protocol so the application had to pre-empt protocol selection in order to supply programmatic configuration.

  • POSTJMSMessage activity in zero.connection.jms (6366)
    • Allows flows to send a message to a configured external JMS provider.
    • Based on existing POSTMessage from the Reliable Transport Extension.

  • MQ Connectivity from Connection API (5962)
    • Documentation for zero.connection.jms now contains notes for WebSphere MQ (in addition to WebSphere Application Server).
    • Test and doc changes only – no functional change since 1.0.x

  • Added new zero.connection.demo to samples (3381)

Connection “sftp” protocol (2694)

  • sftp protocol for Connection API
    • zero.connection.sftp
    • Includes OSSC Jsch SSH implementation

  • Similar to file and ftp protocols in zero.core

  • Supported operations:
    • GET – read remote file contents
    • PUT – write/replace remote file contents
    • DELETE – delete remote file

  • Automatically selected for resource using sftp: prefix
    • Connection.doGET(“sftp://localhost:22/hello_world.txt”).getResponseBodyAsString()

Connection “sftp” protocol (2694)

  • SSH server can be verified in two ways:
    • Standard SSH known hosts file, e.g.:
      • /config/connection/defaults/sftp/knownHosts = "/home/mnuttall/.ssh/known_hosts"
    • Fingerprint in connection destination configuration, e.g.:

  /config/connection/destinations += {  
    "sftp://myhost.mydomain.com:22/*" : {    
      "connection": {      
        "protocol" : "sftp",      
          "config": {       
            "fingerprint" :         
               "ab:2e:0b:fc:75:91:aa:be:cc:dd:01:0f:ff:4d:1f:71“     
             }
        }
    }
  } 

POP3 mail kicker and receiver (5448)

  • Allows request processing to be trigged by an e-mail message.
  • Example uses:
    • “Subscribe”/”Unsubscribe” auto-responder.
    • Accept XML documents sent by e-mail from third-party applications.
  • Features:
    • Monitors POP3 folder using kicker/receiver pattern.
    • Separates message body, attachments and inline content into separate streams.
    • Note this loses the internal structure of a multi-part message.
    • Includes activities to handle incoming e-mail in a flow.
  • Limitations:
    • No official support for POP3 over SSL (being added in M3)
    • No official support for IMAP (possible future enhancement)
    • No Connection API protocol to examine contents of POP3 folder
  • Components:
    • zero.mail.kicker
Polls POP3 folder for new e-mail messages “Kicks” receiver when one arrives
    • zero.mail.receiver
      • Reads new message into GlobalContext
      • Fires mailMessage event
      • Deletes e-mail from queue when request complete
      • Also includes activities for use with zero.assemble.flow
    • zero.mail (not explicit in documentation)
      • Parent dependency containing common code for kicker and receiver.
  • GlobalContext for mailMessage event:
    • /request/mail/headers/ headerName
      • Values of the named header of the message, represented as a FirstElementList.
    • /request/mail/body/headers/ headerName
      • Values of the named header of the first message body, represented as a FirstElementList.
    • /request/mail/body/contentType
      • Content type value of the first message body.
    • /request/mail/body/inputStream
      • Input stream containing the first message body.
    • /request/mail/allBodies
      • List containing all message bodies.
    • /request/mail/attachments
      • List containing all attachments and inline content.

  • Example flow to handle email and attachment:
  <process name="myMailMessageFlow&#8220; 
             expressionLanguage="Groovy">  
    <receiveMailMessage name="receiveMailMessage_0"/>  
    <findMailAttachment name="findMailAttachment_0&#8220;
                file-name=&#8220;account(.*)?&#8220;
                content-type=&#8220;text/xml&#8221;>
      <control   source="$receiveMailMessage_0"/>
    </findMailAttachment>
    <getMailAttachmentContent
                name="getMailAttachmentContent_0">
      <input value="${findMailAttachment_0}"/>
    </getMailAttachmentContent>
  </process> 

Flow and Tooling

Summary of New Features

  • Support the AJAX API for JavaScript developer to simplify the feed processing in browser-side by leveraging Assemble flow’s capability
  • Support the flow persistence
  • New user experience of Flow Editor

AJAX Feed API – zero.feed

  • Simplify the feed accessing and manipulation in browser-side for JavaScript developer by leveraging server-side Assemble flow capabilities.
  • JavaScript API in the browser
    • Fluent API with method chaining
    • Support the synchronized or asynchronized calling.
    • Resulting feed in both XML and JSON format
  • Assemble flow in the backend
    • Cross-domain access
    • High performance feed operations by stream processing
      • E.g. aggregate, filter, exclude, after, before, unique, top, etc.
    • Feed format support: RSS 0.9x/1.0/2.0, ATOM 0.3/1.0

Code Sample:  
CoreSample.png FunctionList.png

Demo: Feeds of WebSphere sMash

   
1 Aggregate feed from projectzero.org (blog and forum), and Google BlogSearch
2 Remove duplicate entry
3 Sort by published date
4 Get top 20 entries.
fetchZeroFeeds.png

Flow Persistence

  • In previous release, the Assemble flow engine leverage the APP zone of GlobalContext to management the visibility and lifecycle of flow context information.
    • The flow context could be survived after JVM recycle, but it could not be survived after zero application stopping.
  • In this release, we provides a simple and extensible persistence mechanism to store the flow instances.
    • Configurable FlowContextManager. There are two implementations included with flow engine.
      • DefaultFlowContextManager: store the flow context into "app" zone of GlobalContext
      • JDBCFlowContextManager: store in Database based on zero.data
    • The “flowStateChange” event will trigger the event handler to store the flow instance.

Persistence Policy

  • Different flows may have the different requirements of persistence. E.g. the flow execution for feed aggregation is transient, the flow status is not required for persistence.
  • The developer can specify the persistence policy by setting the "persistPolicy" attribute in "process" element of flow definition. Currently, Assemble flow engine support the following persistence policies
    • “on” : Default value. All flow instances are saved normally.
    • “failed”: Only failed instances will be saved. The instances complete successfully will not be saved
    • “off”: No instances will be stored.

persistPolicy.png

New User Experience of Flow Editor

FlowEditor.png

New User Experience of Flow Editor (Cont.)

FlowEditor2.PNG

  Attachment Action Size Date Who Comment
png CoreSample.png props, move 4.6 K 15 Sep 2008 - 20:15 bobs Core Sample
png FlowEditor.png props, move 221.6 K 15 Sep 2008 - 20:17 bobs Flow Editor
png FlowEditor2.PNG props, move 64.7 K 15 Sep 2008 - 20:25 bobs Feed Flow part 2
png FunctionList.png props, move 63.6 K 15 Sep 2008 - 20:18 bobs Func List
png fetchZeroFeeds.png props, move 130.8 K 15 Sep 2008 - 20:17 bobs Fetch Zero Feeds
png persistPolicy.png props, move 5.1 K 15 Sep 2008 - 20:18 bobs Persist policy
r2 - 15 Sep 2008 - 22:15:19 - bobs
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site