320 likes | 404 Views
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 “.
E N D
Short Intro • Axel Faust • AlfrescoArchitect • Frankfurt, Germany • Community • Alfresco Forums (EN / DE) • Challenged Jeff Potts (andwon !?) • Twitter: @ReluctantBird83 • Blog: axel-faust.de (EN / DE) • Summary 2011 – 2012: „Level up“
Definition / Scope • „Complex“ Workflow • User perspective • Numberoftasks / collaborators • Pattern ofinteraction • Technical perspective • System integrations • Automation complexity • „Content“ Workflow • Content-centric – not just peripheral • Interaction with / manipulationofcontentitems
Definition / Scope • Not considered: unnecessary / excessive BPM • Business + developmentagree on KISS • Alternative approaches • Dynamic BPM • BPM + collaboration hybrid (e.g. withtaskdatalist) • Pitfallcategories • Usability • Development • Costof Ownership
Usability#1 – Long click-streams#2 – Unclear / ambigouscontext
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 MT TE #1.1 WD #1 DD #1 DD #2 DD #3 DL #A FD #B DD #C
Issues of End-Users • Isolatedoverviews / filters • „Content in tasksassignedtoMe“ ? • „(Assigned | Pooled) Tasks in Site X“ ? • Limitation by lack ofcontext • Processinformation in Document Library • Metadata / content in Forms • Distribution ofactions • Simple editing • Relevant businessactions
Context in Document Library • Simple customizations • Virtual Metadata • Indicators • Custom filters • Methods • DocLibCustomization • RepoWebScript • Override 4.0 / 4.1 • Surf Extensibility 4.2
Context / Actions in Forms • Relateddata • Virtual fields via Forms API • Customizedcontrols • Relatedactions • Hook in association.ftl • ReusingAlfrescomodules • Controlconfiguration • Start location • Noderesolver • …
Other Improvements • UI Mediator pattern • Delayedpageredirection • Check forfollow-uptask • Adaptednotifications • Specifictemplateswith relevant metadata • Optional: offline-packageasattachment • Additional views • Task listforsupervisors / processowners • Recentlyupdatedtasks
Knowing what‘s possible • Alfresco 4.0: Activiti 5.7 • Incomplete BPMN 2.0 • Noasynch. continuations • Alfresco 4.2: Activiti 5.10 • Suspension ofprocesses? • Signals / messages? • Potential issues • Modellingeffortwasted • Unnecessarycomplexity • Unstableprocess / solution
ProcessRelevance • Task Compensation • „Undo“ handler • Onlycompletedtasks • E.g. un-synchcontent • Asynch. Continuation • Decouplingtasks • Error Event • Explicit handlingofbusinessfaults
Example: Complexityof Content Distribution Alfresco 4.0 / 4.1 + Activiti 5.7 Alfresco 4.2 + Activiti 5.10 Asynch Queue Signal Alfresco Node Store Outgoing Message Queue 30m Message Bundle X Search & Acquire Remove Process Alfresco Job (Quartz)
IssueswithPermissions / Policies • Large numberoferrors / questions in forums (>2,5 %) • 447 / 1.190 topics: „Access Denied“ / „runAs“ • 756 topics: „Failedtosignaltransition“ (jBPM) • Statistical assumption: ~75 % permissions / policies • Limited control in process • User-managedpermissionsandstate • Unrelatedservicesandprocesses
Common Constellations Txn Start UserTaskListener (JavaScript) Policy A Public Service Service Impl. Public Service Service Impl. Policy B ServiceTask (Java) Policy C Commit Queue RunAs „User X“ Listener (JavaScript) Public Service Service Impl. Policy D Txn Begin Commit Policy B Public Service Service Impl. Policy D Txn End Commit
Suggested Options • Handle coreaspects • Explicit versionmanagement • Detectlocks / workingcopiesand deal appropriately • Decoupleuserandservicetasks • Asynch. continuationsrunas „System“ • AvoidhabitualuseofrunAs in process • Avoidoverlapwithpolicies / rules
Affectedelements • „Overloading“ • Non-trivial code in process • Logic in 2nd tierhandlers • Issues • BPM engineversioning • Bugfixing in-flight? • Minor changes? • Redundant code • Core process • Web scripts+ utils • Limited debuggingsupport
Externalizing Scripts Default importmechanism
Externalizing Scripts Default importmechanism (not debuggable) ALF-13631 Import API (debuggable)
Externalizing Scripts Default importmechanism (not debuggable) ALF-13631 Import API (debuggable, customizable) Processspecificimporter Version- andprocess- awareimporter
MovingLogicinto Services • (Almost) A rolemodel: Alfrescoinvitationworkflow • Highlyadvisable • BPM-specificcodeonlyformappinganddelegation • Auditableserviceinterface • Utilities forscriptaccess • Roomforimprovement • Conclusionhandledby BPM helperinsteadofservice => Audit incomplete • Lack ofservice / process-specificpermissions
Process Evolution ProcessInstances • Issues • Conflicts / blockages in existingprocesses • Confusionofusers • Support effort • Causes • Existingstate in arbitrarycombination • Lack of uniform versioningconcept • Var. pointsofincom-patibility 1.0 Task modelchanged 1.1 Processrefactoring Java handlerupdates 2.0 Java handlerupdates Form configchange 2.1
ApproachestoProcess Evolution • Basic strategies • „ThrowAway“ activeprocesses • Migrateprocessinstances • Parallel existence / operation • Predominant: parallel operation • Distinctartefacts after change • Alt.: codehandlesoldprocessinstancesexplicitly
Handling DistinctArtefacts • Explicit versions • Java: package / classname • JavaScript: path / importcontext • Model / forms: namespaces / types • Version handlingsupport • Reference update via filtering in buildautomation • Import resolutionbased on versionranges • Extension / import • Not „fromscratch“
Conclusion • Limited pitfallselection • Analysis and design • Training andbusinessdeployment • Measuringprocesssuccess / metrics • Sufficienttoolingtoavoiddevpitfalls • Strong and innovative platform • Activecommunity • Thanksforyourattention