case-5 using alfresco and orbeon to implement a local egovernment portal

48
Implementing eGovernment Portal Powered by Alfresco and Orbeon Oksana Kurysheva Alexey Ermakov

Upload: alfresco-software

Post on 18-Dec-2014

4.303 views

Category:

Technology


0 download

DESCRIPTION

Delivering online government services for citizens and businesses requires a full cycle of forms management. Workflows include web forms creation and updating, forms publishing on eGov portal, processing of submitted forms, hardcopies management, statistics and reporting. Let’s discuss how we can implement this with Alfresco ECM, Orbeon Forms and some magic.

TRANSCRIPT

Page 1: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Implementing eGovernment PortalPowered by Alfresco and Orbeon

Oksana Kurysheva Alexey Ermakov

Page 2: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

AgendaPart I – Problem definition and brief overview of the approach

• Local eGovernment Portals – Russian experience – current state and the most challenging problems

• Technical requirements – what do we need, what Alfresco provided and where 3rd party solution help was required

• Overall architecture of the system based on Alfresco and Orbeon

Part II – Implementation details

• Integrating Alfresco and Orbeon in less then a month – detailed architecture, configs, key sources snippets

• Workflows implementation – theory and practice – what we needed in real life in addition to Alfresco out-of-the-box capabilities

Page 3: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Part I:Problems faced and approach chosen

Page 4: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

The aim

Make government services available for citizens and businesses online in electronic form

Page 5: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

The aim

Make government services available for citizens and businesses online in electronic form

• Information about government services and ways of obtaining

Page 6: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Typical local eGov portal: information web siteStatic information about eGov services is available

Page 7: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

The aim

Make government services available for citizens and businesses online in electronic form

• Information about government services and ways of obtaining• Ability to submit a request to receive government services online• Full back-office integration, including inter-agency cooperation

Page 8: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Main problems to address

Convert existing paper forms into electronic format

Establish workflows to execute submitted forms

Page 9: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Addressing electronic forms creation

Creating forms sounds simple. But it is not:

• Forms can be really huge and complicated

• Forms change time to time (monthly update for some of them)

• List of forms to be available online is not fixed — it is regulated by federal and local laws, updates happen few times a year

• Each agency has its own requirements

Bottom line: there is no way to create forms definitions once

Page 10: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Addressing electronic forms creation

The only possible solution: government employees can create and edit forms definitions themselves

• It means creation and editing of dozens of complicated forms by non-technical users (including auto-checking configuration, mapping to templates for printing, etc)

We need visual form authoring tool

Page 11: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Electronic forms management: finding the tool

What Alfresco is:

• Document management

• Forms storage and management

• Workflow automation platform (discussed further)

• Open and flexible ECM that creates the basis for future inter-agency cooperation and systems integration

What Alfresco is not:

• Form authoring tool that allows non-technical users to create complicated forms visually

Approach: integrate Alfresco and Orbeon

Page 12: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

What is Orbeon?

• Orbeon Forms – open source forms solution

• Based on XForms and Ajax

• Implemented in Java

• Integration-friendly (discussed further)

• Orbeon consists of 2 modules:

• Forms Builder – visual form authoring tool

• Forms Runner – runtime for deployed forms

Page 13: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Form definition creation in Orbeon BuilderVisual form definition editor

Page 14: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Form definition creation in Orbeon BuilderAdding auto-checking rules to control

Page 15: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Form definition creation in Orbeon Builder

Uploading PDF template for printing according with local regulation (prepared in usual OpenOffice.org/LibreOffice)

Page 16: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Published formexample

Page 17: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Solution: forms authoring and submission

Page 18: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Addressing workflows: basic diagram

Page 19: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Addressing workflows: basic diagram

The issue:Step 8 is actually a monstrous non-formalized process

Page 20: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Addressing workflows

The issue: internal workflows are not fixed strictly

• Each basic 'atomic' internal workflow can be described in details but throughout form execution can not:

• There are a lot of optional stages that can be included or not

• Single form execution can trigger lots of internal processes to request additional papers, approvals, notifications an so on

• Each sub-process can trigger even more child processes

• Yeh, Russia is a very bureaucratic country after all

Page 21: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Addressing workflows

Solution: create workflows relations

• Create basic 'atomic' workflows definitions

• Allow users to associate these simple workflows with each other to build complex processes on demand

Page 22: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Solution: complete architecture

Page 23: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Part II:Implementation details

Page 24: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Orbeon Integration: Approach

Page 25: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Orbeon Integration: Implementation

Page 26: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Persistence API Implementation

REST Web Scripts

• PUT: add new file to repository

• GET: return file from repository

• POST: perform a search in repository

• DELETE: remove file from repository

Page 27: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

PUT Request

persistence.put.desc.xml

<webscript> <shortname>Persistence Layer</shortname> <description>Web script implementing Orbeon Forms Persistence Layer put request</description> <url>/persistence/crud/{app_name}/{form_name}/data/{form_data_id}/{file_name}</url> <authentication runas="orbeon">user</authentication> <transaction>required</transaction> <format default="html">argument</format></webscript>

Page 28: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

PUT Requestpersistence.put.js

