Vous êtes sur la page 1sur 48

Implementing eGovernment Portal

Powered by Alfresco and Orbeon


Oksana Kurysheva Alexey Ermakov
Agenda
Part 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 3
rd
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
Part I:
Problems faced and approach chosen
The aim
Make government services available for citizens
and businesses online in electronic form
The aim
Make government services available for citizens
and businesses online in electronic form
Information about government services and ways of obtaining
Typical local eGov portal: information web site
Static information about eGov services is available
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 re!uest to receive government services online
"ull back#office integration$ including inter#agency cooperation
Main problems to address
Convert existing paper forms into electronic format
Establish workflows to execute submitted forms
Addressing electronic forms creation
Creating forms sounds simple. But it is not:
"orms can be really huge and complicated
"orms change time to time %monthly update for some of them&
'ist 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 re!uirements
Bottom line: there is no way to create forms definitions once
Addressing electronic forms creation
The only possible solution: government employees can create
and edit forms definitions themselves
It means creation and editing of do)ens of complicated forms by
non#technical users %including auto#checking configuration$ mapping
to templates for printing$ etc&
We need visual form authoring tool
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
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
Form definition creation in Orbeon Builder
Visual form definition editor
Form definition creation in Orbeon Builder
Adding auto-checking rules to control
"orm definition creation in Orbeon *uilder
Uploading PDF template for printing according with local
regulation (prepared in usual OpenOffice.org/LibreOffice)
Published form
example
Solution: forms authoring and submission
Addressing workflows: basic diagram
Addressing workflows: basic diagram
The issue:
Step 8 is actually a monstrous non-formalized process
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
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
Solution: complete architecture
Part II:
Implementation details
Orbeon Integration: Approach
Orbeon Integration: Implementation
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


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>
PUT Request
persistence.put.js
// create/get file
var file folder!childByNamePath"file_name#$
if "%file && folder!hasPermission""CreateChildren"##{
file folder!createNode"file_name' "formform!ype"#$
file!add"spect""cm#ersionable"#$
file!add"spect""cmauditable"#$
file!properties("cmcreated") new $ate"#$
%%%
file!properties("formid") form_data_id$
}
else
file!properties("cmmodified") new $ate"#$
file!sa#e"#$
var copy file!chec&out"#$
copy!properties!content!write"re'uestbody#$
file copy!chec&in""modified by orbeon forms"' true#$
file!mimetype re'uestbody!mimetype$
file!sa#e"#$
Persistence API problems

Forms definitions are stored in eXist


Content-type mismatch problem
Problem: content type mismatch
Solution: define two different scripts
<()) web script to return application/octet)stream ))>
<webscript &ind="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/*ml ))>
<webscript>
%%%
<url>/persistence/crud/{app_name}/{form_name}/data/
{form_data_id}/{file_name}!*ml</url>
<format default="_*ml">argument</format>
</webscript>
Orbeon Integration: Persistence Layer Complete
Submitted forms execution

Content model to store form metadata

Workflow to automate form execution

Java class to send e-mails to client


Content model
<type name="form+form,ype">
<title>-ontent class representing submitted form</title>
<parent>cm+content</parent>
<properties>
<property name="form+id">
<type>d+te*t</type>
<mandatory>true</mandatory>
</property>
<property name="form+submit.ate">!!!
<property name="form+chec/.ate">!!!
<property name="form+is-orrect">!!!
<property name="form+e*ecute.ate">!!!
<property name="form+chec/er">!!!
<property name="form+e*ecutor0>
</properties>
</type>
Workflow
Workflow model
<type name="form1f+chec/,as/">
<parent>bpm+1or/flo1,as/</parent>
<o#errides>
<property name="bpm+pac/age2tem3ction4roup">
<default>read_pac/age_item_actions</default>
</property>
</o#errides>
<mandatory)aspects>
<aspect>form1f+formaspect</aspect>
<aspect>form1f+assignee</aspect>
<aspect>form1f+comment3spect</aspect>
</mandatory)aspects>
</type>
formWorkflowModel.xml: type definition
Workflow model
<aspect name="form1f+formaspect">
<properties>
<property name="form1f+email">
<type>d+te*t</type>
</property>
<property name="form1f+chec/er">!!!
<property name="form1f+pre5ie1lin/">!!!
<property name="form1f+statuslin/">!!!
</properties>
</aspect>
formWorkflowModel.xml: form aspect definition
Workflow model
<aspect name="form1f+comment3spect0>
<properties>
<property name="form1f+comments">
<type>d+te*t</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
</properties>
</aspect>
formWorkflowModel.xml: comment aspect definition
Workflow model
<aspect name="form1f+assignee0>
<associations>
<association name="form1f+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
Java mailer
public class Notifier e*tends BaseProcessor+*tension {
!!!
public boolean send",tring to' ,tring sub-ect' ,tring content# {
!!!
Properties props ne1 Properties"#$
props%setProperty."mail%transport%protocol"/ "smtp"01
!!!
,ession mail,ession ,ession!get$efault2nstance"props' null#$
!ransport transport mail,ession!get!ransport"#$
3ime3essage message ne1 3ime3essage"mail,ession#$
!!!
message!set4ecipient"3essage!4ecipient!ype!!5' ne1 2nternet"ddress"to##$

transport!connect"#$
transport!send"message#$
transport!close"#$
}
}
Orbeon Integration: Workflows Complete
Additional Alfresco extensions developed

Custom file uploader


Related workflows extension
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


Custom file uploader
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
Related workflows
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
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


+ou can find this presentation and more details about this
implementation on blog,ossgeeks,org
-ontact us at
okurysheva.vdel,com and aermakov.vdel,com
And follow us on twitter/ .aviriel and .fufler

Vous aimerez peut-être aussi