Business Process Management

Introduction

Business Process Management is fast becoming a required feature in a CRM. SplendidCRM has had a workflow engine since version 3, but while powerful and flexible, the Windows Workflow Foundation 3.0 derived system was only suitable for back-end operations. It did not allow any sort of approval process, nor did incorporate delays to allow for long-running operations.

Business Process Management Notation 2.0

BPMN 2.0 is the current standard to module business processes in a graphical notation. You can think of it like a flowchart. The notation is quite elaborate and incorporates many elements that SplendidCRM does not and will not support.

BPMN.io & Camunda

The folks at Camunda (http://www.camunda.com and http://camunda.org) were kind enough to develop a BPMN editor entirely in JavaScript and release it as open source (http://bpmn.io).  We have integrated their editor into SplendidCRM and customized the properties editors to allow the configuration of CRM related data.

Microsoft Windows Workflow Foundation 4.5

The final piece of the SplendidCRM Business Process Engine is the use of the current version of the Microsoft Windows Workflow Foundation.   This new version supports a flowchart element that is ideally suited to solve this problem and it allows C# expressions in variable assignments and comparisons. SplendidCRM effectively just converts the BPMN data format to the Microsoft XAML notation.

BPMN Diagram

Palette

The palette on the left of the diagram has all the available BPMN elements. The top four items are for diagram management and the remaining are the core elements of a diagram. There are a ton of BPMN elements, but we only use a few. There are 2 start events, 2 intermediate events, two end events, two gateways and 3 tasks.

Layout Management

At the top of the diagram are the layout management buttons. The first two are undo and redo. The next set are the left, center, right, bottom, middle, top, etc.

Import / Export

The BPMN notation can be imported and exported. You should only import data exported by SplendidCRM as a reduced set of elements is supported by the system. The import button is at the top-right corner of the diagram.

Process Variables

Process variables are used as global variables to the flowchart. You can create strings, decimals, Booleans, dates, etc., then use them in expressions in tasks and gateways.

 

BPMN Elements

Start Event

The Start Event is where you specify the module and the type of events that start the business process.

Record Type

The record type determines what module event will start the process. The type can be started when a New record is created, when an Existing record is modified, or both.

Base Module

All business processes must start with a single module. Not all modules can start a process, but the core Accounts, Contacts, Leads, etc. all can.

Module Filter

You can also apply filters to the data. For example, you can start the process when Accounts when a specific status is achieved or even if a field changes. The Edit button brings up the Report Designer.

Timer Start Event

The Timer Start Event is similar to the Start Event as it is where you specify the module and the filter, but the difference is that this event is fired based on the specify frequency. You can have this event fire daily, weekly, monthly, etc.

Frequency Limit Units

The frequency limit is used to determine how often the timer is fired. The units can be days, weeks, months, years, hours, minutes or even records.

Frequency Limit Value

This is where you would specify the value for the units above, such as 1 day, 6 hours, etc.

Base Module

All business processes must start with a single module. Not all modules can start a process, but the core Accounts, Contacts, Leads, etc. all can.

Module Filter

You can also apply filters to the data. For example, you can start the process when Accounts when a specific status is achieved or even if a field changes. The Edit button brings up the Report Designer.

 

Intermediate Timer Throw Event

The Intermediate Timer is used to insert a delay into the process. The delay can be in days, hours, minutes or seconds. However the scheduler for the business process engine fires every 15 seconds, so you really can’t have a timer event be thrown more frequently than that.

Duration

The duration allows you to combine days, hours, minutes and seconds.

Intermediate Message Throw Event

The Intermediate Message is the event you use to send an email in the middle of a business process. The process continues immediately after the message is sent.

Message Type

There are two types of messages, an Email and a Notification. An Email is saved in the CRM in the Emails module, but a Notification is not.

Assigned To / Team

If you do create an email, you can assign it to a user and/or a team.

Source Type

A Normal message is one where you specify the subject and message template in the business process. A Custom template is one where the message template is created in the Email Template module. A custom template is more flexible in that it can contain previous and current values of a field.

Message Subject

The message subject for a normal message. You can use field insertions with $ as the prefix to the field name, such as $first_name and $last_name.

Message Template

The message body for a normal message. You can use field insertions.

Recipients

You can send an email to the record that started the process if an Account, a Contact, a Lead or a Target. You can also send an email to the person that is assigned to the record. You can send the email to a specific user, specific team or specific role.

Reports

A report can be attached to the email and you can specify properties for the report.

Message End Event

The Message End event is a combination of the message event and the end event. The process is ended after the message is sent. All the message event properties described above can be used here.

End Event

Every business process should have at least one end event. All paths should lead to an end event. A single end event can be the destination of multiple source events.

Exclusive Gateway

The Exclusive Gateway has one input and multiple outputs.

Each output will have a condition that must be met. An output that does not have a filter is treated as a default path that is only followed if all other filters return false. You can only have one default path for an exclusive gateway, but it can have many other conditions.

Expression

The express can be any valid C# expression and can use date variables, such as DateTime.Now, and it can use any process variable available.

 

Event-Based Gateway

The Event-Based Gateway does not have any conditions. Instead, it allows multiple paths to be followed, with only one getting completed. It is used to provide a timeout to an approval process. It may be helpful to know that we convert the Event-Based Gateway to the Pick Activity (https://msdn.microsoft.com/en-us/library/ee358746(v=vs.110).aspx).

Event-Based Gateways are a set, with begin and end.

Task

A Task is an activity that is used to load or save a module.

Operation

You can Load a module, Save a module or Assign a module. The Assign operation is a simplified save operation with selection fields for Assigned User and Team.

Module

You must specify the module that you are loading or saving. This gives you the flexibility to bring in any sort of data or save new records. The Source ID field is required when loading a module.

Field Prefix

The field prefix is used to scope the data loaded or saved. Leaving this value blank will allow you to use the same process variables automatically defined by the base module. For example, you may want to use the prefix CURRENT_ to allow you to compare the CURRENT_STATUS to the STATUS value that existed when the process was started. The Field Prefix does not apply to the save or assign operation.

Source ID

The most common value is [ID], which is the reference to the ID that started the process. You could also use [PARENT_ID] to load values from the parent record, if the module supports the field.

Fields / Add Field

If you leave the field list blank, then all fields are loaded. If you specify any fields when loading a module, then only those fields are loaded. When saving a module, you must specify at least one field and only those fields specified are saved.

User Assignment Method

When assign a module, you can assign a static user, static team, or the supervisor of the user the record is assigned to. Or, you can let the process perform a Round Robin assignment.

User Task

A User Task is an activity that stops the process while waiting for a user to approve or reject the record.

Approval Variable Name

The default value is APPROVAL_RESPONSE. We provide the ability to create your own variable name so that you can have multiple response values accessible as process variables.

User Task Type

There are two types of user tasks. The primary is the Approve/Reject type and the other is the Route task. Both will pause the process and wait for input, but while the Approve/Reject task allows you to make a decision, the Route task only allows the Route option, so no decision can be made.

Allow Change Assigned User

This option determines if the user is allowed to change the assigned user.

Allow Change Process User

This option determines if the user is allowed to change the process user.

User Assignment Method

There are multiple methods that the process can use to determine who should approve the process. It can be the current process user, as defined in this process. It can be the current record owner, the supervisor of the user assigned to the record. It can be a static user or it can be determined by round-robin from the team or role. Lastly, you can have a team or a role claim the record and then preform the approval or rejection.

Duration Units / Duration Value

The duration provides a way to indicate that an action is past due. An expired process does not automatically get approved or rejected. This is simply for visual representation.

Business Rule Task

The Business Rule Task is used to set variables or execute external operations.

Operation

The Assign Activity allows you to assign a value or expression to a process variable. The Switch Activity allows you to assign a value similar to the way a C# switch operation works, effectively using a key/value pair. The Call SQL Procedure allows you to specify inputs and outputs to a SQL Procedure. The C# Call Activity allows you to call a C# object that inherits from the Activity object.

SQL Procedure Name / C# Activity Name

The name of the procedure or the activity to call. We have created a sample custom activity WF4CustomActivity.

Assign Field

The name of the process variable to assign the value.

Assign Type

The data type of the variable.

Expression

The expression used in the assignment. The expression can be any valid C# expression, including string, math or date objects and operators.

Switch Field

The Switch Field is the input to the switch statement. It can be a field or an expression, but it will be compared to static properties so it must result in a supported data type.

Switch Property / Call Parameters

The property is the key/value pair. The value can be a static value or an expression if preceded with = character. The input/output parameters apply to the call operations.

Business Processes Client Features

When a record requires approval, the normal buttons get changed to the business process buttons. Depending on the configuration, you may see Approve, Reject, Claim, Change Assigned User and Change Process User.

Approval, Reject or Claim

When the process is configured as self-serve, a Claim button will be presented. Once claimed, the user can Approve or Reject. The record can be edited while it is being processed.

Notes

The notes popup provides a way to add comments to the process.

History

The history popup shows the process related actions that have been performed on the record.

Change Assigned User

If this feature has been enabled for the process, the button will present the user with a list of users that the record can be assigned to.

Change Process User

If this feature has been enabled for the process, the button will present the user with a list of users that the process can be assigned to.

 

Business Processes Administration

Events

Within the detail view of each business process is a list of events. Events that have completed will have an End Date. Events that are still running will not have an End Date.

 

Business Process Log

We have also provided a Business Processes Log module that lists the events for all business processes.

Events can be searched by Name, Status, Date and Description.

Termination

There will be a Terminate button so that an administrator can terminate a long-running business process.