pitfalls of complex content workflow development

31
Pitfalls of Complex Content Workflow Development

Upload: shea-braughton

Post on 31-Mar-2015

240 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Pitfalls of Complex Content Workflow Development

Pitfalls of Complex Content Workflow Development

Page 2: 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“

Page 3: Pitfalls of Complex Content Workflow Development

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

Page 4: Pitfalls of Complex Content Workflow Development

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

Page 5: Pitfalls of Complex Content Workflow Development

Usability#1 – Long click-streams

#2 – Unclear / ambigous context

Page 6: Pitfalls of Complex Content Workflow Development

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

Page 7: Pitfalls of Complex Content Workflow Development

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

Page 8: Pitfalls of Complex Content Workflow Development

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

Page 9: Pitfalls of Complex Content Workflow Development

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• …

Page 10: Pitfalls of Complex Content Workflow Development

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

Page 11: Pitfalls of Complex Content Workflow Development

Development#3 – Unknown BPM limits / features

Page 12: Pitfalls of Complex Content Workflow Development

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

Page 13: Pitfalls of Complex Content Workflow Development

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

Page 14: Pitfalls of Complex Content Workflow Development

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

Page 15: Pitfalls of Complex Content Workflow Development

Development#4 – Handling permissions / policies incorrectly

Page 16: Pitfalls of Complex Content Workflow Development

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

Page 17: Pitfalls of Complex Content Workflow Development

UserTask Listener

(JavaScript)

ServiceTask (Java)

Txn Start

Listener (JavaScript

)

Txn Begin Commit

Txn End Commit

Policy B

Policy C

Policy D

CommitQueue

Policy DPublic

ServiceService Impl.

Policy BPublic

ServiceService Impl.

Public Service

Policy A

Service Impl.

Public Service

Service Impl.

Common Constellations

RunAs „User X“

Page 18: Pitfalls of Complex Content Workflow Development

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

Page 19: Pitfalls of Complex Content Workflow Development

Cost of Ownership#5 – Overloading process with implementation

Page 20: Pitfalls of Complex Content Workflow Development

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

Page 21: Pitfalls of Complex Content Workflow Development

Externalizing Scripts

Default import mechanism

Page 22: Pitfalls of Complex Content Workflow Development

Externalizing Scripts

Default import mechanism

(not debuggable)

ALF-13631 Import API

(debuggable)

Page 23: Pitfalls of Complex Content Workflow Development

Externalizing Scripts

Default import mechanism

(not debuggable)

ALF-13631 Import API

(debuggable, customizable)

Process specific importer

Version- and process-aware importer

Page 24: Pitfalls of Complex Content Workflow Development

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

Page 25: Pitfalls of Complex Content Workflow Development

Cost of Ownership#6 – Not considering backwards compatibility

Page 26: Pitfalls of Complex Content Workflow Development

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

Page 27: Pitfalls of Complex Content Workflow Development

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

Page 28: Pitfalls of Complex Content Workflow Development

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“

Page 29: Pitfalls of Complex Content Workflow Development

Time is running out…

Page 30: Pitfalls of Complex Content Workflow Development

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

Page 31: Pitfalls of Complex Content Workflow Development

Questions / Feedback