The approval process is common in manual type tasks, but there are also some automated tasks that require timed triggering. Therefore, the engine framework needs to solve two problems: Select the appropriate task scheduling framework, integration of new task scheduling module.
1. Task Scheduling Framework Selection
Hangfire is an open source. NET task scheduling framework, which currently supports. NET Core in the 1.6+ version.
Queue-based task processing (fire-and-forget jobs)
Deferred task execution (Delayed jobs)
Timed task Execution (recurring jobs)
Continuity task Execution (continuations)
Hangfire is an open source Ncrontab component that allows you to specify a very flexible timing task type through cron expression syntax.
1) Official website address
https://www.hangfire.io/
2) ASP Web site support
Http://docs.hangfire.io/en/latest/installation.html
Includes installation and deployment, database settings, and more.
Installation Step Description:
Http://docs.hangfire.io/en/latest/installation.html
3) database
During the Hangfire NuGet package installation process, the Hangfire database script automatically generates HANGFIREDB, or you can build the database manually.
2. Process Designer supports cron expression editing
Cron expression Edit Open source project address:
Https://github.com/LGX9/cron-expression-editor
3. Task Scheduler Module (slickflow.schedule)
3.1 Process Overdue automatic completion
1) Database fields
The Process instance table wfprocessinstance has the process instance " overdue time " and " overdue processing time " field information, which is used to record task scheduling data.
2) Logical Description
When the process is started or in an intermediate state, the overdue time of the process instance is updated so that the background Timer Job task detects that there are no overdue process instances in the process instance table, and if so, automatically sets the process instance to the finalization state.
3) Task queue add
3.2 Process Timing Start
1) Database fields
The field in the Process definition table (wfprocess) table contains " Do you want to start regularly?" and the scheduled start cron expression field. Used to define timed task trigger information.
2) timed Start process node
3) Join the scheduled task queue
4. Task Scheduler Monitor Panel (Dashboard)
5. Summary
The Integrated hangfire task scheduling framework enables Slickflow engine products to support automatic processing of node task types, and also enhances the process's task automation capability, while Hangfire component robustness and cross-platform Can meet the business requirements of most enterprise-level customers and large-scale job scheduling requests.
Slickflow.net Open Source Workflow Engine Basics Introduction (eight)--automatic task scheduling implementation