• Blog
  • Designing a Workflow Engine for nopCommerce CMS Part 2: The Workflow Model

Designing a Workflow Engine for nopCommerce CMS Part 2: The Workflow Model

  • 10:26:51 PM
  • Saturday, October 21, 2017

This is Part 2 of a seven-part series describing how to implement Workflow Engine for nopCommerce CMS. Click here for Part 1
Before we can design anything else in this Workflow Engine, we first need to define what exactly makes a Workflow.

The Workflow

A Workflow is the collection of all other data that is unique to a group of users and how they want their request Entities approved. In our design, a Workflow is infrastructure that is used to define and associate most other information.

Our Workflow model is very simple, as it is just an ID, a Name and a Description so we can inherit our model from basic DPModel


namespace DevPartner.Nop.Plugin.Core.Models.Workflow
{
    [SystemName("Workflow")]
    [Parent("System/Workflow/Workflow")]
    [AdminMenu("DevCommerce/Workflow/Workflow")]
    public class WorkflowModel : DPModel
    {
    }
}

This model, though it is very simple, is the central point of reference for the rest of the design; most of the models in this engine (e.g. State, Transition, EntityType, etc.) will need to be related back to this model, either directly or indirectly.