Previous     Contents     Index     DocHome     Next     
Process Builder's Guide 6.0



Chapter 14   The Data Sheet Application


This chapter describes the Data Sheet sample application that is shipped with this product. It includes a general walkthrough of the Data Sheet application, and specific information on the sample application functions.

This chapter includes these sections:



Data Sheet Application Overview

This application automates the process of creating a product data sheet, including the following steps:

  • uploading text files and graphics

  • formatting the data sheet automatically

  • approving the data sheet through two levels of management

  • publishing on a web site

The application contains all the necessary forms, user roles, and database fields to complete the process.

Note. If you want users to be able to digitally sign the approval form, you must use Netscape Communicator to run this application.



Data Sheet Process Map



The data sheet's process map, shown in Figure 14-1, graphically describes the application's steps.

The process map shows the following steps:

Entry Point. The process map contains one entry point for creating a new datasheet.

Activities. There are three activities: Add Art, Approve Pricing (Product Mgr) where the Product Manager approves pricing, and Approve Pricing (V.P), where the V.P. approves pricing.

Automated Activity. There is one automated activity, called Build Data Sheet, where the data sheet is built.

Decision Point. There is one decision point, called VP Approval, which depends upon price. If the price is less than $1000 dollars, the release is approved. If the price is $1000 or more, the vice president needs to approve the data sheet before it can be released.

Exit Points. There are two exit points in the Data Sheet application, Data Sheet Cancelled that occurs if the V.P. or Product Manager does not approve the data sheet, and Data Sheet Published that occurs if the data sheet passes all approvals and it is published.

Notification. There is one notification in the data sheet application. It occurs partway through the process at the product manager approval step.

Figure 14-1 The data sheet process map




Data Sheet Walkthrough



This walkthrough takes you through the process described by the product datasheet application, describing the portions of the application involved in each step.


The Data Sheet Entry Point

Users initiate a data sheet at the Create New Datasheet entry point. When they initiated the data sheet in Process Express, they see the newDataSheet.html form. On this form users enter product and pricing information. The product information includes the model number, which is the title field. Process Express displays the title field to identify the process instance.

Note that if you are testing this application yourself, and you sign into Process Express as admin, then the creator who initiates the process is set to admin.

The following fields are on the newDataSheet.html form:

  • Product Type (type)

  • Model Number (model)

  • Product Description (description)

  • Base Price (price)

  • VAR Discount (discount_code)

The product description needs to be in the form of an attached text file. The file is stored in the content store and used to create the data sheet.

When users have filled out the form, they click the Send to Art Department button to continue. The button takes its name from the name of the connecting line drawn on the process map between two steps.


The Title Field

The application has a title field, which shows up in Process Express wherever a particular process instance is identified. The process instance title is stored in a special data field, called title. It is also set in the application's properties. To see the Title Field in the application's properties, follow these steps:

  1. In the application tree view, right click the application name (DataSheet) and choose Properties, or double-click the name, or highlight it and click Inspect.

  2. The application's properties appear. The Title Field property set to the "title" data field.

The value of the title field for a process instance is set by the entry point's completion script, computeTitle, which puts process instance information into the title field. For more information on the script, see The computeTitle Script.


Add Art Activity

The next step is to get the art from the art department. To see the properties for this activity, double-click the activity in the application tree view, or highlight the activity and click Inspect.


Assignment Script

For demonstration purposes, the data sheet activity is assigned to a user with the toCreator assignment script. This is one of the standard assignment scripts that ships with Process Builder. It assigns the work item to the creator of the process instance.


Expiration Setter Script

The work item for this step has an expiration date. It uses a hard-coded length of time (1 day) for the expiration date, set by a standard Process Builder script, expireIn. It takes the parameters of a number, and a unit of time (days, weeks, etc.). You do not select this script from a drop-down list (as the assignment script is selected). Instead, when you access the wizard for setting expiration dates, you have radio buttons for "Never expire," "Expire in," and "Defined by a script." If you choose "Expire in," there's a field for a number, and a drop-down list for the unit of time, which you use to set the parameters for the expireIn script.


The Forms

