The second most important component of the EDS application, in addition to documents or document cards (in the application model implemented in the Docsvision platform), are
processes . If the state machine, context-role model and scripts determine the behavior and logic of an individual document in the system, then business processes are designed to implement complex routing scenarios, interact with applications external to the ERMS, to handle events that are not related to user activity, and other server activity regarding documents.
For example, the BP can automatically create new documents if necessary, ensure the transfer of information between documents in the event of certain events, send notifications, etc.
The business process designer is the designer of the process diagram and the ability to customize its various parameters and functions. In fact, this is a visual way to describe the algorithm of the application with the objects of the system. It combines the functions of both process modeling (visual presentation for understanding logic and processing sequence) and its implementation (the result is a workable application).
Process Description Language
The feature noted by me above - the combination of the tasks of modeling and implementation in one tool leads to the fact that a special notation is used to describe the process, focused on a specific execution environment and its features.
On the one hand, the process description language (notation) should contain elements that represent a high-level process logic β functions for designating user and system activities, processing sequence logic β branching and merging, and process decomposition tools (subprocesses for organizing hierarchical modeling) .
On the other hand, we need standard components that allow us to describe the processing algorithm, implement in the process of constructions such as (if - then - else, do-while) work with counters, collections, comparison operators, etc. Also need low-level functions oriented to work with specific business objects and their data, functions for processing system-specific events, and process synchronization management.
Additionally, you need tools for a software extension of a standard set of functions and functions for implementing integration scenarios with other applications.
All this leads to the fact that each implementation of a real industrial Workflow system and Docsvision, in particular, implements its own notation, which can be used both for modeling (visual presentation of the process for a person) and programming (low-level description). At the same time, the Docsvision process description model contains all the BPMN notation constructions (visually not coinciding with it), which allows you to import BPMN-modeled processes into Docsvision for further implementation.
')
Fig. 1. Process Designer Docsvision implements its own notation, focused on creating workable applications that implement the logic of document processing in applications.The system implemented the ability to use the process designer in 2 modes - facilitated for modeling processes at a high level (for coordinating the process structure with the target customer) and full mode - for implementing the process in details of low-level behavior.
In the lightweight mode , only functions such as tasks (user activity), subprocesses (means of decomposition and activity to further implement the more complex process logic) and branching operations are available.
Full mode, respectively, provides access to all functions of the system, in particular, gateways and extensions.
Process structure (templates, instances, functions, parameters, gateways)
Templates are used to describe (program) Docsvision processes. In addition to functions and relationships, templates contain parameters.
Parameters are internal process variables used to store information for a specific process instance. For example, in the course of contract processing, variables are the document file itself, the contract amount, the name of the person in charge and the coordinating persons, the timing of the agreement, the counterparty, the type of service or product, etc. The process variables are used for two purposes.
β’ The first is obvious - to determine the processing logic of the process and transfer information between functions. For example, at the start of processing, the process receives the contract file at the input, which is transferred between the participants in the approval process, and the contract amount is used in the conditional branch functions to determine the agreement approval logic - a form of financial control.
β’ The second function of variables is less obvious - it is the parameterization of the functions being executed. A process template may contain functions that do not contain specific parameter values ββ(for example, the name of the task executor, or a due date). These parameters of functions can be determined (or even calculated) during the execution of the process and in the previous steps, and passed to the function at the time of its initialization. This allows you to simulate complex processes that are adapted to the information processed in them and significantly reduce the number of templates. If this function were absent, a separate template would be required for each particular case, which would greatly complicate the maintenance of applications.
The process can be started manually, from another process or using a software interface (API).
Another component of the process control subsystem is the
gateway . The gateway allows you to configure certain scenarios of interaction with external applications, for example, with e-mail, applications based on 1C or SharePoint platforms. When a particular gateway is installed in the system, an additional set of functions of this gateway and the corresponding variables appear.
For example, a gateway to email adds specific variables for working with messages - a message, a message recipient and attachments, as well as an additional set of functions for creating and sending a message, searching for new messages and receiving information from them (text, attachments, recipients).
The gateway to "1C" introduces variables for working with 1C data - 1C document, a line from 1C document, 1C reference, and others, as well as the corresponding functions - to search for a document in 1C database, create a document, transmit and receive information.
Different gateways implement different sets of functions, but typical are the functions of searching for an object, working with its data, executing certain methods of an object and routing it in tasks. For example, you can set up a script in which a specific document from 1C will be routed in the Docsvision task and the system user does not need to open 1C and find the document there, it will open automatically from the task.
The gateway allows you to customize the interaction scenarios with external applications without programming and even without a deep understanding of how the external system works. For example, a gateway in 1C allows you to configure not very complex interaction scenarios of Docsvision and 1C, even to those who are not specialists in setting up 1C, and a gateway in SharePoint allows you to customize integration processes without a deep understanding of the SharePoint architecture.
Variables
Business Process Designer supports the following types of variables. The simplest are the following types of variables:
β’ whole;
β’ fractional;
β’ line;
β’ well no;
β’ date Time;
β’ string listings.
Most of the variables allow processing various entities of the Docsvision platform in the process:
β’ card;
β’ file;
β’ card section;
β’ line of the card section;
β’ folder;
β’ label;
β’ unit: selected from the directory of employees;
β’ employee: selected from the employee directory;
β’ group: selected from the directory of employees;
β’ Role: selected from the staff directory;
β’ card type;
β’ transfer;
β’ process;
β’ process variable;
β’ the value of the process variable;
2 gateways - the gateway to the file system (FS) and the email gateway are included in the process designer by default, they carry the following variables:
β’ FS folder: selected from the folder tree of the file system;
β’ FS file: selected from the folder tree of the file system;
β’ mailing;
β’ mail attachment;
β’ postal addressee.
Fig.2. When setting variables, you can specify its type, default value, and other properties of the parameter.
Process variables are passed in one of the following ways:
β’ They can be set by default;
β’ Manually entered when starting the process;
β’ Transferred to the subprocess upon automatic start from the parent process;
β’ Formed during the process, in particular, using scripts;
β’ Obtained from processable documents and other objects;
β’ Formed automatically when executing the process start operation from the interface of working with a specific document, if the process is started by the business logic of processing the document;
β’ And, finally, transferred to the process programmatically using API functions if the process is started using program code.
In this case, all variants of initialization of variables, except the last, can be configured without programming by visual means of the constructor.
A special variable is the initiating document of the process; when it is configured, the types of documents that can be initialized for a particular process are determined. In this case, in the cards of the respective types of documents, it becomes possible to initialize the process template manually from the card interface. The link to the document card is transferred to a variable, and the process can process it, for example, receive data from it, route it in tasks, etc.
Functions
The process consists of functions.
The first group of functions allows you to describe the overall structure of the process - these are functions:
Start - the starting point of the process;
Stop - stop the process;
Branching - the creation of parallel branches of the process;
Combining in and and or - the union of the branches of the process;
Subprocess - the function is used to decompose the process in the simulation. It runs a specific template and passes the variables from the parent process there. The subprocess can be synchronous, then the parent process waits for it to end and gets back the variables, and asynchronous - the parent process simply starts the subprocess. This method of starting processes is used, in particular, to handle various events. For example, the parent process expects new documents to appear in the system and starts parallel processes for their processing.
The second group of functions allows you to extend the processing logic of the process:
Conditional branching allows you to define the conditions by which further process processing logic will be determined. For example, depending on the amount of the contract, it can take place under various financial control procedures.
A counter is a function that is used for organizing cycles, with each pass it changes with a certain step the value of a variable, which can be used for conditional branching or in other functions. Also using this function, you can organize the search and processing of collection values ββin a loop.
Collection is a function for working with a collection, for example, adding an element to a collection, deleting an element, changing a value, etc. This function can be paired with the counter function for processing collections.
Deleting an object - with its help, you can delete any object in the system - a document, a card, a folder.
Schedule - allows you to initialize the process at a certain time or with a certain period, as well as to synchronize the process over time. For example, to search for new objects in the system with a certain periodicity.
The script is a very important feature that allows you to extend the behavior of the system. It runs an arbitrary .NET script, and you can also connect ready-made assemblies and compile the final text of the program.
Fig.3. The script function allows you to extend the behavior of the system and implement arbitrary processing within the process.The following group of functions is intended for managing data and process variables, processing data and implementing methods of external systems using gateways:
Universal exchange - the function is used to transfer data between variables and objects processed in a power supply unit, in particular, between variables of different gateways. In this case, the types are cast, implemented for both standard types in the BP service and variable gateways in the corresponding gateways.
For example, using this function, the text of an e-mail message can be retrieved to search for a unique identifier of the document being negotiated and an attachment file, after which the file can be attached to the reconciliation card as a next version. Such single acts of exchange can be combined in a sequence and realized in one data exchange function.
A universal function is another very important function that is used to perform operations on objects and variables without programming. Functions are implemented by both the business process service for standard Docsvision objects and the gateway components for external systems in relation to Docsvision. When setting up a function, it is determined in relation to which type of object the action will be implemented, a pointer to the object and other parameters of the function is determined using process variables. There are several dozen supported object types in the system and, accordingly, hundreds of functions for their processing. The article does not make sense to consider them in detail, as an example I will give only a list of functions available for processing an object of the type business process.
Functions | Function parameters | Type of parameter value |
Create process instance | Instance name Process template Folder Start the process Return value | String DV card Dv folder Well no DV process, output parameter |
Start the process | - | - |
Stop the process | - | - |
Get process variable by name | Variable name Return value | String DV process variable, output parameter |
Suspend the process | - | - |
Create variable | Variable name Gateway id Variable type in gateway Collectible variable Return value | String String Whole Well no DV process variable, output parameter |
Gateway monitoring functions β each gateway brings with it a set of variables that complement the list of variables, the universal exchange functions available, and additional methods to the universal function. It can also introduce its specific functions that implement scripts that are specific to the particular system with which this gateway works. Any gateway includes a monitoring function β its task is to detect new objects in a given external application system that meet the filtering criteria or to monitor the fact that a specific object has changed. For example, the monitoring function of the file system gateway will allow you to find new documents in a folder that match the filtering criteria (for example, extension type and size), as well as detect whether a change has been made to a specific file processed in the file system process. Naturally, the system has a function of monitoring objects Docsvision.
There
is another important group of functions responsible for routing tasks and documents in the system, but we will tell about it in the next article.
In addition to the specific parameters of the process functions, they all have common parameters that allow you to describe scenarios for processing errors that occur, as well as to make this or that process function the so-called Milestone. If the function is marked as a Milestone process, you can adjust the parameters of its time control and generate reports on the fact of milestones at a certain time. For example, the completion of a function some time after the start of the process, or after the completion of the previous functions, or in relation to absolute dates that can be pre-calculated during the process. The presence of milestones of processes allows you to build a bridge from the automation of processes to the use of business process designer to embed a system for monitoring the progress and quality of process execution, and their mapping in corporate reporting.
Thus, the business process management subsystem Docsvision performs several functions in the system:
- This is a tool for visual modeling of processes and their high-level description, as well as a tool for rapid prototyping of applications that can be used, for example, to coordinate technical specifications with the customer of the system.
- This is a tool for visual application development with support for complex algorithmic functions that implement server activity, integration functions and application routing functions. In this case, the tool allows you to realize a large number of application functions without programming using visual configuration tools. Over the long years of evolution, the business process management subsystem has accumulated a large number of convenient tools for customizing complex and diverse scenarios.
- A tool for monitoring the progress of executable processes and a means of collecting a variety of indicators and process metrics.
In the next article we will talk about the task management subsystem and routing tools that are used to create EDMS applications.