Workflow (Design & Run WF Activities)
- 4 minutes to read
The Workflow module integrates Windows Workflow Foundation (WF) 4.0/4.5 support into XAF. WF is a workflow management framework designed to assist you in creating more manageable, workflow-enabled applications. Leveraging the WF functionality, the Workflow module is designed specifically for the following kinds of WinForms and ASP.NET Web Forms applications.
- Applications automating long-running business processes with intermediate steps being hours, days or weeks apart.
- Applications allowing users to modify the automated business processes without writing any code.
- Applications visualizing complex business processes.
Generally, such applications are built around a business process definition that is a series of steps describing software activities and actions of involved users. Typically, this process is long-running, and the application must wait, for instance, for several days to receive input from a particular user. An example of such an application can be a bug tracker that relies on users to report issues, research and fix them. The bug tracker can be built around a complex long-running process, which can evolve based on user feedback. Without WF, developing and supporting an application with such requirements is a serious task and is not easily done. The Workflow module integrates WF support into XAF and simplifies design and execution of workflows. With the Workflow module, you only need to know the general concepts associated with workflow design.
The Windows Workflow Foundation (WWF) framework from Microsoft is a broad and complex product. To use the Workflow Module effectively, you should be familiar with WF and WCF technologies and understand how client-server apps are built and communicate.
WWF and WCF will not be ported to .NET Core/.NET 6+ by Microsoft. We recommend that you implement Controllers or custom solutions such as Hangfire, Quartz.NET, and others for former Workflow Module scenarios. To save your time, consider this free module within the eXpand Framework.
Our integration with WF includes the implementation of custom workflow instance stores, whose correct operation greatly depends on the quality and amount of WF documentation and other public information on the subject. That said, we do not recommend using our Workflow module if your project specifics or other business requirements do not allow you to research possible problems that may emerge (due to WF or our integration specifics) in several days OR if these problems cannot be reproduced in another environment OR if you cannot provide direct or remote access (through a VPN or by means of specialized communication tools) to the problematic applications, its source files and environments these applications are running in for our engineers.
XAF uses the WorkflowService class to start activity instances so you can design any activity in VisualStudio and use it in an XAF application if it can be passed to the WorkflowService. XAF code doesn’t extend the WWF engine and uses this class to start the designed activities. XAF already includes a number of standard WWF activities in the toolbox in the runtime workflow designer, and you can include additional activities as described in the Add Activities to the Workflow Designer Toolbox topic.
To learn more about the module and how to use it, refer to the following documents.
- Workflow Design Basics
- Workflow Activities
- Add Activities to the Workflow Designer Toolbox
- Workflow Server Service
- How to: Design Workflow
- How to: Reduce the Memory Consumption of the Workflow Service
- How to: Execute a Stored Procedure from the Workflow Activity
- Workflow Visual Designer
- Working with CRUD Activities – Introduction
- Working with CRUD Activities – Short Transactions
- Manually Starting Workflows
- Manually Starting Workflows - The Best Choice
- You have changes? I have Workflow!
- Case Study: Building the Workflow-Based Licensing Application with XAF
If you have not dealt with WF in the past, take a look at these introductory WF materials describing general workflow concepts and the basics of workflow design.