Workflow









A workflow system provides an infrastructure for the set-up, performance and monitoring of a defined sequence of tasks, arranged as a workflow application.
There are many scenarios where a user's tasks must be completed in an ordered way based on the completion of specific steps, or to satisfy a set of underlying business rules. Workflow can be used to encapsulate the tasks and to coordinate the steps required to complete them. Workflow can also support tasks that are dependent on the information being processed, such as the data entered by the user or by dynamic business rules that define a business process.

What is workflow
Workflow or business process is a diagram of task execution
- Tasks, transitions and decisions define the flow
- Tasks can open forms, execute code, give instructions fro wor to be performed
Each task in run as an instance
- Automatic task execution and user tasks
- Email notifications of previous and next step
- Database changes
- Changing a workflow definitions does not affect running instances
- Workflow definitions are stored in Pantheon database
Workflow works with two major concepts: workflows and tasks. A workflow is a representation of a business process. In Worklow, the workflow concept is split in two more specific concepts: workflow definition, which is the specification of a business process, and workflow instance, which is a running business process.
A task is a pending work for a user. In Workflow Studio, the task concept is split in two more specific concepts: task definition, which is the specification of a task, and task instance, which is actually a existing pending task for a user.
Workflow definition
A workflow definition is the representation of a business process. For easy understanding, we can compare the workflow definition to a flowchart which specifies how the business process work. In a workflow definition you specify which actions are to be performed (update database, send e-mail, run a script and, more important, create a task), and in which order. If you are creating a workflow definition for order processing, for example, then you might want to check if the order amount is higher than 10 000. If not, then create an approval task for the local manager. If yes, create an approval task for the director. In any case of approval, send an e-mail for the financial department. You can use the workflow designer to visually build the flowchart for the workflow definition. All the workflow definitions are kept in the database. Each workflow definition receives a name that uniquely identifies it (for example, "order processing", "software deployment", "help desk support", etc.).
Workflow instance
A workflow instance is a running instance of a workflow definition . A single workflow definition will generate an unlimited number of workflow instances. For example, you can have a single workflow definition for order processing, and for each order, you will have a workflow instance. In a workflow definition you might have a variable named "Order number". Each workflow instance will have its own order number, and the variable "Order number" will have a different value. Each workflow instance will have its own state and internal variable values. A workflow instance can be started, running or finished. All workflow instance records are kept in the database, even the finished ones.
Terminology
Workflow (WF) definition:
- Contains records of tasks, links and decisions
- Holds variables and also values if defined
Block definition (BD) (task):
- Each block can hold variables connected to workflow variables
- Worker or a group who will execute the task
- Dates, periods
- Statuses
- are all the elements in workflow where work is performed: decisions, tasks, connectors, scripts, approvals...
Workflow instance (WI)
- When workflow is started the definition is copied to an instance and the first task(s) are run
- When a workflow is run from a Document type form, document key is stored to a variable which gives permanent storage to the instance
Task instance (TI)
- is created when a task is started from workflow instance
- define what work is performed, connectors and decisions define the proces