Process Controlled Workflow & Custom BRF Expressions for Complex Approval Processes in SRM 7.0
Pitfalls of Complex Content Workflow Development
description
Transcript of Pitfalls of Complex Content Workflow Development
Pitfalls of Complex Content Workflow Development
Short Intro
• Axel Faust• Alfresco Architect• Frankfurt, Germany
• Community• Alfresco Forums (EN / DE)
• Challenged Jeff Potts (and won !?)
• Twitter: @ReluctantBird83• Blog: axel-faust.de (EN / DE)
• Summary 2011 – 2012: „Level up“
Definition / Scope
• „Complex“ Workflow• User perspective
• Number of tasks / collaborators• Pattern of interaction
• Technical perspective• System integrations• Automation complexity
• „Content“ Workflow• Content-centric – not just peripheral
• Interaction with / manipulation of content items
Definition / Scope
• Not considered: unnecessary / excessive BPM• Business + development agree on KISS• Alternative approaches
• Dynamic BPM• BPM + collaboration hybrid (e.g. with task data list)
• Pitfall categories• Usability• Development• Cost of Ownership
Usability#1 – Long click-streams
#2 – Unclear / ambigous context
Task-oriented Navigation
• Legend• UD: User Dashboard• MT: My Tasks• TE: Task Edit• WD: Workflow Details• DD: Document Details• FD: Folder Details• DL: Document Library
• Explicit Navigation• History / Back
UD
DD #3
DL #A
DD #C
FD #B
DD #1
MTTE #1.1
WD #1
DD #2
Issues of End-Users
• Isolated overviews / filters• „Content in tasks assigned to Me“ ?• „(Assigned | Pooled) Tasks in Site X“ ?
• Limitation by lack of context• Process information in Document Library• Metadata / content in Forms
• Distribution of actions• Simple editing• Relevant business actions
Context in Document Library
• Simple customizations• Virtual Metadata• Indicators• Custom filters
• Methods• DocLib Customization• Repo WebScript
• Override 4.0 / 4.1• Surf Extensibility 4.2
Context / Actions in Forms
• Related data• Virtual fields via Forms API• Customized controls
• Related actions• Hook in association.ftl• Reusing Alfresco modules
• Control configuration• Start location• Node resolver• …
Other Improvements
• UI Mediator pattern• Delayed page redirection• Check for follow-up task
• Adapted notifications• Specific templates with relevant metadata• Optional: offline-package as attachment
• Additional views• Task list for supervisors / process owners• Recently updated tasks
Development#3 – Unknown BPM limits / features
Knowing what‘s possible
• Alfresco 4.0: Activiti 5.7
• Incomplete BPMN 2.0• No asynch. continuations
• Alfresco 4.2: Activiti 5.10
• Suspension of processes?• Signals / messages?
• Potential issues• Modelling effort wasted• Unnecessary complexity• Unstable process / solution
Process Relevance
• Task Compensation• „Undo“ handler• Only completed tasks• E.g. un-synch content
• Asynch. Continuation• Decoupling tasks
• Error Event• Explicit handling of
business faults
Example: Complexity of Content Distribution
Alfresco 4.0 / 4.1 + Activiti 5.7 Alfresco 4.2 + Activiti 5.10
Message Bundle X
Outgoing Message QueueAlfrescoNode Store
Alfresco Job (Quartz)
Search &Acquire Process Remove
Queue Signal
30m
Asynch
Development#4 – Handling permissions / policies incorrectly
Issues with Permissions / Policies
• Large number of errors / questions in forums (>2,5 %)
• 447 / 1.190 topics: „Access Denied“ / „runAs“• 756 topics: „Failed to signal transition“ (jBPM)
• Statistical assumption: ~75 % permissions / policies
• Limited control in process• User-managed permissions and state• Unrelated services and processes
UserTask Listener
(JavaScript)
ServiceTask (Java)
Txn Start
Listener (JavaScript
)
Txn Begin Commit
Txn End Commit
Policy BPolicy C
Policy D
CommitQueue
Policy DPublic Service
Service Impl.
Policy BPublic
ServiceService Impl.
Public Service
Policy AService Impl.
Public Service
Service Impl.
Common Constellations
RunAs „User X“
Suggested Options
• Handle core aspects• Explicit version management• Detect locks / working copies and deal appropriately
• Decouple user and service tasks• Asynch. continuations run as „System“• Avoid habitual use of runAs in process
• Avoid overlap with policies / rules
Cost of Ownership#5 – Overloading process with implementation
Affected elements
• „Overloading“• Non-trivial code in process• Logic in 2nd tier handlers
• Issues• BPM engine versioning
• Bugfixing in-flight?• Minor changes?
• Redundant code• Core process• Web scripts + utils
• Limited debugging support
Externalizing Scripts
Default import mechanism
Externalizing Scripts
Default import mechanism(not debuggable)
ALF-13631 Import API(debuggable)
Externalizing Scripts
Default import mechanism(not debuggable)
ALF-13631 Import API(debuggable, customizable)
Process specific importer
Version- and process-aware importer
Moving Logic into Services
(Almost) A role model: Alfresco invitation workflow
• Highly advisable• BPM-specific code only for mapping and delegation• Auditable service interface• Utilities for script access
• Room for improvement• Conclusion handled by BPM helper instead of service => Audit
incomplete• Lack of service / process-specific permissions
Cost of Ownership#6 – Not considering backwards compatibility
Process Evolution
• Issues• Conflicts / blockages in
existing processes• Confusion of users• Support effort
• Causes• Existing state in arbitrary
combination• Lack of uniform versioning
concept• Var. points of incom-
patibility
1.0
1.1
2.0
2.1
Task model changed
Process refactoringJava handler updates
Java handler updatesForm config change
Process Instances
Approaches to Process Evolution
• Basic strategies• „Throw Away“ active processes• Migrate process instances• Parallel existence / operation
• Predominant: parallel operation• Distinct artefacts after change• Alt.: code handles old process instances explicitly
Handling Distinct Artefacts
• Explicit versions• Java: package / class name• JavaScript: path / import context• Model / forms: namespaces / types
• Version handling support• Reference update via filtering in build automation• Import resolution based on version ranges
• Extension / import• Not „from scratch“
Time is running out…
Conclusion
• Limited pitfall selection• Analysis and design• Training and business deployment• Measuring process success / metrics
• Sufficient tooling to avoid dev pitfalls• Strong and innovative platform• Active community
• Thanks for your attention
Questions / Feedback