Two forms are visible to users at this activity. The assigned user sees the form addArt.html. All other users see the viewWIP.html (View Work in Progress) form. The various forms are assigned to different groups and users in the Form Access window. See Figure 14-2. You access this window from the application tree view, by double-clicking the Form Access icon.

Figure 14-2    The Data Sheet Form Access window


By reading the grid you can see what role or group sees what form at each step of the application. The groups and roles are in the order specified in the evaluation order in the Groups and Roles properties. For this example, you can see that at the Add Art activity, the assignee sees one form (addArt.html), while the "all" group sees another (ViewWIP.html).

On the addArt.html form, some fields are display-only, and some the assignee can edit. To see whether or not a field can be edited, select the field on the form and hold down the right mouse button. From there, select the Properties item, and you see a list of the properties of that field in that form. (the Data Dictionary item on this menu allows you to access field properties that are application-wide). The Display Mode property shows whether the field is set to EDIT, VIEW or HIDDEN.

When a field is set to EDIT, only the assignee can actually edit it. If another user views the form, they see the field in VIEW mode.

The only fields that the assignee can edit on this form are layout and art.

The other fields are view-only. The art field is a file attachment field, which means that to complete this field the user attaches a .gif file. The file is stored in the URL specified in the Content Store Properties window. After completing the form, users click the Build Data Sheet button.

On the viewWIP.html form, all fields are view-only. This form is available to "all" so everybody but the assignee sees it. One of the fields, stageURL, gives the URL for the current version of the data sheet, so anyone can monitor its progress.


The Automated Activity

After the user pushes the Build Data Sheet button, the next step is an automated activity called Build Data Sheet. Because this is an automated activity, no user is assigned, and it never becomes a work item on a user's work list.

To see the properties of the automated activity, in the application tree view, double-click the name of the activity, or highlight it and click Inspect.

When the process reaches the automated activity in the data sheet application, the action takes place immediately (the Schedule and Deferred properties are blank). In addition, the Completion Script property (where another script would be run after the automation script ended) is also blank. In your own applications, those fields can be used to schedule the time the activity takes place, and to perform some additional action when the automated activity is completed.

The Automation Script for this activity is called buildDS(). No automation scripts are included in the default script dictionary that is built when you create a new application. The buildDS script is unique to the data sheet application.

To look at the script, follow these steps:

  1. In the application tree view, open the Script Dictionary.

  2. Open the Automated Scripts folder.

  3. Double-click buildDS, or highlight it and click Inspect. In the Inspector window, you can read and edit the actual text of the script. In addition, you can check the script's syntax to make sure it executes properly.

If the script returns true (that is, if it was successfully completed) the process moves on to the next step.

For more information on how the script works, see The buildDS Script.


The Approve Pricing (Product Manager) Activity

In this activity, the product manager approves the pricing on the data sheet.


Assignment Script

For demonstration purposes, the data sheet activity is assigned to a user with the toCreator assignment script. This is one of the standard assignment scripts that ships with Process Builder. It assigns the work item to the creator of the process instance. If you are testing this application as the admin user, the creator is set to admin.

In a non-demonstration situation, the parameter would either be set to the Product Manager's user ID, or a different assignment script could determine the vice president for the product using the corporate user directory and/or the data in the database.


Forms

There are two forms visible to users at this activity. The assignee sees the form approvePricing.html. All other users see the viewWIP.html form.

On the approvePricing.html form, the product manager can see all the pricing data and approve it. The product manager provides authentication by clicking the Sign It button. The field is signed_by_pm.

After signing the form, the manager clicks one of two buttons, Approve Product Pricing or Cancel Data Sheet. If the manager chooses Cancel Data Sheet, the data sheet is not published, and it reaches an exit point.

If the manager approves the price, the application moves on to the next step, the decision point.

In this sample, the application does not check to see if the product manager has signed the form. You could build this functionality into your own application by adding a client script to the form called onSubmitForm().


Notification

At the Approve by Process step, a mail notification is sent to the person who started the process instance (the person who filled out the original form at the entry point to create a data sheet). If you are testing this application as the admin user, make sure that this user has an email address. For information about providing an email address, see Adding an Email Attribute for a User.

