XCP 2.0 Self Paced Tutorial v1.5
XCP 2.0 Self Paced Tutorial v1.5
XCP 2.0 Self Paced Tutorial v1.5
0
Tutorial
December 2012
XCP2.0
SELF-PACED
TUTORIAL
page 2
Table of Contents
Overview ...........................................................................................................................................................................6
Known Issues ....................................................................................................................................................................7
1.0: Application Creation ..............................................................................................................................................8
2.0: Policies .....................................................................................................................................................................11
2.1: Policy Model .......................................................................................................................................................11
2.2: Policy Pages ........................................................................................................................................................16
2.2.1: Create Policy Page.................................................................................................................................16
2.2.2: Edit Policy Page .......................................................................................................................................20
2.2.3: Policy Context Menu ..................................................................................................................................21
2.2.4: Policy Search Page ....................................................................................................................................22
2.3: Configuring the Master Page ..........................................................................................................................30
2.4: Deployment ........................................................................................................................................................34
2.5: Testing the Application: Policy Creation .......................................................................................................37
3.0: Vehicles ...................................................................................................................................................................41
3.1: Vehicle Make Picklist .........................................................................................................................................41
3.2: Vehicle Business Object ....................................................................................................................................44
3.3: Stateless Process for Create/Relate ...............................................................................................................46
3.4: Vehicle Real-Time Query ..................................................................................................................................55
3.5: Vehicle Pages .....................................................................................................................................................60
3.5.1: Add Vehicle Page ..................................................................................................................................60
3.5.2: Displaying Vehicles Related to a Policy .................................................................................................67
3.6: Testing the Application: Vehicle Creation and Policy Linking ..................................................................69
4.0: Claims.......................................................................................................................................................................72
4.1: Claim Status Picklist ............................................................................................................................................72
4.2: Claim Folder ........................................................................................................................................................73
4.3: Stateless Process for Create/Relate ...............................................................................................................75
4.4: Claim Real-Time Query .....................................................................................................................................83
page 3
page 4
page 5
Overview
Welcome to the xCP 2.0 Self-Paced Tutorial!
Congratulations on downloading the new xCP Designer and xCP Runtime. xCP Designer is the new
unified tool to build xCP 2.0 applications. You may be familiar with Process Builder, Forms Builder,
Composer, Process Reporting Services and TaskSpace Configuration; well, xCP Designer is all of those
rolled into oneplus a lot more! Its an entirely offline tool (youll notice that you wont connect to a
repository until its time to do a deployment). Youll also see our new xCP Runtime (which is replacing
TaskSpace in xCP 2.0). Its new, its modern, and we think youll like both the look and feel as well as the
performance.
In order to introduce you to the software and some of the new concepts in it, this tutorial will have you
start from the very beginning creating a new application.
In this guide, you are going to build a simple application, but we wanted you to get a good feeling for
what the new tool is like and what some of the important concepts are.
The premise for this guide is the beginnings of an auto insurance application. Youre going to start by
modeling two basic business object types (thats xCP 2.0 parlance for contentless objects): a Policy
and a Vehicle. For each, youll create pages for creating and viewing, as well as pages to show lists of
each. Youll also define a folder object type (Claim).
Youll explore one of the new concepts in xCP 2.0: relationships. You will model a relationship between
Policies, Vehicles, and Claims in the case, one-to-many relationships because policies can cover one
or more cars and/or claims. Youll utilize stateless processes to perform the creation and the subsequent
relation of objects.
Later, youll add a picklist, a context menu, and a business event. Youll also create a process that uses
a parameter for a work queue. The process will allow an adjudicator to make a decision on the claim
(approved or declined). For the process you will create a task list and task pages for each manual
activity.
Youll define a content (document) type for Supporting Documentation. Youll add discovered
metadata to the content type, which leverages the metadata extraction feature of Content
Intelligence Services. Youll create a full-text query which showcases search facets. Youll also create a
couple of BAM reports based on historical events.
Remember, youre learning here. Experiment. Feel free to take advantage of rapid deployments
deploy frequently to see how your changes work.
If you find a bug, please let us know as soon as possible through the appropriate channel.
page 6
Known Issues
(Or, The list I never pay attention to until its too late)
Issue
Resolution/Workaround
See above
The memory settings for the tcServer have likely not been
optimized. Simply restart the tcServer service to temporarily
improve performance
page 7
page 8
3. On the New xCP Application dialog enter Concordant Insurance as the Applications Name
and click Next. (Note: you cannot change this once it is set.)
4. On the next screen, enter cia as the Namespace. (Note: you cannot change this once it is
set.)
page 9
5. Click Finish.
xCP Designer will restart and create the new application.
After the xCP Designer has restarted, the application you have created will appear in the
Projects list of the Application Model editor (which is opened by default).
page 10
2.0: Policies
2.1: Policy Model
Goals: Create the model that will represent a customers insurance policy in your application.
Concept:
Business Object a business object is used to represent contentless objects in Documentum (if you are
experienced with Documentum, think type that inherits from dm_sysobject).
1. Click on the Object Models Tab.
2. Right click on the Business Objects node and select New Business Object.
page 11
3. The New Business Object Model dialog will appear, enter Policy in the label field. Click Finish.
page 12
5. Click on the Attributes Tab to start adding attributes to the Business Object.
Type
First Name
String
Last Name
String
Address
String
Coverage
Float
End Date
Date
page 13
page 14
page 15
page 16
2. Expand the Business Objects UI node, and right-click on Policy, then click on New Page
3. In the New Page dialog, select the Create Policy radio button under the subheading Generate
widgets and bindings. Click Finish. This will generate a page with widgets and a service for
creating a policy.
4. The Create Policy page is created with all the attributes defined in the Policy Business Object.
page 17
5. Re-order the attribute list in an order of your choice. You can do this by dragging and dropping
them above/below one another on the page.
6. To demonstrate the use of expressions, we will convert the user input for the First Name and Last
Name fields to upper case when the creation Data Service Instance is invoked by the user
clicking the Create button. Expand the Data Service Instances panel and click on the Create
Policy Data Service Instance.
page 18
7. Select the Inputs tab. Notice that most of the inputs to Create Policy are coming directly from
the various widgets. But were going to do something different for First Name and Last Name.
Enter the following expression as an input value for the First Name attribute:
toUpper(widgets.first_name.value)
Expressions can be specified manually by typing (with auto-complete accessible via pressing
Ctrl-Space), or assisted by using the Expression Builder. To access the Expression Builder, either
double click the desired attribute, or select the desired attribute and click the ellipsis () button.
The default behavior of the Expression Builder is to append your selection to the end of the
existing expression already defined. If you instead want the expression builder to replace existing
text (either the entire expression or a subset of it), first select the text you would like to replace,
and then click the ellipsis button.
8. Repeat the action for the Last Name field. Your expression should be:
toUpper(widgets.last_name.value)
9. Click the Save button to save your changes and close the Create Policy page
page 19
5. Modify the layout by rearranging fields and adding column boxes to group different attributes
together as you like.
page 20
6. Click the Save icon in the toolbar to save your changes. Alternatively, you can press Ctrl-S on the
keyboard. Then close the Edit Policy page.
2.2.3: Policy Context Menu
Creating a context menu for an object type makes that context menu accessible anywhere in the
runtime UI simply by right-clicking an object of that type. In some cases, a chevron icon will be
displayed next to the object to expose its context menu.
1. On the User Interface tab in Designer, right-click the Policy node under Business Object UI and
select Create Context Menu
2. In the main design panel, select the Edit Policy menu item and change its label to Open Policy
The label change here is purely for aesthetic/semantic purposes. No actual functionality is being
modified by this change.
3. Click the Save button and close Context Menu (Policy)
page 21
page 22
3. The New Real-Time Query Dialog will appear. Make sure that the Policy type is selected and set
the label to Policy Search then click Finish.
page 23
5. Select the Dataset tab. Double click on the following attributes (located on the right) to add to
the output columns
a. Last Name
b. First Name
c. End Date
d. Object ID
Exposing Object ID as an output column is not technically required in this case, but it is a best
practice while designing your application, as it may come in handy if you decide to wire a
page 24
comments widget or a viewer widget to the currently-selected item in a result list. You can
always remove it later, though youll have to update any result lists which depend on the query.
6. Click on the User Inputs tab. Double click, or drag-and-drop the Last Name attribute to the
canvas to add it to the User Inputs
7. In the editor canvas, click the Policy.Last Name entry first, and then move to the Properties tab
(located in the lower pane of the Designer), and change the operator to Contains. Enable the
Case insensitive checkbox.
page 25
8. Click on the Save button to save your changes, and close the Policy Search Model
2.2.4.2 Policy Search Page
Now we will create a Policy Search page to display the results for the Real-Time Query you just created.
1. Click on the User Interface tab
2. Right-click on Application and select New Page
3. The New Page Dialog will appear. Set the Label to Policy Search and click Finish
page 26
4. The editor for the page you just created will have opened. In the Data Service Instances panel,
click on the New Data Service Instance button
5. Select the Policy Search Real-Time Query from the list of Data Services then click Finish
page 27
Ensure the Policy Search Data Service Instance is selected and look at its Properties pane. Notice
the two checkboxes which allow you to configure when the Data Service Instance refreshes its
data. The On page load checkbox will, as the name implies, automatically execute the Data
Service Instance when the page loads or is re-loaded in the browser. The When an input value
changes checkbox will automatically execute the Data Service Instance when any of the input
fields associated with the Data Service Instance have their value changed (you can view and
configure the input fields associated with the DSI by selecting its Inputs tab). If neither of these
checkboxes are enabled, the Data Service Instance will only execute if a button on the page is
configured to call the Data Service Instance. Notice that, by default, neither of these
checkboxes are enabled. You will likely forget to check one of these boxes on a DSI at some
point while doing application development, thus causing a page to not automatically display
the data youre expecting.
7. Enable the On page load checkbox. If you do not enable this checkbox, then after the page
loads, no policies will be displayed until you click the Search button associated with the Results
Lists added in the next step.
8. Drag and drop a Results List widget into the page
page 28
9. On the Properties tab of the new Result List, specify an ID of policies and a title of Policies
10. Select Policy Search from the Data service instance dropdown list to bind the outputs of the
data service to your results list.
The results list widget will be updated to reflect both the output and input attributes of the RealTime Query.
page 29
12. Click on the Save button to save your changes and close the Policy Search page
page 30
3. In the Properties panel, set the Label of the menu item to Policies
4. In the canvas, right click on the Policies menu item and select Insert Submenu Item.
5. In the Properties panel, set the label of the submenu item to New Policy
page 31
6. Select Application page from the Link type dropdown list, then click on the Selector (...) button
and choose the Create Policy page, then click Finish
7. On the Master layout, left-click the Policies menu item to expose its submenu
8. Right-click the New Policy submenu item and select Insert Item After
9. On the Properties tab of the new menu item, specify Search as the label and link it to the
application page Policy Search
page 32
10. Now, youll configure your Policy Search page to be the default page for the application. Select
the Basics tab near the top
This will display the Policy Search page upon initial login to your application in the runtime UI.
13. Click on the Save button to save your changes and close the Master page
page 33
2.4: Deployment
Goal: Now, youll get to deploy and run your application! First, youll review the configuration of a
deployment environment and a run configuration.
Concepts
Runtime environment - a Documentum Content Server and all other components necessary to run an
xCP application.
To make the setup of the environment quicker, we have already set up the environment for you.
Run configuration - a run configuration tells the xCP Designer how to do a deployment: which runtime
environment to use and which deployment options to use (in this tutorial, youll only be using the default
options).
1. Before deploying the application, you need to configure a runtime environment. Click on the
Preferences button in the toolbar.
page 34
3. Click the Add button. The Edit Deployment Environment dialog will appear.
Specify the connection details for your environment and click Test Connection:
The screenshot depicted is an example only. You should replace these as appropriate:
Hostname: hostname or ip address of the machine where xms-server war is deployed
Port number: port number used by the app server where xms-server is running
Username: user name for xms as configured during installation
Password: password for xms as configured during installation
page 35
5. When prompted to apply changes, click Apply Now. Click the Add button on the right side to
add a run configuration
6. Specify a name for the new run configuration (any name will do) and click Finish
page 36
9. When the deployment is completed, the default web browser will be opened and directed to
the URL of your application
page 37
2. Upon logging in, you will be presented with the main screen to your application. Notice that
since no Policies are currently created in your application, the Policies list is empty.
3. Hover your cursor over the Policies menu item and click on the New Policy submenu item:
4.
Fill in the details for the Policy including First Name, Last Name, Policy Address, Coverage, and
an End Date with time. Then click on the Create button. You should see a message near the top
of your screen indicating the Successful creation of your new Policy.
page 38
5. Create a couple more Policies, clicking the Create button to finish each one.
6. When you are done creating your new Policies, hover over the Policies menu item, and click on
the Search submenu item.
7. You should now see a list of the new policies you have created.
page 39
8. Type the Last Name of one of your Policy holders into the Last Name field at the top and click
the Search button. You should see the list narrow down to contain just policies where the Last
Name matches the name you entered:
page 40
3.0: Vehicles
Now well add the ability to create vehicles and associate them with policies, using relationships.
page 41
3. The New Picklist dialog will appear, enter Vehicle Make in the label field. Click Finish
4. The Picklist editor will appear. Use String (the default) as the Data Type.
page 42
6. Click anywhere on the empty grid, (or on the Add Entry button) to add a new row.
Value
FORD
Toyota
TOYO
Volkswagen
VOLK
8. After adding all the entries, click on the Save button in the global toolbar.
9. After saving your changes, click on the Close icon on the Vehicle Make editors tab.
page 43
Type
Make
Picklist
Model
String
Year
Integer
VIN
String
6. To configure a relationship between the Vehicle and Policy object types, drag-and-drop Policy
underneath the Relationships section of the Type panel to the attribute list for Vehicle
page 44
Specifying the relationship as two-way will ensure that Vehicle objects will have metadata
identifying to which Policy they are related, and vice-versa. Specifying that the relationship
should be Many-To-One indicates that there can be many Vehicles associated with a single
Policy, but a Vehicle cannot be associated with multiple Policies (that would be a Many-toMany relationship).
page 45
page 46
3. Specify Create and relate Vehicle as the label, enable the Process can run in stateless mode
checkbox and click Finish
5. Open the Data tab in the Process Properties dialog and select the Packages node
page 47
6. Click the Add button above to create a new package. Name it vehicle, specify the Vehicle
model as its type by using the Select button, and de-select the This is a mandatory package
checkbox
7. Select the Process Variables node and click the Add button for each of the process variables
listed below
Variable Name
Type
Setting
make
String
Input only
model
String
Input only
year
Integer
Input only
vin
String
Input only
policy_id
String
Input only
page 48
8. Ensure your data tree looks like the following and click OK to close the Process Properties dialog
page 49
10. Drag-and-drop a Create activity and a Set Process Data activity onto the process model, and
utilize the Straight flow toolbar button to draw flow lines between all four activities as seen below
The Create activity will be used to create a new instance of the Vehicle model using the input
variables, and the Set Process Data activity will relate the new vehicle to an existing policy
object (using the policy_id input variable).
14. Enable the Folder path radio button under the Get Destination Folder by section and click Next
page 50
15. Copy the make, model, year, and vin process variables on the left side, to the Make, Model,
Year and VIN attributes on the right side
16. Add another Copy function and connect it to the Destination folder path [0] node on the right
page 51
17. Double-click the new Copy instance to open its function editor, add a function parameter and
type /Temp as its value
This is where we specify where in the Documentum repository the new object should be created.
For a production application, it would be wise to setup a special cabinet or folder to house our
applications objects, but for the purposes of the tutorial were using the Temp cabinet.
18. Click OK to close the function editor
page 52
19. Add another Copy function and connect it to the Name attribute on the right, then use the Line
drawing mode tool to connect it to the vin process variable on the left, ensuring that you dont
remove the connection the Copy function already connected to vin
For the purposes of our application, the name of the vehicle doesnt matter. However, were
required to specify a name upon creation, so we have to specify something (vin, in this case).
We could also just hard-code a static name such as Vehicle, but that could potentially make
things confusing.
20. Click Next to advance to the Output Message Mapping screen
21. Add a Copy function and use it to connect the source ID to the destination Packages -> vehicle
(Vehicle) -> Object ID
page 53
This attaches the newly-created vehicle object to our process vehicle package, so that we
may relate the vehicle to a policy in the following step.
22. Click OK to close the activity inspector
23. Double-click the Set Process Data activity to open its activity inspector
24. Rename the activity to Relate Vehicle to Policy
25. Use the copy function to link the policy_id process variable (left side) to Packages -> vehicle
(Vehicle) -> Policy -> Policy (Policy) -> Object ID (right side)
As the name of the activity implies, this will relate the newly-created vehicle object to the policy
object represented by the policy_id input variable.
26. Click OK to close the activity inspector
27. Save your changes and close the process
page 54
page 55
3. Label it Vehicles related to a Policy, ensure Vehicle is the primary model, and click Finish
4. Open the Dataset tab, and double click the Make, Model, Year, VIN and Object ID fields to add
them to the Output Columns list
We mentioned that Object ID was not required for an earlier real-time query. However, for this
real-time query, Object ID is required. It will be passed to another stateless process created later
in the tutorial.
page 56
5. Open the User Inputs tab, expand Vehicle -> Policy -> Policy under Context Data, and doubleclick Object ID to add it to the User Inputs list
page 57
7. Create a new real-time query, name it Vehicle Search, and ensure Vehicle is the primary model
8. Open the Dataset tab, and add the Make, Model, Year, VIN and Object ID attributes to the list
of output columns
page 58
9. Open the User Inputs tab and add the Make, Model and VIN attributes to the list of user inputs
page 59
2. Expand the Business Object UI node, right-click Policy, and select New Page
page 60
3. Ensure that no widgets/bindings will be generated automatically, specify the label as Add
Vehicle, and click Finish
page 61
5. Add the following UI widgets to the page and configure them as below
Widget Type
ID
Label
Drop-down List
make
Make
Text Input
model
Model
Number Input
year
Year
Text Input
vin
VIN
Button
button
Add Vehicle
Button
button1
Return to Policy
6. To associate the make dropdown list with the Vehicle Make picklist defined earlier, select the
make dropdown list, and click the ellipsis button () next to the Picklist selection
page 62
8. To be able to call the stateless process created earlier, click the New data service instance
button to add a Data Service Instance
page 63
9. Select the Stateless Process Create and relate Vehicle data service and click Finish
10. Open the Inputs panel for the new data service instance, and expand the Variables node
page 64
11. To link the make UI widget with the make input variable, double-click the make input variable
and select widgets -> make -> Value, then click OK
12. Do the same to link the model, year, and vin UI widgets on the page with the data service input
variables of the same names
page 65
13. To pass the object ID of the policy to which we want the new vehicle related, double-click the
policy_id input variable and select Policy -> Object ID
Clicking this button will invoke the stateless process created earlier, passing the UI widget values
to it so that it may create a new vehicle object and relate it to the relevant policy object. A
message will be displayed for a brief period at the top of the browser upon success. In addition,
it would be ideal to return to the policy page after completion, but at the time of writing, this
feature does not work correctly. Thus, we have a special button for returning to the policy page.
page 66
Clicking this button will return to the Edit Policy page from whence we came. This is necessary
due to the when done go to functionality of the Add Vehicle button not working properly at
the time of writing. Note that we do not have to specify which policy to view.
page 67
2. Click the New data service instance button, select the Vehicles related to a Policy data service,
and click Finish
3. Ensure that the On page load checkbox for the data service instance is checked
4. Open the data service instances Inputs panel. Notice that the Object ID input is already
mapped to the object ID of the currently-displayed (at runtime) policy
5. Add a Results List widget to the page (either by dragging and dropping, or by double-clicking)
6. Set its id to vehicles, its title to Vehicles, and wire it to the Vehicles related to a Policy data
service instance
page 68
7. Add a new button to the Edit Policy page and configure it to open the Add Vehicle page. You
can remove the Search button that gets added by default
page 69
5. With the Policy now open, click on the Add Vehicle button to link a new vehicle to the Policy:
6. Select a Vehicle Make and then type in a Model, Year, and VIN for the vehicle. Then click the
Add Vehicle button. This will launch the stateless process that you created earlier in Section 3.
7. After the vehicle is created and linked to the Policy the application returns you to the add
vehicle page in case you wish to add more vehicles. For now, just click on the Return to Policy
button and it will take you back to back to your Open Policy view.
page 70
8. You should now see your Policy with the Vehicle added.
page 71
4.0: Claims
Goals: Create a Folder type to represent claims against a policy and vehicle. The claim folder will have
metadata describing the claim, and it will provide as a container for any supporting documentation
related to the claim. A stateful process will also be defined for handling adjudication of the claim.
Concepts:
Stateful Process A process whose state is maintained in the database. Any processes which require
manual tasks (as opposed to automatic tasks) must be defined as stateful. In previous releases of xCP
(prior to 6.7 SP1), all processes were stateful.
3. The New Picklist dialog will appear, enter Claim Status in the label field. Click Finish
4. The Picklist editor will appear. Use Integer as the Data Type
5. Click on the Entries Tab to start adding different Picklist entries.
6. Click on the Add Entry button to add a new row.
page 72
Value
Processing
Approved
Denied
Type
Incident Date
Date-time
Incident Location
String
Amount
Float
Vehicle in Motion
Boolean
Status
Picklist
page 73
6. To configure a relationship between the Claim and Policy object types, drag-and-drop Policy
underneath the Relationships section of the Type panel to the attribute list for Claim
8. Repeat steps 6 and 7 to relate the Claim folder type to the Vehicle business object type using
the same criteria (two-way, many-to-one)
9. Click on the Save button and close the Claim Model
page 74
page 75
5. Open the Data tab in the Process Properties dialog and select the Packages node
Type
Claim
Mandatory
No
7. Select the Process Variables node and click the Add button for each of the process variables
listed below
Variable Name
Type
Setting
amount
Float
Input only
incident_date
Date-time
Input only
incident_location
String
Input only
vehicle_in_motion
Boolean
Input only
vehicle_id
String
Input only
policy_id
String
Input only
page 76
8. Ensure your data tree looks like the following and click OK to close the Process Properties dialog
page 77
10. Drag-and-drop a Create activity and a Set Process Data activity onto the process model, and
utilize the Straight flow toolbar button to draw flow lines between all four activities as seen below
The Create activity will be used to create a new instance of the Claim model using the input
variables, and the Set Process Data activity will relate the new claim to existing policy and
vehicle objects (using the policy_id and vehicle_id input variables).
4. Enable the Folder path radio button under the Get Destination Folder by section and click Next
page 78
6. Add another Copy function and connect it to the Destination folder path [0] node on the right
page 79
7. Double-click the new Copy instance to open its function editor, add a function parameter and
type /<installation user> (e.g. /dmadmin) as its value
This is where we specify where in the Documentum repository the new object should be created.
For a production application, it would be wise to setup a special cabinet or folder to house our
applications objects, but for the purposes of the tutorial were using the Temp cabinet.
8. Click OK to close the function editor
9. Add another Copy function and connect it to the Name attribute on the right, and the Process
Data -> Execution Data -> workflow -> id process variable on the left
page 80
For the purposes of our application, the name of the claim doesnt matter. However, were
required to specify a name upon creation, so we have to specify something (workflow id, in this
case). We could also just hard-code a static name such as Claim, but that could potentially
make things confusing.
10. Click Next to advance to the Output Message Mapping screen
11. Add a Copy function and use it to connect the source ID to the destination Packages -> claim
(Claim) -> Object ID
This attaches the newly-created vehicle object to our process vehicle package, so that we
may relate the vehicle to a policy in the following step.
12. Click OK to close the activity inspector
13. Double-click the Set Process Data activity to open its activity inspector
14. Rename the activity to Relate Claim to Policy and Vehicle
page 81
15. Use the copy function to link the policy_id process variable (left side) to Packages -> claim
(Claim) -> Policy -> Policy (Policy) -> Object ID (right side)
16. Use another copy function to link the vehicle_id process variable (left side) to Packages -> claim
(Claim) -> Vehicle -> Vehicle (Vehicle) -> Object ID (right side).
As the name of the activity implies, this will relate the newly-created claim object to the policy
and vehicle objects represented by the policy_id and vehicle_id input variables. The policy_id
and vehicle_id will be mapped from a UI Page component in a later exercise.
17. Click OK to close the activity inspector
18. Save your changes and close the process
page 82
page 83
3. Label it Claims related to a Policy, ensure Claim is the primary model (found under Folders), and
click Finish
4. Open the Dataset tab, and double click the Incident Date, Amount, Vehicle in Motion, and
Object ID fields to add them to the Output Columns list
Object ID in this case is not required, but as mentioned earlier, its a good practice to add it
while developing your application, in case it needs to be passed to a data service or widget.
page 84
5. Open the User Inputs tab, expand Claim -> Policy -> Policy under Context Data, and doubleclick Object ID to add it to the User Inputs list
page 85
2. Open the Dataset tab, and add the Incident Date, Amount, Status and Object ID attributes to
the list of output columns
3. Open the User Inputs tab and add the Incident Date and Amount attributes to the list of user
inputs
page 86
2. Expand the Business Object UI node, right-click Policy, and select New Page
page 87
3. Ensure that no widgets/bindings will be generated automatically, specify the label as Add
Claim, and click Finish
page 88
5. Add the following UI widgets to the page and configure them as below
Widget Type
ID
Label
Date-time Input
incident_date
Incident Date
Text input
incident_location
Incident Location
Number Input
amount
Amount
Checkbox
vehicle_in_motion
Vehicle In Motion
Results List
vehicles
Vehicles
Button
button
Add Claim
Button
button1
Return to Policy
page 89
8. To enable the display of the vehicles associated with the policy, so that the user may select a
vehicle for association with the new claim, click the New data service instance button to add a
Data Service Instance
9. Select the Vehicles related to a Policy data service and click Finish
page 90
10. Enable the On page load checkbox for the data service instance to display the list of vehicles
automatically without needing to click the Search button
11. Select the Vehicles results list by clicking its outermost edge (as opposed to one of its columns)
and associate it with the Vehicles related to a Policy data service instance
12. To be able to call the stateless process which will create and relate the new claim, click the New
data service instance button to add a Data Service Instance
page 91
13. Select the Stateless Process Create and relate Claim data service and click Finish
14. Open the Inputs panel for the new data service instance, and expand the Variables node
15. To link the amount UI widget with the amount input variable, double-click the amount input
variable and select widgets -> amount -> Value, then click OK
page 92
16. Do the same to link the incident_date, incident_location and vehicle_in_motion UI widgets on
the page with the data service input variables of the same names
17. To pass the object ID of the policy to which we want the new vehicle related, double-click the
policy_id input variable and select Policy -> Object ID
page 93
18. Do the same to link the vehicle_id input variable to widgets -> vehicles -> selected row ->
Object ID
19. Select the Add Claim button on the page and configure it as below
Clicking this button will invoke the stateless process created earlier, passing the UI widget values
to it so that it may create a new claim object and relate it to the relevant policy and vehicle
objects. A message will be displayed for a brief period at the top of the browser upon success.
page 94
Clicking this button will return to the Edit Policy page from whence we came. Note that we do
not have to specify which policy to view.
21. Save and close the Add Claim page
4.5.2: Displaying Claims Related to a Policy
Here, well add a results list widget to the Edit Policy page, and wire it to the real-time query we
defined earlier to list all the claims associated with a policy.
1. On the User Interface tab in xCP Designer, open the Edit Policy page (under Business Object UI > Policy)
2. Click the New data service instance button, select the Claims related to a Policy data service,
and click Finish
page 95
3. Ensure that the On page load checkbox for the data service instance is checked
4. Open the data service instances Inputs panel. Notice that the Object ID input is already
mapped to the object ID of the currently-displayed (at runtime) policy
5. Add a Results List widget to the page (either by dragging and dropping, or by double-clicking).
You can place it directly below the Vehicles Results List that is already on the page.
page 96
6. Set its id to claims, its title to Claims, and wire it to the Claims related to a Policy data service
instance
7. Add a new button to the Edit Policy page and configure it to open the Add Claim page. You
can delete the Search button that is added by default.
page 97
page 98
3. Notice that the generated page does not display custom attributes for the claim object, such as
amount, incident date, etc. Utilize the Value Display widget to display the following attributes on
the page
ID
Label
Data Type
Value
incident_date
Incident Date
Date-time
claim.incident_date
incident_location
Incident Location
String
claim.incident_location
amount
Amount
Float
claim.amount
vehicle_in_motion
Vehicle in Motion
Boolean
claim.vehicle_in_motion
4. To display a Google Maps iframe with a map of the incident location, add another Value
Display widget to the bottom of the page with an ID of location_map and a title of Location
Map
page 99
5. Change the data type to HTML and supply the following value, including quotes: '<iframe
width="500" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
src="http://maps.google.com/maps?output=embed&q=' + claim.incident_location +
'"></iframe>'
page 100
page 101
3. Upon login, you will see the main page of your application with your existing Policies listed out.
Right-mouse click on a policy for which you created a Vehicle and select Open Policy:
4. Notice that your Edit Policy page shows the Claims Results List and Add Claim button that you
added to your application:
5. Click the Add Claim button. The Add Claim page will open requesting details about the Claim
page 102
6. Fill in some data for the Incident Date, Incident Location and Amount and check the Vehicle in
Motion checkbox to indicate that the vehicle was moving at the time of the accident
7. Select a Vehicle from your list of vehicles associated with the Policy and click the Add Claim
button. This will initiate the stateless process that creates the Claim and links it to the Policy:
page 103
8. Add any number of claims for any of the Vehicles on the Policy that you wish. When you are
done testing, click on the Return to Policy button. You should then see the Claims you created
on the Policy.
9. To make sure your Context Menu for Claims is working, right-mouse click on one of your claims
and select View Claim:
page 104
10. This will open the View Claim page where you can view the details of your claim:
11. Congratulations. You have successfully added the ability to create Claims for Vehicles on a
Policy.
page 105
page 106
3. To enable it, dmadmin must be in the queue_admin group. Go to User Management > Roles.
page 107
5. From the menu, select File > Add Member(s). You will see this screen:
page 108
6. Search for dmadmin, press ENTER, select it and add it to the right side of the screen with the right
arrow in the middle of the screen:
7. Click OK.
page 109
8. Youll need to restart the DA server for your changes to take effect. Go to the machine where
DA is installed.
9. Log in using an administrative user (such as dmadmin).
10. Open a new Command Prompt:
page 110
11. Type cd c:\tcserver, and press ENTER. (Note: you can restart the service if you have installed it
instead of steps 11-13.)
page 111
14. Go back to your browser and clear your browsers cache. Log in to DA again. You should now
see the Work Queue Management node enabled.
page 112
2. Navigate to Administration -> Work Queue Management -> Policies -> Work Queue Policies
If the Work Queue Management node does not appear, ensure that the account youre using
is added to the queue_admin role under User Management. After adding your user to that
role, you will likely need to restart the app server which hosts the DA web app before you see
the change. After this, you may see errors in your browser. If so, clean your browser cache,
page 113
restart the browser, and try again. If you are looking for step-by-step instructions on what to do,
please look at this thread: http://one.emc.com/clearspace/thread/121382?tstart=0
3. Open the File menu and select New -> Work Queue Policy
Value
Policy Name
cia
Threshold
100
Max Priority
Initial Priority
Increment Priority
page 114
7. Name the category cia (the namespace you used for your application) and click OK
8. Open the cia work queue category, then select File -> New -> Work Queue
page 115
12. Add all of the queue groups to the right side and click OK
13. Logout of DA
4.6.3: Work Queue Parameter
Concepts
Work Queues
A work queue lists all the process tasks which are waiting to be processed by task processors. To access
a work queue, a task processor has to be a member of the queue. Once a user is an active member of
the work queue, he can start to work on pending tasks. Based on his role, he can access the work
queue to cherry pick some tasks and complete them or let the system decides which tasks are going to
be assigned to him. At any time, a work queue manager can assign and reassign tasks to the
appropriate worker.
Parameters
To ease the deployment of an application to different environments (development, testing, production,
etc), certain configuration items need to be specified as Parameters so that they can easily be
redefined from one environment to another.
page 116
3. Name the parameter Claims Work Queue and specify a type of Work queue, then click Finish
4. Specify the value of the parameter as claims, the name of the work queue created in the
previous section
page 117
2. Name the process Claim Processing and leave the stateless checkbox disabled
page 118
Type
Mandatory
claim
Claim
Yes
policy
Policy
No
vehicle
Vehicle
No
There is no technical requirement to add the policy and vehicle packages here. They are simply
being added to more easily expose them to the claims agent who will be interacting with the
workflow.
5. Add the following process variable
Variable Name
response
Type
Integer
6. Ensure your process data looks like the following and then click OK to close the Process
Properties dialog
7. Add activities and flow lines to your process to match the screenshot below
page 119
The Set Process Data activity is located in the Content group of the Activities pane. The Work
queue task activity is located in the Task group.
8. Open the Activity Inspector dialog for the first Set Process Data step and rename it to Grab
Policy and Vehicle
9. Use Copy functions to map the following and click OK
Source
Destination
Doing this makes the associated Vehicle and Policy objects available to the end-user as
packages, so that they may easier access/display those objects in the runtime UI for the Work
queue task.
10. Open the Activity Inspector dialog for the Work queue task activity and rename it to
Adjudication
11. Open the Work queue Performer tab and click the Edit button to select a work queue
page 120
page 121
13. Select the Claims Work Queue parameter that you defined in the previous section and click
Finish
14. Click OK to close the Activity Inspector for the Adjudication activity
15. Open the Activity Inspector dialog for the last Set Process Data activity
page 122
This will update the claims status to reflect the response selected by the user on the previous
activity (either 1 to represent Approved, or 2 to represent Denied).
18. Save and close the process
4.6.5: Claim Business Event
Concepts
Business Event a Business Event has an event source (an object instance), a trigger (the specific event
type that occurs), a condition (written as an expression), and an action. For seasoned Documentum
developers: you should know that Business Events are intended to go a long way in obviating the need
to write TBOs, since many common events (such as create, update, delete, etc.) can be trapped and a
process (which can have pretty complex and even custom logic) can be invoked. In this section, we
will be using a business event to launch the Claim Processing process defined in the previous section
whenever a claim object is related to a policy object (as occurs in the stateless process, Create and
relate Claim).
1. Open the Object Models tab in Designer
page 123
3. Open its Business Events tab and click the New Business Event button
4. Label the new event Process Claim, select Policy Related as the trigger, and click Next
page 124
Were using the Policy Related event rather than the Claim Created event because the first
step of our Claim Processing process involves grabbing the Vehicle and Policy objects
associated with the claim and placing them into packages. If we launch that process using
Claim Created, its possible that the claim object will not yet have an associated Vehicle nor
Policy, thus causing the first step of our process to fail.
5. Select Start Process and pick the Claim Processing process via the ellipsis button, then click Next
6. Double-click the claim (Claim) package, and specify Event -> Claim as the value
Note the excessive number of arrows in this screenshot. This is because you must select the Claim
node pointed to by the arrows, NOT the Claim node under the Event node.
page 125
7. You should end up with event.claim as the assigned value for the package
The claim package is the only mandatory package. The policy and vehicle packages will
have their values assigned in the first step of the Claim Process process, Grab Policy and
Vehicle.
8. Click Finish, then save and close the Claim folder type
page 126
and it will then display the items in that specific queue. However, you can instead predefine the work
queue to be displayed, as we will be doing in the below steps.
4.6.6.1: Task-List Query
1. Open the Data Services tab in Designer
page 127
2. Right-click the Task-List Query node and select New Task-List Query
3. Name it Claims Queue Query, select the A work queue radio button and click Finish
page 128
4. Click the ellipsis button for Filter by work queue, move the Claims Work Queue to the right, and
click OK
6. Add the Task Name, Process Name and Sent Date fields to the list of Output Columns
You can access these fields under Context Data on the right. Select Task List -> Task.
7. Save and close the query
page 129
5. Enable the On page load checkbox for the data service instance
page 130
7. Specify a value of claims (including single quotes) for the Work Queue Name parameter
Ideally, we would not hard-code a static value here, as if we need to deploy our application to
a new environment with a different queue name, well need to manually change this static
value in the app before deployment. Ideally, we would utilize the work queue parameter
created in an earlier step, as parameter values can more easily be changed for different
environments. However, at the time of this writing, this is not yet fully implemented.
8. Add a Results List to the page using the following values
ID
Title
tasks
Tasks
page 131
10. Open the Master page for the application, and change Menu Item 2 to read Tasks and link to
the Tasks page
Value
Approve
Deny
page 132
3. Name the action flow Select Policy, ensure the Selector action is selected, and specify Policy
Search as the Data Source Contract. Click Finish
page 133
4. Notice that two new tabs were opened (Select Policy, and Step 1 (Policy)). Take a look at Step
1 (Policy) to see what will be displayed when utilizing the selector action flow. We will not be
making any changes, so close both tabs
This action flow page utilizes the Policy Search data service to allow the end user to search for a
policy, and select it, in this case allowing them to re-assign the object referenced by our
workflow package.
5. Repeat the steps to create two more selector action flows for the Vehicle business object
(utilizing Vehicle Search) and the Claim folder object (utilizing Claim Search)
page 134
You must create an activity page for each manual task and work queue task within a process.
Since the Claim Processing process only contains one such task (Adjudication), we only need
one activity page.
3. Select the Adjudication activity, accept the default name for the page, and click Finish
page 135
5. In its Properties tab, specify Object ID for the display, and the Select Claim action flow below
Doing this tells the UI to use the Object ID of the claim object as its display attribute (which
admittedly isnt a pretty thing to display), and also which action flow to utilize when trying to
re-assign the value of the claim package.
page 136
6. Repeat the above steps for the policy (utilizing Last Name as the display) and vehicle (utilizing
Model as the display) packages on the page
7. Right-click and Delete the response input widget on the page, and add a Drop-down list in its
place
Value
ID
response
Label
Response
Initial value
claim_processing_adjudication.processVariables.response
Data type
Integer
Picklist
Adjudication Response
page 137
This makes the drop-down list widget effectively read-only when the task has not been acquired
by the currently logged-in user. Once the task has been acquired, normal behavior will be
enabled for the drop-down list.
10. Note that since we gave the drop-down list the same ID as the auto-generated number input
widget we deleted (response), we do not have to update any of the data service instances on
the page. If your drop-down list has an ID which differs at all from the name of the process
variable (response, if the directions were followed exactly), you will need to manually update
the input variables for a number of data service instances on the page.
11. Save and close the page
4.6.8: Testing the Application: Claim Creation
Goal: In this exercise you will test the incremental changes youve made to the application by creating
a Claim, ensuring the Claim Process initiates, and then participating in the Adjudication step.
1. Click Run Application button to redeploy and run your application
2. When the deployment is completed, log in to your application using the Documentum
installation owner (usually dmadmin).
3. Upon login, you will see the main page of your application with your existing Policies listed out.
Notice you have a new Tasks Menu Item on your Menu Bar.
page 138
5. There are currently no Adjudication tasks in your task list at the moment.
6. Click Policies Search on your Menu Bar to list the policies you have created. Right-mouse
click on one of your Policies and select Open Policy.
7. In the Claims section of your open policy, click the Add Claim button to initiate a new Claim.
page 139
8. Fill in the Claim details, choose a Vehicle from the list and then click the Add Claim button
9. When you get the message indicating you have Successfully created the Claim, click on the
Return to Policy button and verify that your new Claim appears in the Claims section:
page 140
10. Once youve verified that it was created, click Tasks on your Menu Bar to bring up the list of
Adjudication tasks:
11. Right-mouse click on the Adjudication item and select the option to Acquire the task:
page 141
12. Right-mouse click on the item and choose the option to View the item:
page 142
13. Select the Attachments tab. Here is where you can add new documents as attachments to the
process (if you want to add documents to the claim folder itself, youll need to open its View
page):
page 143
14. Select the History tab. Here is where the audit trail information can be viewed.
15. Click back on the Task Details tab. Choose one of the responses from the Response pick list:
page 144
17. You should see a message indicating that you have Successfully completed the task.
18. Click Tasks on your Menu Bar one more time and now you should see that the Task has been
dispatched out of your inbox.
page 145
page 146
4. Open the Attributes tab and add the Email Address [xcp] and Phone Number [xcp] discovered
metadata attributes to the content type
Note that even though the attribute names are singular, they are both repeating values, as a
document may contain more than one email address or phone number.
5. Save and close the content type
5.1.2: View Page
1. Open the User Interface tab in Designer
2. Expand the Content UI node, right-click the Supporting Document node and select New Page
3. Ensure the View Supporting Document radio button is selected and click Finish
page 147
4. Notice that the view page already contains display widgets for the attributes of the document,
a viewer widget to display its content, and a comments widget
page 148
page 149
3. Name the action flow Import Supporting Document, select Import as the action, and click Finish
4. Notice that two tabs are opened, Import Supporting Document and Step 1 (Supporting
Document). If you look at the page for Step 1 (Supporting Document), notice that the only
attribute displayed is the Name attribute. The discovered metadata attributes (Email Address
and Phone Number) are not displayed, as their values will be set automatically.
page 150
2. Right-click the Full-Text Query node and select New Full-Text Query
3. Name the query Supporting Document Search, select Supporting Document as the primary
model and click Finish
page 151
4. Open the Dataset tab and add Name, ContentType and Last changed to the output columns list
5. Open the Facets tab and add ContentType, Email Address and Phone Number to the facet list
6. Open the User Inputs tab and notice that the Include an input field for full-text searching
checkbox is enabled
7. Add the Name attribute to the list of user inputs and change its search operator to Contains
page 152
page 153
7. Open the Master page for the application and change Menu Item 3 to Doc Search, and point it
to the Sup Doc Search application page which we just created
page 154
5. When the Policy opens in its page, right-mouse click on one of the Claims and select the option
to Import (this will allow us to import a new Supporting Document for the Claim):
page 155
6. When the Import Files window pops-up, click on the Green Plus button to Add file to import:
7. Browse to the location on your local hard drive where you stored the Claim Estimate test
document and add the file Estimate.docx. Use the pull-down lists to select values for the
Content Type and Format:
a. Content Type: Supporting Document
b. Format: MS Word Document 2007/2010
8. Modify the Name if you want, then click on the Finish button. You should receive a message
near the top of your browser indicating you Successfully imported file.
9. After a couple of minutes, your document will be indexed. Click on the Doc Search menu
choice on your Menu Bar:
page 156
10. On the Document Search page enter the word Bumper for the value in Full-Text and click on
the Search button:
11. Now in your results you will see the Supporting Document that you imported as part of your
Claim. Notice that term bumper that you searched for is highlighted in the results list. Also, see
that the Discovered Metadata fields of Email Address and Phone Number have been populated
with values from the content of the Estimate.docx document itself.
page 157
12. Right-click the document row and select View Supporting Document
13. The view page displays. Note the discovered metadata at the top, the viewer widget, and the
comments widget below
page 158
As you may have guessed, the viewer widget, comments widget, etc can ultimately be added
to any page, so long as you correctly wire them to an appropriate object ID.
14. Congratulations, you have successfully implemented Supporting Documents for your Insurance
application.
page 159
3. Open the object types Business Events tab and click New Business Event
page 160
4. Name the event Claim processed, select the Claim Updated event
The condition on the business event is used to ensure that the data pushed to BAM is relevant for
the report we want you to build. You are going to use this business event to get a timestamp on
when the claim is processed (if you remember, the claim processing process ends with an
update of the claim status to either Approved or Denied)
6. Ensure the No action Used in reporting only radio button is selected and click Finish
page 161
As mentioned earlier, the only way data about an object gets pushed to the BAM database is if
there is an event defined for that object type.
7. Save and close the Claim object type
3. Name the query Number of claims by status, select Folders as the Primary model and Claim as
the object type and click Finish
page 162
4. Open the querys Data Collection tab, and add the Claim processed event to the list of
Subscriptions
5. Open the Dataset tab, and add the following attribute to the list of Dataset Columns
Object
Attribute
Label
Claim
Status
Status
Claim
Object ID
Object ID
Claim.Object ID is being added so that we may get a total count within the system. The Status
attribute is being added as something which will be common across multiple rows, so that we
may utilize it as a group by field. Any query which utilizes aggregation functions (such as the
count function which we will use for the other field) must also have a group by field.
page 163
7. Select the Apply aggregation functions radio button, select the Object ID column and click Next
page 164
9. No action needs to be taken for the Status field, as it has been automatically defined as a
group by field
page 165
page 166
2. Open the querys Data Collection tab, and add the Process Claim event and the Claim
processed event to the list of Subscriptions
3. Open the querys Dataset tab, and add the following attribute to the list of Output Columns
Object
Process Claim
Attribute
Event Name
Label
Event Name
You are adding this attribute to have at least one attribute in each row, but the calculation
function that you are going to use will add more attributes.
4. Open the Calculation tab, and use the Add Calculation button to create a duration column.
Select Create a duration column and click Next
page 167
5. Set the label to Claim Processing Duration, verify that the two events are correctly configured as
below and finally change the unit to Seconds
6. Click Finish
You will notice that the duration function wizard automatically added two more attributes which
are the creation date of the events.
page 168
7. Add one more calculation by clicking on Add Calculation, select Apply aggregation functions,
choose the Claim Processing Duration column and click Next
page 169
page 170
3. Add data service instances to the page for the Number of claims by status and Average time for
claim processing historical queries, making sure to select the data services with the appropriate
historical query icon, and not the typical data service icon
5. In the Properties pane, change the title of the column box to Charts
page 171
6. Add a Pie Chart widget to the left column of the column box already created
page 172
7. In the Properties pane, click on the General tab and specify the following settings:
Tab
Setting
Value
General
ID
claims_by_status
General
General
Title
8. In the Properties pane, click on the Values tab and remove the Status from the values (the Status
is going to be used for the categories)
page 173
By clicking on the Status field, then on the Remove button, you should end with the following
9. Change the label for the Count of Object ID to Number of claims per status
10. In the Properties pane, click on the Categories tab and add the Status
page 174
Note that the data displayed for the chart while in Designer is not real. It is merely generic
data to give an idea of what the chart will look like at runtime.
11. Add a Gauge Chart widget to the right side of the column box
page 175
12. In the Properties pane, click on General and select the Average time for claim processing data
service instance
page 176
page 177
3. Change the label for the new item to Reports and link it to the Reports application page
page 178
page 179
7.0: Customizations
7.1: JavaScript Expression Functions
The function utilized in this exercise takes a date and humanizes it to a format such as Yesterday, or
Last week. Note that expression functions can be written in both Java and JavaScript, but they each
can only be utilized in certain areas of the application. For more details, see the xCP 2.0 Extension Points
whitepaper. All files referenced here should be available from same location that this guide was
downloaded from.
1. Open the Application tab in xCP Designer
page 180
page 181
This is done because the return value of the calendarTimeAgo() function is string, not date-time.
11. Save and close the page
page 182
14. In the properties pane, enable the checkbox named Clicking on this object in a datagrid or tree
invokes this action
Doing this ensures that you always see the View Supporting Document page when clicking a
supporting document, instead of the default View Base Content page, which doesnt utilize the
custom expression function.
15. Save and close the context menu
16. Run/deploy your application
page 183
17. Open the view page for a supporting document and verify the humanized last-changed date
page 184
3. Near the bottom, identify the location of the application on the filesystem
page 185
6. Open the Artifacts folder and create a subfolder called Java Modules
page 186
8. Go back to the root of your application, and open the content folder
page 187
13. Add a new String attribute to the Claim model with a label of Claim ID and a system name of
claim_id
page 188
16. Add a new Execute Java Service activity (located under the Java folder in the palette)
between the Create and Relate steps
17. Open the activity inspector for the new activity and rename it Generate ID
18. Use the Select button to choose the Unique ID Generator java module
19. Ensure that the generateUniqueId method is selected and click Next
If the java module contained multiple methods, you would see all of them here. Note that only
methods which expect and return primitive data types are supported.
page 189
20. Use a Copy function to assign a prefix such as CL- to the prefix input argument and click Next
In order for the arguments to be named according to the Java source code (as opposed to
param1, param2, etc), the code must be compiled with the g command-line option.
Compiling with g generates debugging information for the code, which includes parameter
names. For more details, see the whitepaper titled xCP 2.0 Extension Points.
21. Use a Copy function to set the return value, String, to the Claim ID attribute of the claim
package
page 190
page 191
Value
ID
claim_id
Label
Claim ID
Value
claim.claim_id
Data type
String
page 192
JAR files are actually ZIP archives with a specific structure. Thus, you can use any compression
tool such as WinZip or 7-Zip to extract or view the contents of a JAR file.
2. Under the META-INF folder, open the MANIFEST.MF file for viewing/editing
The Component-Bundle property specifies the name of the top-level folder where custom
widgets (and other components) can be found.
page 193
3. Open the SliderWidget folder at the root of the archive and view the contents
The config folder contains one or more XML files which describe the custom components
(such as widgets) in the JAR.
The content folder contains one or more JavaScript files which provide the functionality of the
custom components (such as widgets) in the JAR.
The icons folder contains the icons which will be displayed for the custom components in xCP
Designer.
page 194
This configuration XML file describes the custom slider widget, including which icons should be
displayed in the Designer, to which category the widget belongs, the location of the JavaScript
file(s) which make up the functionality of the widget, etc. For more details, see the whitepaper
titled xCP 2.0 Extension Points.
page 195
This JavaScript file provides the actual functionality of the widget at run-time. For this widget,
were simply exposing the functionality of the Ext.slider.Single widget which is provided with the
ExtJS toolkit. For more details, see the whitepaper titled xCP 2.0 Extension Points.
page 196
This designer JavaScript file provides behavior for the widget during design-time in xCP
Designer. Included behavior is which blades or tabs should exist for the widget when viewing
its properties, and which fields should be exposed on those blades. Note that exposing custom
fields and custom blades is irrelevant unless the runtime JavaScript utilizes the values provided by
those fields to some effect.
7. Open the Application tab in xCP Designer
page 197
12. Close and reopen xCP Designer for the new widget to be added to the palette
13. Open the User Interface tab in Designer
page 198
14. Right-click the Vehicle node under Business Object UI and select New Page
16. Right-click the input control for Year and select Delete
page 199
17. Notice the new Slider widget available in the widget palette, under the Custom category at the
bottom
18. Drag-and-drop a new Slider widget onto the page to replace the control you deleted
page 200
Value
ID
year
Label
Year
Minimum Value
1900
Maximum Value
2015
Value
vehicle.year
20. Go to the Data Service Instances blade and select the Update Vehicle service.
21. Notice the binding to the input Year for the data service is blank because we deleted the
widget that it was previously bound to from the page. Add it back to reference the new slider
widget we added. Set the value to widgets.year.value
page 201
We are creating a context menu to give access to the Edit Vehicle page. If we do not create a
context menu, we cannot right-click vehicle objects, and thus cannot easily view the Edit
Vehicle page.
24. Close the context menu page
25. Deploy/run your application
26. Open a policy, right-click one of its vehicles and select Edit Vehicle
27. The vehicles year is now displayed via the slider widget, which can also be used to change its
value (assuming you click the Save button afterward)
page 202
page 203
7.4: Themes
1. Open or extract train.GreenMenuBarTheme-1.0.jar for analysis
JAR files are actually ZIP archives with a specific structure. Thus, you can use any compression
tool such as WinZip or 7-Zip to extract or view the contents of a JAR file.
2. Under the META-INF folder, open the MANIFEST.MF file for viewing/editing
The Theme-Sass-File property value must match the name of the SCSS file contained in the JAR.
page 204
3. At the root of the JAR, open the green-menu-bar.scss file for viewing/editing
The import statements near the top bring in the various variables and mixins which are
necessary for overriding certain styles. For this SCSS, not all of the imports are actually necessary.
The overrides section changes a number of styles related to the toolbar, including background
color (via gradient), font size, and font family.
4. In xCP Designer, open the Application tab
page 205
7. Click the Browse button to select the folder which contains train.GreenMenuBarTheme-1.0.jar
8. Enable the checkbox for GreenMenuBarTheme and click Finish
page 206
12. Deploy/Run your application and verify the stylistic changes to the toolbar
13. Congratulations. You have completed the xCP 2.0 self-paced tutorial.
page 207