Lapis Server 1.2.7

Posted: 29 June 2014 in Teamsite

The lapis server version 1.2.7 is now done.

JCR integration

As promised, the JCR intergration has been done.

We can define repositories centrally via an XML configuration file such as the one below.

<repositories> <repository name="jackrabbit.cq5.dev.author.crx.default" path="/jackrabbit/cq5/dev/author" type="jsr170" url="http://localhost:4502/crx/server" username="admin" password="SrAxtm8ihY+hBPYklrYYJQ=="> <action name="Go to" pattern="http://localhost:4502/crx/de/index.jsp#/crx.default/jcr%3aroot${path}" /> </repository> <!-- <repository name="jackrabbit.cq5.dev.publish.crx.default" path="/jackrabbit/cq5/dev/publish" type="jsr170" url="http://localhost:4503/crx/server" username="admin" password="SrAxtm8ihY+hBPYklrYYJQ==" /> --> </repositories> Note that we can associate a number of actions for the repository. This is used by the web app to display link to your repository browser app (in my example, it's Adobe's CQ5) 
As per the previous post, the client can retrieve the details of the repository and connect to it. The node action (e.g. the custom java of your tasks) would connect to the JCR in the following way: 
 List<String> repositories = client.getRepositories(); for (String repository : repositories) { Repository jcrRepository = JcrUtils.getRepository(client.getJCRRepositoryURL(repository)); Credentials credentials = client.getJCRCryptedCredentials(repository); Session jcrSession = jcrRepository.login(credentials); /* do something with the nodes */ List<String> attached = nodeToken.getGraphExecution().getAttached(); for (String anAttached : atached){ /* e.g. /jackrabbit/cq5/dev/author/some/path/within */ String basePath = client.getJCRRepositoryPath(attached); /* e.g. /jackrabbit/cq5/dev/author */ LapisPath lapisPath = new LapisPath(basePath,attached); logger.info(lapisPath.modulatePath()); /* e.g. /some/path/within */ Node node = jcrSession.getNode(lapisPath.modulatePath()); /* retrieve the node at the modulated path */ / * do something with it */ } }

Attached JCR nodes

Attached nodes are now also supported by the wfstart.sh command line tool via a “lapis.attached={path}” argument. The new wfupdate.sh command line tool also supports attaching and detaching jcr nodes via the -attach and -detach options.

The web application allows to browse the repository and select nodes to attach.

LapisServer on RedHat OpenShift and Saas

I’ve started placing a new version of the web app on OpenShift, the Redhat cloud server. This is to be able to offer the software as a service. I still have to define my pricing plan, but the free option will enable users to instantiate a “todo” workflow. the first upgrade other options would enable users to instantiate a “assign” workflow where groups and group tasks would be enabled. The next upgrade option would see the introduction of custom workflows where email tasks would be enabled. The final upgrade option after that would be a custom instance of the server with our support.

Multi-homed environments

An interesting side effect of looking at the Redhat Openshift was that the servers have multiple IP addresses and the default RMI configuration was of course picking the one which had security restrictions. It is now possible to add a server property named “bindAddress” which forces the Lapis server to listen on a particular network interface. Likewise for the client tools, the local end of the socket can be made to pick the correct IP address when connecting to the server.

Audit trail

In addition to the workflows and the tasks showing an audit trail of when they are created, activacted, rejected and completed, all the events ( such as when a property is changed or a JCR node attached) are now stored, thus giving a complete audit trail of what happened during the life of the workflow.

What’s next?

I will be focusing on the Saas web app for signup and the todo workflow (I’m already 2/3rds through so it shouldn’t take long) and then start on the assignment workflow and find out what that means about the groups.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s