Work Flow
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
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 process.
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.
Task definition (concept)
A task definition specifies a task to be created for a user. It's not the task itself, but a specification for the task. In the task definition you specify the subject, task name, description, the user, a list of valid status, and other properties. A task definition is always "inside" a workflow definition. One of the actions you can define in a workflow definition is generating tasks, and the task definition is part of the action specification. For example, in a workflow definition for order processing, you might want to create a task for the manager to approve the order. In this case, the task definition would be something like this:
Subject: Order approval
Description: Please approve the order [OrderNo]
User: Manager
Valid Status: Waiting approval, approved, rejected
Task instance
A task instance is a task created for an user based on a task definition. A single task definition can generate several task instances. A task instance is created when a workflow instance is run and reaches to a point where a task must be created, based on a task definition. At that time, the task instance is created for a specified user. Each user has a list of his/her pending task instances. Once the task is finished it is removed from the list of pending tasks. There is still an option for listing the closed tasks, in the task list window. Each task instance has its own record in the database. Even if the task is closed, the record is not deleted.