// create/get filevar file = folder.childByNamePath(file_name);if (!file && folder.hasPermission("CreateChildren")){ file = folder.createNode(file_name, "form:formType"); file.addAspect("cm:versionable"); file.addAspect("cm:auditable"); file.properties["cm:created"] = new Date(); ... file.properties["form:id"] = form_data_id;}else file.properties["cm:modified"] = new Date();file.save();var copy = file.checkout(); copy.properties.content.write(requestbody);file = copy.checkin("modified by orbeon forms", true); file.mimetype = requestbody.mimetype;file.save();

Page 29: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Persistence API problems

• Forms definitions are stored in eXist

• Content-type mismatch problem

Page 30: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Problem: content type mismatch

Solution: define two different scripts

<!-- web script to return application/octet-stream --> <webscript kind="org.alfresco.repository.content.stream">... <url>/persistence/crud/{app_name}/{form_name}/data/{form_data_id}/{file_name}.pdf</url> <format default="">argument</format>...</webscript>

<!-- web script to return application/xml --><webscript>... <url>/persistence/crud/{app_name}/{form_name}/data/{form_data_id}/{file_name}.xml</url> <format default="_xml">argument</format></webscript>

Page 31: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Orbeon Integration: Persistence Layer Complete

Page 32: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Submitted forms execution

• Content model to store form metadata

• Workflow to automate form execution

• Java class to send e-mails to client

Page 33: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Content model <type name="form:formType">

<title>Content class representing submitted form</title>

<parent>cm:content</parent>

<properties>

<property name="form:id">

<type>d:text</type>

<mandatory>true</mandatory>

</property>

<property name="form:submitDate">...

<property name="form:checkDate">...

<property name="form:isCorrect">...

<property name="form:executeDate">...

<property name="form:checker">...

<property name="form:executor“>

</properties>

</type>

Page 34: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Workflow

Page 35: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Workflow model

<type name="formwf:checkTask">

<parent>bpm:workflowTask</parent>

<overrides>

<property name="bpm:packageItemActionGroup">

<default>read_package_item_actions</default>

</property>

</overrides>

<mandatory-aspects>

<aspect>formwf:formaspect</aspect>

<aspect>formwf:assignee</aspect>

<aspect>formwf:commentAspect</aspect>

</mandatory-aspects>

</type>

formWorkflowModel.xml: type definition

Page 36: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Workflow model

<aspect name="formwf:formaspect">

<properties>

<property name="formwf:email">

<type>d:text</type>

</property> <property name="formwf:checker">...

<property name="formwf:previewlink">...

<property name="formwf:statuslink">...

</properties>

</aspect>

formWorkflowModel.xml: form aspect definition

Page 37: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Workflow model

<aspect name="formwf:commentAspect“>

<properties>

<property name="formwf:comments">

<type>d:text</type>

<mandatory>false</mandatory>

<multiple>false</multiple>

</property>

</properties>

</aspect>

formWorkflowModel.xml: comment aspect definition

Page 38: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Workflow model

<aspect name="formwf:assignee“>

<associations>

<association name="formwf:assignee">

<source>

<mandatory>false</mandatory>

<many>false</many>

</source>

<target>

<class>cm:person</class>

<mandatory>false</mandatory>

<many>false</many>

</target>

</association>

</associations>

</aspect>

formWorkflowModel.xml: assignee aspect definition

Page 39: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Java mailer

public class Notifier extends BaseProcessorExtension {

...

public boolean send(String to, String subject, String content) {

...

Properties props = new Properties();

props.setProperty("mail.transport.protocol", "smtp");

...

Session mailSession = Session.getDefaultInstance(props, null);

Transport transport = mailSession.getTransport();

MimeMessage message = new MimeMessage(mailSession);

...

message.setRecipient(Message.RecipientType.TO, new InternetAddress(to));

transport.connect();

transport.send(message);

transport.close();

}

}

Page 40: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Orbeon Integration: Workflows Complete

Page 41: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Additional Alfresco extensions developed

• Custom file uploader

• Related workflows extension

Page 42: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Custom file uploader

• Attach files from local drive directly to workflow

• Intuitive 'Google-style' end-user experience

• Uses YUI Uploader: no third party libraries are needed

Page 43: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Custom file uploader

Page 44: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Related workflows

• Creates relations between workflows

• Start new workflow from task edit page

• View all related workflows of current task from task page

• Easy to see which process blocks current task

• Easy to get process «dependencies» for stats

• Bottom line: no «mega workflow» is required, allows to

build execution paths from «basic blocks» on demand

Page 45: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Related workflows

Page 46: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Summary: Current project state

• Orbeon and Alfresco integration allows non-technical

users to create and edit form definitions easily

• Forms are stored and processed in Alfresco, creating a

basement for managing all documents in one system

• Forms execution became more intuitive and simple

compared with legacy document management system

Page 47: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

Roadmap: Features planned

• Statistics module to report on workflows execution for

management

• Organizational chart extension to pick employees from

orgchart, assign tasks to organizational roles, manage

tasks access control, get statistics on departments

• Replace eXist completely, move everything to Alfresco

Page 48: CASE-5 Using Alfresco and Orbeon to Implement a Local eGovernment Portal

You can find this presentation and more details about this implementation on blog.ossgeeks.org

Contact us at [email protected] and [email protected]

And follow us on twitter: @aviriel and @fufler