Building Custom Workflows Giorgio Garcia-Agreda CEO Crionet MVP Microsoft Dynamics CRM
Agenda Architecting CRM over xRM Business Processes and Workflows When to use Custom Workflows DEMO
The X Factor Sort of (smart) middle ground Become the tailor of yourself Use a flexible/customizable framework for creating your tailor-made solutions Points Fraction of the cost Possibly mature skills on architecture/process
3 Prerequisites for X Layers
Multiple layers/tiers Layers are a strict requirement for systems with a considerable lifespan Benefits Maintainability, ease of implementation, extensibility, and testability Implementation is … Neither free of issues nor cheap
Separation of Concerns E. Dijkstra, 1974 Break the system into distinct features Each feature represents a concern Map one concern at a time to a module From each module, other concerns are irrelevant
Microsoft ASP.NET Connections Classic layers Presentation Business Services (application logic, workflows) Domain layer (model and behavior) Domain services Security model Data access Updates will be available at http://www.devconnections.com/updates/LasVegas _06/ASP_Connections
Presentation Data Access Business SoC violation (idiomatic) Presentation Presentation Controller View engine Worker service SoC violation Data Access Orchestration Business Other components Repository Application logic IRepository Storage Domain services Entity + relationships Data Domain
Relays requests to the orchestration Presentation UI (front-end) UI logic (e.g., MVP / MVVM) UI helpers GOAL Relays requests to the orchestration
Exchange data with presentation Orchestration Implementation of use-cases Methods that control server processes Example: Place the order GOAL Exchange data with presentation
Domain Object model Domain services Entities, relationships Domain logic Domain services Repository of entity-specific operations that span across the system
Data General interface for common operations May deal with O/RM tools, data access API Specific interface for common operations Wrapper around O/RM tools
Processes Architecture Model
Business Processes Business Processes are the core of ENTERPRISE SOFTWARE APPLICATION Business Process Automated Interactive
Workflows Workflow is the entity used to implement a process Are built on top of WWF4 WWF programming model Manages process execution Support active processes (extended time) Preserves state of the process execution
Workflows in CRM2011 Custom Workflow Activities ACTIVITY IN A PROCESS On-premise and Online Create assemblies containing derived classes from WWF Activities ACTIVITY IN A PROCESS
Workflows in CRM2011 Custom XAML Workflows For on-premise only Use Visual Studio workflow designer Import XAML into MS Dynamics CRM Used without compilation
When to use a Workflow Changes in business logic are performed by non-developers A non-developer could use CRM to define only conditions when custom actions are performed Workflow are asynchronous and AFTER an event occurs For synchronous processing, use plug-ins Manual Triggering with «Run Workflow»
Custom Workflow Activities WWF includes an Activity Library providing: Control flow Sending and receiving messages Doing Work in parallel WWF supports the creation of CUSTOM WORKFLOW ACTIVITIES
DEMO Building Custom Workflows Activities Accelerate Using Developer Toolkit