To see the notification's properties, follow these steps:

  1. In the application tree view, open the Process Definition folder.

  2. In the Process Definition folder, expand the Approve Pricing (Product Mgr.) activity.

  3. You see three items, the two transitions (Cancel Data Sheet and Approve Product Data Sheet) and NotifyApproving. Double-click NotifyApproving, or highlight it and click Inspect to see the notification's properties.

In the application tree view, in the Pricing Approval by Process activity, there is a notification called NotifyApproving. If you double-click the notification, or highlight it and click Inspect, you see the notification's properties.

The Email Address(es) property instructs the application who to send the notification to. In this case, there is a script called emailOfCreator() that mails the message to the person who started the process instance. The message is contained in the Email Body property, which in this example contains some sample text.


The VP Approval Decision Point

If the manager approves the data sheet and price, the process takes a different path depending upon the price. If the price is $1000 or more, the vice president must approve it and it goes to the Approve Pricing (VP) activity.

If the price is less than $1000, the data sheet is released and published, and reaches an exit point.

The decision point looks at the value in the price_final field to determine the price. To see the conditions of the decision point, follow these steps:

  1. In the application tree view, in the Process Definition folder, expand the VP Approval ? decision point.

  2. You see two transitions, priceOver1000 and priceUnder1000. Right click priceOver1000 and choose Properties.

  3. The transition's properties appear, including the Condition property. The condition property is set to price_final >= 1000.00, which means that if the value of the price_final field is greater than or equal to 1000.00, this transition is the one that is used.

There is no form, since the decision point takes place automatically.


The Approve Price (VP) Activity

In this activity, the vice president approves the pricing on the data sheet.


Assignment Script

For demonstration purposes, the data sheet activity is assigned to a user with the toCreator assignment script. This is one of the standard assignment scripts that ships with Process Builder. It assigns the work item to the creator of the process instance.

In a non-demonstration situation, the parameter would either be set to the vice president's user ID, or a different assignment script could determine the vice president for the product using the corporate user directory and the data in the database.


Forms

There are two forms visible to users at this activity. The assigned user sees the approvePricingVP.html form. All other users see the viewWIP.html form.

On the approvePricingVP.html form, the vice president can see the pricing data and approve it. The vice president provides authentication by clicking the Sign It button. The field is signed_by_vp.

Note. Digital signing is not supported by Microsoft Internet Explorer.

After signing the form, the vice president clicks one of two buttons, either Approve Data Sheet, or Cancel Data Sheet. If the V.P. selects Cancel Data Sheet, the data sheet does not get published, and it comes to an exit point.

If the manager selects Approve, the data sheet is released and published at the exit point.


Exit Points

This application has two exit points: Data Sheet Cancelled, and Data Sheet Published. If the product manager or vice president does not approve the pricing on the data sheet, the data sheet is canceled and the process ends at Data Sheet Cancelled.

If the product manger and the V.P. (if necessary) approve the pricing, then the data sheet is released and published and the process ends at that exit point.

The exit points each have a form associated with them, cancelled.html and published.html. These forms allow users to see whether the data sheet was published or not. They also have links to the data sheet on the server, so users can see the final product.



Groups and Roles



The following groups and roles are defined for this application:

  • all

  • creator

  • admin

These are the default groups and roles that are created for every application.



Data Dictionary



The data dictionary contains all the data fields that are used by the application and stored in the database. Table 14-1 lists the data dictionary for the DataSheet sample application. To see the properties for these fields, do the following. In the application tree view, inside the Data Dictionary folder, double-click the name of the field.

Fields are defined to have a class ID, which in turn determines the properties the field has. For more information on the properties for specific field class IDs, see Chapter 7 "Defining Data Fields."


Table 14-1 Data Sheet Application Fields

Field

Field Class ID

approved_by_pm  

computed  

approved_by_vp  

computed  

art  

file attachment  

discount  

textfield  

discount_code  

select list  

discount_desc  

textfield  

description  

file attachment  

layout  

select list  

model  

textfield  

price  

textfield  

price_final  

textfield  

