Understanding Workflow Instances

When developing workflow applications, it is important to understand workflow instances. We will discuss workflow instances here.

Every workflow you deploy can have multiple instances, which are automatically created for you as needed. For example, in our webinar scheduling workflow, if we deploy the workflow, it'll wait for a customer to sign up. When a customer does sign up, it creates an instance of the workflow to handle that specific customer. If additional customers sign up for webinars, additional instances of the workflow will be automatically created for you to handle those specific customers.

Each of these workflow instances will have separates states and variables. We can use Voicent CallCenterManager to look at the definitions of deployed workflows, states and variables of all instances of all the workflows that you have deployed. You can do this by going to the "Workflow" menu in Voicent CallCenterManager:



Definitions

First, we will look at the definitions. Click on "Definitions" under "Workflow" menu in the Voicent CallCenterManager. It'll show all currently deployed workflows.

Double click on a workflow to see its definition. It'll show all possible states, the conditions required to transition to that state, actions performed in each state, and all the variables used. Basically, you can think of this definition page as a text version of your Workflow diagram you see in IVR.

To understand some of the terms used in those screens, here are some definitions (these definitions are from the published paper located here):

  • Activities: Activities are characterized by several attributes (like name or state) and methods (e.g., start, succeed). Elementary activities (tasks) describe the real work items in a process.
  • Data objects: Within a workflow different kinds of data are manipulated. Mainly, we have to distinguish between data which is manipulated within the tasks and data which is needed for process execution (scheduling, etc).
  • Application data: The appliction data is consumed and produced by the tasks in a workflow.
  • Process data: Process data are necessary to define and control the execution of workflows. Typical examples are the state of tasks, the start time of a task and so on.
  • Agents: An important function of a workflow management system is to assign tasks to agents (users or programs) who are eligible to carry them out.
  • Document-oriented workflows: Document-oriented workflows are mainly characterized by the existence of manual tasks and unstructured or semi-structured documents. The execution of these workflows are primarily controlled by human agents.
  • Process-oriented workflows: Process-oriented workflows involve mainly automatic tasks and structured or semi-structured data objects. The processes may be very complex and therefore adequate formalisms to define such processes are necessary.


Instances

Now we will look at instances. Click on "Instances" under "Workflow" menu in Voicent CallCenterManager. It'll show all currently active instances, their current states, and their current tasks. You may need to click "Refresh" under the "Workflow" menu if instances are not showing up. This is the screen you should see:

Our example above shows that there are currently 6 different instances of my_workflow_one running (the webinar scheduling workflow). These instances were automatically created when a customer signed up for a webinar. Each of these instances are holding different variables and are at their own states. Double click on one to get a more specific information about each instance:

Notice the Workflow Instance ID, which in our case is 23. It says that it is an instance of "my_workflow_one". Its current state is at "Wait Selection". Below, you can see all the "Current Values", which are the values that the instance's variables are holding. You can use this information to debug your workflow or just to browse the instance's data.

These workflow instances will terminate automatically after reaching a terminating state. In our webinar workflow example, our instances will terminate after sending a text to the customer 15 minutes before the wbinar.

You may find additional information regarding workflows here and on the wikipage.