Flylib.com

Books Software

 
 
 

Creating AD Hoc Workflow


Creating AD Hoc Workflow

Ad hoc workflow processes allow the user to create and amend process definitions very quickly and easily to meet new circumstances as they arise. Within this type of workflow, it is possible to have as many different process definitions as there are users of the workflow. The main goal of ad hoc-based workflow is flexibility in areas where throughput and security are not the most important concern, and allowing the user s own experience to define the processes.

Within this type of process, the user is attempting to solve a specific domain-based problem or task that he needs to do by applying his own domain expertise to the problem. This can come in many different forms; based on both the person and organization, this may change. Ad hoc workflow is one of the most important types of workflow that an organization has in its workflow arsenal.

Many times, these processes automate knowledge- intensive workflow that contains key bits of business and processing knowledge that often are lost, or, worse yet, that require additional work each time they are performed. Typically, these types of workflow have a low overall business value and low repetition rate. Often, they are known for not having a predefined structure, and for the next step in the process usually being determined by each user in the process. Each business process automated within this context is constructed individually whenever there is a need to perform a series of actions. Typical examples of this type of workflow applications are routing or for your information types of InfoPath form application that include meeting- and task-based agendas .



Sales Call Report Example

 CD-ROM     Two of the most common problems in any sales- related organization are performing follow-ups and providing information back to both customers and even managers. Typically, sales call follow-ups may include a variety of different process types and even workflow agents . The reality is that often even the most advanced Customer Relationship Manager (CRM) applications don t provide an easy-to-use tool for providing simple repetitive information. (The Sales Call Report example is found on the companion CD-ROM in \Code\Chapter 6\Sales Follow Up\ebr.xsn.)

The form shown in Figure 6.20 is designed to solve this type of process and allow an easy-to-use ad hoc-based workflow that reduces the overall time it takes for a person to respond back to a customer. It provides a generic template that can be used by salespeople as a way of responding back to a customer. This solution also provides an offline component that can be used to easily capture existing knowledge and allow its reuse. One of the most important features of this type of application is the use of a custom task pane to help control, collect, and reuse the information entered by the user .

click to expand
Figure 6.20: Displaying the Sales Call form.

Task Panes

Task panes allow you to define a process or amplify information within an InfoPath form. They often provide either a collection point or allow you to access external information within the form. They are simply HTML files that are made part of the solution and contained with the solution file. Task panes enable you to store and maintain a variety of information.

The task pane object model is maintained as part of the InfoPath object model and allows you to share the objects and script components that are maintained within the project. For example, within task panes, you can access both global variables and business-based functions using the window object of the task pane, as shown here:

\accessing global variable
window.external.Window.XDocument.Extension.MyVariable
\accessing function defined within the business logic
window.external.Window.XDocument.Extension.MyFunction()
Note  

InfoPath allows you to script external objects. Using the wscript object model, you can load the network name of the person that is filling out the form into a text box using this syntax:

var objNetwork = new ActiveXObject("WScript.network"); objMail.BCC = 
objNetwork.UserName;

This will, by default, generate a security error unless the form is fully trusted. This will be discussed further in Chapter 9.

Within the Sales Call example, the task pane is used to collect and store information that the user enters and then can be used to refresh the drop- downs with this information using the DataObjects function here:

function refreshDrops() {
XDocument.DataObjects("Next Steps").Query(); 
XDocument.DataObjects("Resources To Review").Query(); 
XDocument.View.ForceUpdate();
}

This function is then callable from the task pane and refreshes the current data sources, as shown here:

window.external.Window.XDocument.Extension.refreshDrops()