signed_by_pm  

signature  

signed_by_vp  

signature  

stageURL  

URL  

title  

textfield  

type  

radio buttons  

When you add fields, you can either add them with predefined class IDs, or you can create your own class IDs. All of the class IDs for fields in the data sheet application are predefined class IDs.



Forms



The Data Sheet application contains the following forms:

  • newDataSheet.html

  • addArt.html

  • approvePricing.html

  • viewWIP.html

  • approvePricingVP.html

  • cancelled.html

  • published.html

The walkthrough contained information about what forms users see at what step of the application. To view this information, in the application tree view, double-click Form Access.

To view a form, follow these steps:

  1. In the application tree view, double-click the Form Dictionary to open it.

  2. In the Form Dictionary, open the form you want by double-clicking it. You see a portion of the form that you can edit.

In addition to the editable part of the form, the user will also see header information and buttons to press.

Figure 14-3 shows the approvePricing.html form as it appears in Process Builder.

Figure 14-3    The approvePricing.html form in Process Builder


You can see only the body portion of the form. Figure 14-4 shows how the same form appears in Process Express.

Figure 14-4 The approvePricing.html form in Process Express


The form in Process Express has a banner and buttons added to it. In addition, a form may also have a section for comments. The comments are controlled by the Activity's Allow to Add Comments property. If the property is set to true, the comments section appears. Otherwise, it does not appear on the form.

The banner is a file called banner.gif found in the application's images folder (builder/Applications/DataSheet/images). The banner is created automatically when you create an application, and attached automatically when the form is displayed in Process Express. In your own applications, to change the banner, replace the banner.gif file with your own banner file. The file must still be called banner.gif.

The buttons are created using the transition names from the process map.



Script Dictionary



The script dictionary contains all the scripts that exist by default in any Process Builder application, and also the additional ones included in the data sheet application.

The data sheet application contains the following scripts in addition to the standard ones:

  • buildDS (automation script)

  • lookupCode (toolkit script)

  • buildDataSheet (toolkit script)

  • computeTitle (completion script)

These scripts demonstrate how to create scripts of some of the types you will need to create in your own application. They also show how to take advantage of the global scripts, for example, getProcessInstance(), which returns a ProcessInstance object which can be used to retrieve information about the process instance.


The buildDS Script

The automated activity that builds the database uses buildDS. If you double-click buildDS in the application tree view, you see the text of the script.


// Building the datasheet
// 1. LookUp discount information
// 2. Create and publish datasheet
function buildDS()
{
   return lookupCode()&&buildDataSheet();
}


This script calls other scripts in the toolkit. You add scripts to the toolkit if you want to be able to reuse them within the application.

This script executes each of the following scripts:

  • lookUpCode () -- sets the final price.

  • buildDataSheet () -- builds the datasheet as an HTML file.

The use of the && operator means that the functions are evaluated in order left to right, and so long as each function returns true, the next function is evaluated. If all the functions return true, the statement returns true. If any of the functions return false, the remaining functions will not be evaluated, and the function returns false.


The lookupCode Script

The lookupCode script computes the value of the price_final field using the price and discount code that the user entered.


function lookupCode (){
   // The global function getProcessInstance()
   // returns the process instance.
   var pi = getProcessInstance();
   // The methods getData and setData of the process instance
   // are used to read the data field and set the value of the
   // datafield. When setting a value, you have to provide the
   // right JavaScript type.

   // Retrieve the discount_code.
   var discount_code= pi.getData("discount_code");
   // discount_code is an element of the data dictionary.
   // Construct discount description using discount_code.
   var desc = "Preferred VAR discount (code " + discount_code + ")" ;

   // The discount_code is something like '10 A'.
   // Extract the numerical discount from the discount_code.
   // Note that parseInt('10 A') returns 10.
   var disc = parseInt(discount_code);
   // If the discount is not a number (isNaN)
   // add an entry in the error log and return false.
   if (isNaN(disc)){
         var e = new Object();
         e.inFunction = "lookUpCode";
         e.discountCode = discount_code;
         e.computedDiscount = disc;
         logErrorMsg("ERROR_DISCOUNT_IS_NOT_VALID",e);
         // Return false to ask engine to rollback the transaction.
         return false;
   }
   // Update the process instance data by adding
   // discount description, discount rate, and final price.
   pi.setData("discount_desc", desc);
   pi.setData("discount",disc.toString() );
   pi.setData("price_final", Math.round(
            parseFloat(pi.getData("price"))*(100-disc))/100);

   // Return true because the script was successfully performed.
   return true ;
}


The buildDataSheet Script

This script creates a data sheet as an HTML file. It gets the data from the type, model, price, and discount code values that the user entered in the newDataSheet.html form at the entry point to this process. Additionally, the script opens a file that contains a description of the item in question, and adds the description to the data sheet. The script uses an HTML template file as the template for the datasheet, and ultimately publishes the datasheet as an HTML file.

The HTML template contains place holders identified by $$ to indicate places where values of data fields should be plugged into the template. For example, the place holder $$model$$ will be replaced by the value of the model data field.

For a sample of the description.txt file, see The description.txt File. For a sample of the printer.html template file, see The printer.html Template File.


function buildDataSheet (){
   // Use the global function getProcessInstance to get a
   // reference to the process instance.
   var pi = getProcessInstance();

   // Get the value of the description data field, which is a URL
   // pointing to where the description text file is located.
   var descriptionURL = pi.getData("description");

   // Use the global function getContentStore to get a reference
   // to the content store.
   var cStore = getContentStore();

   // Read the content of the description file.
   var descriptionContent = cStore.getContent(descriptionURL);

   // Get the path name of the application.
   var appPath = getApplicationPath();

   // Create a connection to the file containing the template
   // to be used to format the datasheet. The filename is
   // something like appPath/models/printer.html
   var template = new File (appPath + "models/" +
         pi.getData("type") + ".html");

   // Get the model.
   var model = pi.getData("model");

   // Construct the URL where the datasheet will be published.
   // The global function getBaseForFileName returns the base
   // URL of the location in the content store reserved for the
   // process instance.
   var dsURL = getBaseForFileName(pi.getInstanceId()) + model
         + ".html";

   // Create the string to hold the content for the datasheet.
   var dsContent = "<!-- Content of the dataSheet -->";

   // Open the template in read-only mode. If the file is not
   // opened successfully, log an error and return false.
   if (!template.open("r")){
         template.close();
         var e = new Object();
         e.model = model;
         e.template = template;
         e.stagingURL= dsURL;
         logErrorMsg("ERROR_COULD_NOT_OPEN_TEMPLATE_FOR_READ",e);
         return false ;
   }

   // Merge the template with data field values with the content
   // in the description.txt file. Values of data fields are
   // plugged into corresponding placeholders in a template.
   // For example, $$model$$ in the template is replaced by the
   // value of the model data field.
   // Paragraphs in the description.txt file are substituted
   // into the template in place of $$n$$ placeholders.
   // For example, $$2$$ in the template is replaced by the
   // second paragraph in description.txt.
   var partArray = descriptionContent.split("----");
      while (!template.eof()){

      // Read a line from the template file and split it into
   // strings using $$ as the separator.
   // Create an array of the strings. param[0] is the first
   // string, param[1] is the second string, etc.   
      // For example:
      // <TD WIDTH="30%"><FONT SIZE=+1>$$$price_final$$</FONT></TD>
      // param[0] = <TD WIDTH="30%"> <FONT SIZE=+1>$
      // param[1]= price_final
      // param[2] = </FONT></TD>
      var line = template.readln();
      var param = line.split("$$");

      // If there are 3 sections, substitute either a description
      // paragraph or a datafield value for the middle string.
      if (param.length == 3)
   {
       var ind = parseInt(param[1]);        // Returns 0 if not an integer.
       // If ind is > 0 get a paragraph from description.txt
       // else get a data field value.
       var subthis = ind > 0 ? partArray[ind-1] pi.getData(param[1]);

       // Write the first string into the datasheet.
       dsContent += param[0];
       // Write the substituted string into the datasheet.
       dsContent += subthis;
       // Write the last string into the datasheet.
       dsContent += param[2];
      }
      // If there are not 3 strings, it means the line contains no
      // placeholders, so write the whole line into the datasheet.
      else {
         dsContent += line;
      }
      dsContent += "\n";
   }



   // Close the template.
   template.close();

   // Use the store method of the contentStore object to
   // publish the datasheet to the destination URL
   // that was defined earlier.
   var status = cStore.store(dsContent,dsURL);

   // Keep track of where the datasheet has been published by
   // storing the URL in a data field.
   pi.setData("stageURL",dsURL);
   return true;
}



The computeTitle Script

This script is invoked every time a data sheet is initiated. It is responsible for initializing the title of the process instance. The title of the process instance shows up in the work list when the application is running in production mode.

This script relies on the fact that the application contains a field called title that is used as the title field for the application (that is, in the application's properties, the title property is set to title.)

Users enter the values for the type and model during the entry point. This script runs as a completion script for the entry point. The script simply gets the value of the type and model data fields, and combines them to specify the name of the process instance. For example, if the type is printer and the model is 2345, the title of the process instance is "printer 2345".


function computeTitle(){
   // Use the global function getProcessInstance()
   // to get a reference to the process instance.
   var pi = getProcessInstance();

   // Read the value of the field "model" which was set by the
   // participant in the newDataSheet form in the entry point.
   var model = pi.getData("model");

   // Read the value of the field "type" which was set by the
   // participant in the newDataSheet form in the entry point.
   var type = pi.getData("type");

   // Set the value of the field "title" to be an aggregation
   // of the type and the model.
   pi.setData ("title", type + " " + model);

   // The execution has been successful.
   return true;
}



Content Store



The Content Store has information about where attached files are stored on the Enterprise Server. Before deploying the application, you must fill in the URL, Public User, and Public Password properties. For more information on configuring the Data Sheet sample application for deployment, see Configuring the Data Sheet Application. For more information on content store properties, see Setting Up the Content Store.



Finished Data Sheet Example



The data sheet uses two files that the user adds during the process. These files reside in the builder/Samples/DataSheet/demo folder:

  • description.txt

  • image.gif

There are also some files shipped with the sample application in the builder/Samples/DataSheet/models folder:

  • bar.gif

  • Printer.html

  • thumb_printer.gif

When these files are combined by the application they create a data sheet. The following examples show a sample description.txt file, a sample image.gif file, and the finished data sheet using these files and the files in the /models folder.


The description.txt File

The user uploads a text file as part of completing the form to initiate a new data sheet. Here is an example:

Start with superior, high-resolution laser print quality, versatile paper handling and 12 page-per-minute print speed driven by a fast processor. What you get is the Aurora LaserJet 2015 printer, <B>Super Fast</B>delivering outstanding value for individual or shared use from the market leader in laser printing for the office.

----

The 12 page-per-minute engine and fast processor get performance off to a great start. With the instant-on fuser that eliminates warm-up time, you get a quick 19-second first page out speed. Printing efficiency is further increased with a multi-sheet feeder.

----

Megabytes of memory effectively doubled with Aurora's Memory Enhancement technology (MEt), and two parallel ports for seamless network compatibility and functionality.

----

Professional, high-quality printing. Outstanding performance: Compatible, Reliable Aurora printers with the best Image Quality and High Speed printing on the Paper types you want.&nbsp;

<P>True 600 x 600 dpi resolution delivers clear lines, blacker blacks and perfect gradients in all your text and graphics. Brilliant graphics with at least 128 levels of gray for smoother gray transitions and photorealistic images


The image.gif File

The user also adds artwork to the data sheet in the Add Art activity. Figure 14-5 shows an example of the kind of file a user might add:

Figure 14-5    Sample image.gif


This image appears at the top of the finished data sheet.


The printer.html Template File

The printer template file is in the builder/Samples/DataSheet/models folder. The data sheet application uses it to format the data sheet. The HTML template file contains placeholders identified by $$ to indicate places where datafield values or paragraphs from the description.txt will appear.

For example, the placeholder $$model$$ will be replaced by the value of the model data field. The place holders indicated as $$1$$, $$2$$, and so on, indicate places where paragraphs in the description.txt file will be plugged into the template. For example, $$1$$ indicates where the first paragraph of the description will be placed in the data sheet.

The HTML template must have no more than one placeholder per line. Any lines that do not contain placeholders are used in the datasheet without modification.

<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.04[en](X11; U; SunOS 5.5.1 sun4u)[Netscape]">
   <TITLE>$$model$$
         $$type$$ Data Sheet</TITLE>
</HEAD>
<BODY BGCOLOR="white">
<CENTER>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="650">
<TR ALIGN=LEFT VALIGN=TOP>
<TD COLSPAN=3 VALIGN=CENTER HALGIN=CENTER><IMG SRC="$$art$$"></TD>
</TR>
<TD ALIGN=LEFT VALIGN=TOP>
$$1$$
</TD>
<TD ALIGN=LEFT VALIGN=TOP>
$$2$$
</TD>
<TD ALIGN=LEFT VALIGN=TOP>
$$3$$
</TD> </TR>
</TABLE>

<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH="650">
<TR><TD COLSPAN=2><IMG SRC="/wfDataSheet_b2/models/bar.gif"></TD></TR>
<TD VALIGN=TOP><IMG SRC="/wfDataSheet_b2/models/thumb_printer.gif" ALIGN=LEFT></TD>
<TD>
$$4$$
</TD> </TR>
</TABLE>
<TABLE BORDER=0 CELLPADDING=2 WIDTH="650">
<TR>
   <TD WIDTH="70%" ALIGN=RIGHT><FONT SIZE=+1>Unit Price:</FONT></TD>
   <TD WIDTH="30%"><FONT SIZE=+1> US $ $$price$$ </FONT> </TD>
</TR>
<TR>
   <TD WIDTH="70%" ALIGN=RIGHT><FONT SIZE=+1> VAR Discount:</FONT></TD>
   <TD WIDTH="30%" ><FONT SIZE=+1>$$discount_code$$</FONT></TD>
</TR>
<TR>
   <TD WIDTH="70%" ALIGN=RIGHT><FONT SIZE=+1>Final Price:</FONT></TD>
   <TD WIDTH="30%"> <FONT SIZE=+1>$ $$price_final$$</FONT></TD>
</TR>
<TR><TD COLSPAN=2><IMG SRC="/wfDataSheet_b2/models/bar.gif"></TD></TR>
</TABLE>
</CENTER>
</BODY>
</HTML>


The Finished Data Sheet

When the data sheet is built, all the pieces come together. Figure 14-6 shows a sample data sheet which uses the description.txt file and the image.gif file in earlier examples.

Figure 14-6 The finished data sheet


The pricing information comes from information entered by users into forms and approved by the product manager and the vice president, if required.



Configuring the Data Sheet Application



Before you can deploy the Data Sheet application on your own system, you must configure the application. The main steps are as follows:

  1. Set the corporate directory as described in Setting Your Corporate Directory.

  2. Make sure that your admin user has an email address. For details on creating an email address for the admin user, see Adding an Email Attribute for a User.

  3. Configure the content store. For details, see Using File Attachments and Content Stores.

For demonstration purposes, all the activities are assigned to the creator of the process instance. As a result, if you deploy this application as currently set up, you can create a process instance and participate in all the steps.


Configuration Hints

This section describes the following configuration hints:


How Users Access the Data Sheet

In the DataSheet application, make sure that the stageURL data field points to the right URL. For example, if you point your content store at http://kimba.mcom.com/CS, then the stageURL field must point to a folder on that server, such as http://kimba/docs. Note that docs is the default primary document directory for an Enterprise Server.

In addition, when you build a sample data sheet in Process Express, PAE stores the data sheet in a folder specific for each process instance. For example, suppose you have a default Windows NT installation. If your process is titled "AS2015-test" and its ID is 58, then the new data sheet is stored here:

C:\Netscape\SuiteSpot\docs\CS\DataSheet\58\AS2015-test.html

The URL displayed to end users in Process Express is then:

http://kimba/CS/DataSheet/58/AS2015-test.html


Process Express and Netscape Application Server

If you have Netscape Application Server installed on the same system as Process Express, you will not be able to use Netscape Communicator with file attachments. To avoid this situation, you can install NAS and Process Express on different systems, or you can use Microsoft Internet Explorer to access Process Express.

For additional information about using the File Attachment data field, see File Attachment


Adding an Email Attribute for a User

Some sample applications require a user to have an email account. For example, both the TimeOffRequest and DataSheet applications require the admin user to have email. If this user doesn't have email, you will get an error in the logs.

To add email for a user, follow these steps:

  1. Launch Netscape Console.

    On Windows NT, you can do this by using the Start/Programs menu command and looking for the Netscape Server Family menu item.

  2. In the authentication dialog box, enter this information:

    • administrative user name

    • administrative password

    • administration URL for the new directory server's Administration Server, including the port number

  3. Click the User and Groups tab.

  4. Enter "admin" or "adm*" in the user field, then click Search.

  5. Select the admin user ID from the list of users displayed. By default, this is the NAS Administrator user.

  6. Click Edit.

  7. Enter an email account. If you are the administrator yourself, and you are just testing the system, enter your own email address to see what email notifications you can receive.

  8. Click OK.

  9. Close the Netscape Console.


Using File Attachments and Content Stores

If you want to deploy and use the DataSheet application (or other applications that use file attachments), you must set a new access control list (ACL) for the content store. You must then define the content store properties in Process Builder. In summary, you must perform the following main steps:

These steps are described in detail in the sections that follow.


Step 1: Administer the Enterprise Server

You set up an access control list (ACL) through the Enterprise Server. To administer the Enterprise Server, perform the following steps:

  1. Go to the Server Administration page for your Enterprise Server.

  2. Click the button for your Enterprise Server instance. You'll go to its Server Manager pages.

  3. Click the Configuration Styles button.

  4. Click the New Style link.

  5. Enter ContentStore as the Style Name field and click OK.

  6. In the page that appears, click the "Edit this style" button.

  7. Click the Restrict Access link. This displays the Access Control List Management page.

  8. Make sure that "the style ContentStore" is displayed, then click the "Edit Access Control" button. This displays the Access Control user interface.


Step 2: Edit the Access Control List

Within the Access Control user interface, perform the following steps:

  1. Click the New Line button twice. This creates two new ACL lines.

    • Leave the first line unchanged.

    • In the second line, click Deny. A second pane appears in the lower part of the page.

  2. Click Allow in the lower pane.

  3. Click Update to update the top pane's values.

  4. In the second line, click "anyone".

  5. In the lower pane, click the "Authenticated people only" radio button.

  6. Click the "All in the authentication database" radio button.

  7. Make sure that the Default authentication method is selected.

  8. Under "Authentication Database" at the bottom of the pane, select your corporate directory from the dropdown list, then click the radio button next to it.

  9. Click Update in this frame to update the top pane.

  10. In the top frame, click Submit to set the change.

  11. Click OK to save your changes.

  12. Click Save and Apply to apply your changes to the server.


Step 3: Assign the Content Store's Style

After editing the ACL, assign the content store's style by performing the following steps:

  1. Under Configuration Styles, click the Assign Style link.

  2. Enter CS/* as the URL prefix wildcard. This causes the URL to be:
    http://<yourServer>/CS/*

  3. Select ContentStore from the drop down list and click OK.

  4. Click OK again to save your changes.

  5. Click Save and Apply to apply your changes to the server.


Step 4: Set the Values for the Application's Content Store

After working with Enterprise Server (as described in Steps 1, 2, and 3), you must make changes in Process Builder. You must set the content store values by performing the following steps:

  1. If necessary, start Process Builder.

  2. Locate the ContentStore entry in the application tree view.

  3. Open the Inspector window for the ContentStore entry.

  4. Enter a URL with the format http://<yourEnterpriseServer>/CS.

  5. Enter the administrative user and password for the Enterprise Server. For example, enter admin and admin.

For more information on content store properties, see The Content Store Inspector Window.


Previous     Contents     Index     DocHome     Next     
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.

Last Updated May 02, 2000