This guide describes how to use the BUSINESS FIRST installer and to quickly design your first BUSINESS FIRST application QUICK START TUTORIAL Reference: B1ST_QUICKSTART_052_EN QUICK START TUTORIAL Reference: B1ST_QUICKSTART_052_EN © 2012-2014 W4. All rights reserved. The possession of this document gives you a non-transferable, non-exclusive and personal right to use it; no proprietary rights are transferred to you. You may use, copy, reproduce and distribute this document provided: 1. That the above notice of copyright is mentioned on all copies and that this notice appears together with this authorization, 2. That this document is used for informational purposes only and not for sale, 3. That this document is not modified in any way. All product and brand names are the property of their respective owners. The information in this document may be modified without prior notice. 1 A quick introduction to BUSINESS FIRST BUSINESS FIRST is at the junction of BPM and composite applications. The purpose of BUSINESS FIRST is to rapidly design collaborative applications that fit the requirements of users and their business contexts. With BUSINESS FIRST you model, compose, and execute to improve application and business on an ongoing basis. BUSINESS FIRST was designed to promote the best possible collaboration between the business users right from the beginning of the project. Through the use of data models and processes, their business requirements are made available almost instantly, and enhancements are implemented on-the-fly. As a result, BUSINESS FIRST applications are deployed at a fraction of the time and cost of alternative approaches - in days and weeks instead of many months. This agile, scalable approach is based on three BUSINESS FIRST components: Process Composer and Application Composer for designing processes, supporting data, and for composing user interfaces. Business Engine in charge of executing the model designed by Process Composer and Application Composer. This tutorial will guide you through the first steps with both Process Composer and Application Composer for implementing a claim management application that will be run by the Business Engine. Contents A quick introduction to BUSINESS FIRST 4 Step 1 Installing BUSINESS FIRST 10 Running the installer 10 Working with the Quick Start Tutorial material 12 Step 2 Starting to work with the process 16 Overview of the process and the intended application 17 Opening the process in Process Composer 19 Understanding the process 21 Sending the process to the server 26 Saving the process 27 (optional) Have a try at process design! 28 Step 3 Creating actors 30 Starting BUSINESS FIRST Administration 31 Creating the first actor 33 Creating the remaining actors 35 BUSINESS FIRST Quick Start Tutorial 6 Reviewing the list of actors 37 Assigning the roles 38 Step 4 Designing the claim data 42 Configuring the Application Composer project 42 Launching Application Composer 43 Customizing the Claim business data 47 Adding specific parameters 69 Step 5 Implementing database persistence 72 Registering a PostgreSQL server 73 Creating a PostgreSQL database 73 Adding the PostgreSQL driver 74 Generating the database 74 Deploying the application to Extension Bus 76 Step 6 Customizing the default activity forms 78 Previewing the default activity forms 78 Customizing the default Claim_Details form 80 Customizing the default Claim_Sales_Agent form 83 Customizing the other default forms 87 Playing the application 88 Step 7 Implementing external data 92 Discovering a CSV file 92 Importing the introspected list to the project 94 Adding a claim / customer relation 96 7 Contents Playing the application 104 Adding imported attributes 105 Step 8 Adding specific data views 112 Editing the standard customer feedback view 112 Creating a specific view 116 (optional) Adding customer names to certain forms 124 Step 9 Attaching documents 130 Performing an ECM discovery 131 Making the document type available in the model 132 Making attachment names unique 134 Hiding unnecessary attributes 135 Editing a relation 135 Fine-tuning the default attachment form 136 Going further 140 Using collaboration features 140 Deploying the application to a mobile device 142 Appendix A The installer screens in detail 146 BUSINESS FIRST Quick Start Tutorial 8 9 Contents 1 1 Step 1 Installing BUSINESS FIRST In Step 1, you will: Install BUSINESS FIRST on your system via the installer. Get ready for the next steps. In this step you will be given all the details needed to have BUSINESS FIRST installed on your system within minutes. Then you will get ready for the next steps by reviewing the material included with the Quick Start Tutorial, and by setting the appropriate Application Composer preferences. In this step: > 1.1 Running the installer, page 10 > 1.2 Working with the Quick Start Tutorial material, page 12 1.1 Approximate reading time for this step is 3 min Approximate time to complete this step is 6 min Running the installer Reviewing the installer screens only takes a few seconds and installation itself requires approximately 5 minutes. BUSINESS FIRST Quick Start Tutorial 10 The installer screens are pre-filled in such a way that most of the time you can keep the default values and just click Next to move on to the next screen. Before proceeding to installation, we recommend that you review the requirements and the overview below. In this section: > Requirements, page 11 > Overview, page 11 For further information regarding the installer screens: > A Appendix A The installer screens in detail, page 146 Requirements Before you run the BUSINESS FIRST installer, please make sure that your environment meets the following requirements: Operating system: Windows. [Windows 7] if you are planning to install BUSINESS FIRST to the Program Files folder, you should run the installer as an administrator. DBMS: PostgreSQL should not already be installed on your system. Overview Download and install the BUSINESS FIRST installer at: > http://www.myw4.com/BF_easyinstall.aspx The BUSINESS FIRST installer is going to install the following items on your system: Process Engine, together with W4 Extension Bus and BUSINESS FIRST Administration: Core components for process execution and administration. Process Composer and Application Composer: Graphical modeling tools for processes, data, and user interfaces. PostgreSQL: RDBMS system for storing workflow and business data. Apache Tomcat: JSP and servlet container, required for running web applications. BUSINESS FIRST ships with two separate instances of Tomcat, one for the generated applications, and the other one for BUSINESS FIRST Administration. JDK: Java Development Kit, required for application generation. The BUSINESS FIRST installer is going to suggest default values for most of the screens. Most of these default values deal with communication port numbers. Suggested port numbers are as follows: 11 41300: DBMS listening port. Step 1 Installing BUSINESS FIRST 41200, 41201: Tomcat listening and shutdown ports for BUSINESS FIRST Administration. 41400, 41401: Tomcat listening and shutdown ports for BUSINESS FIRST applications. 41100, 41101, 41102, 41104: Process Engine and Extension Bus listening ports. N OTE Keep in mind the three highlighted port numbers as they will be required in subsequent steps. Make sure the suggested port numbers are not already in use. The other suggested values are as follows: Process Engine instance name: w4instance Setup folder: C:\Program Files\W4 BUSINESS FIRST Start menu option: BUSINESS FIRST When setup completes, provided you did not change the corresponding options, both Tomcat and Process Engine will be started automatically. Also, your Windows Start menu will have a new BUSINESS FIRST entry, with the following shortcuts: PostgreSQL Administration (in the Tools folder) Application Composer BUSINESS FIRST Administration Demo-en - The final, ready-to-use application based on this quick start tutorial Process Composer Process Engine 1.2 Working with the Quick Start Tutorial material In this section you will be given all the details that will help you work with the included material and make the most of this Quick Start Tutorial. The W4 BUSINESS FIRST Quick Start Tutorial is shipped with ready-to-use files that have been prepared for you. It is included in the QSTutorial.zip file that can be downloaded at: > http://www.myw4.com/BF_easyinstall.aspx Unzip the QSTutorial.zip file to: C:\Program Files\W4 BUSINESS FIRST BUSINESS FIRST Quick Start Tutorial 12 The set of files includes: > Process model files, page 13 > CSV file, page 13 > Images files, page 13 Process model files Names: claim_bpmn.w4m, claim_draft_bpmn.w4m. Location: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Components\Process Used in: Step 2 / step 10. claim_bpmn.w4m is the model file used as a starting point for this tutorial. claim_draft_bpmn.w4m is a previous version of the claim_bpmn.w4m file. At the end of step 2 we suggest that you complement it to obtain the equivalent of the claim_bpmn.w4m file, as an opportunity for you to practice the modeling skills you will have gained at that point. CSV file Names: List.csv Location: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Elements\Customer Used in: Step 7. This file contains a list of customers that will be linked to the application. Images files Names: feedback.png, feedback2.png, customer.png, customer2.png Location: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Elements\Images Used in: Step 8. Images that will be used to enhance the application look. 13 Step 1 Installing BUSINESS FIRST In step 1 you’ve had the opportunity to experience how easy it is to install a fully operational copy of BUSINESS FIRST with just 7 clicks with the installer. BUSINESS FIRST Quick Start Tutorial 14 15 Step 1 Installing BUSINESS FIRST Contents 2 Step 2 Starting to work with the process In Step 2, we will: Highlight the specifications of our intended application. Take a tour of process design with Process Composer In this step you will review the sample process that you will be using as a starting point, you will get an insight into what your intended application will be, and start working with Process Composer. In this step: > 2.1 Overview of the process and the intended application, page 17 > 2.2 Opening the process in Process Composer, page 19 > 2.3 Understanding the process, page 21 > 2.4 Sending the process to the server, page 26 > 2.5 Saving the process, page 27 > 2.6 (optional) Have a try at process design!, page 28 Approximate reading time for this step is 5 min Approximate time to complete this step is 2 min BUSINESS FIRST Quick Start Tutorial 16 2.1 Overview of the process and the intended application The application you will be developing in this Quick Start Tutorial is dedicated to cutting down the delays in a customer claim management process within a cycle hiring business, from the moment a claim is reported to the moment it is closed. It has been deliberately designed as very straightforward, as an opportunity for you to get a quick insight into BUSINESS FIRST. The sample process that you will be using as a starting point is as follows: Fig 2.1 The process schema for our intended application As represented by the schema, the workcase goes through either 4, or 5 completed. > Customer feedback details, page 18 > Sales representative action, page 18 > Sales manager action, page 18 > Quality check, page 18 > Send response letter, page 19 17 Contents steps before it is Also, when certain steps fail to be completed within a specified time interval, an is triggered. > Alert, page 19 alert task Customer feedback details In the first step, a sales assistant enters the claim details as received from a customer, e.g: Selects the customer from a preexisting list Enters the problem description Only a sales assistant is entitled to perform this step. Therefore only a sales assistant can start a claim workcase. When the step is completed, the workcase is passed on to a sales representative. Sales representative action In the second step, a sales representative reviews the details entered by the sales assistant. They have two options: Either they process the claim themselves, e.g. approve the proposal themselves, or ask manager collaboration. If the sales representative processes the task, the workcase moves on to the last two steps of the workcase. Otherwise the workcase passes on to the sales manager. Sales manager action In this step, the sales manager processes the task that has been passed on to him/her by the sales representative, e.g. they make a final decision. When the sales manager completes the task, the workcase moves on to the last two steps of the workcase. Quality check In this step, the quality manager checks the feedback and the proposal, and adds a satisfaction rate. BUSINESS FIRST Quick Start Tutorial 18 Send response letter This step is processed in parallel with the quality check task. The customer who posted the claim is sent a thank you letter based on the proposal. Alert A one-day alert delay is set for both sales steps. When the delay expires, an alert is triggered to notify the quality manager. A five-day overdue delay is set for overall completion of the workcase. When the delay expires, an alert icon is displayed next to the corresponding claim. Opening the process in Process Composer 2.2 In this section you will start Process Composer and open the process that will be used as a starting point. 0 TO S T A R T P R O C ES S C O M P O S ER 1 Select the shortcut that has been created at installation, e.g. [Windows menu] StartBUSINESS FIRST Process Composer The Process Composer main window is displayed. 0 TO C H EC K T H E C U R R EN T S KI N 1 Select Tools Preferences The preference window is displayed. 2 Check the current value for the Skin preference. Select the BPMN skin if this is not the current value. 3 When prompted to confirm, click OK. 4 Restart Process Composer. 0 TO L O A D T H E P R O C ES S 1 Select File Open File / Project The Open window is displayed. 19 Contents 2 Select the claim_bpmn.w4m file in the QSTutorial folder * then click Open. * e.g. C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Components\Process The claim_bpmn.w4m file has been added to the work area explorer, within the View [claim_bpmn.w4m] tab. You will now send the content of the claim_bpmn.w4m file to the work area window so you can make a few changes. 3 In the View [claim_bpmn.w4m] tab, right-click Claim (rev. 1) in the Procedures folder, then select Send to Work area window The contents of the claim_bpmn.w4m file has been added to the work area window. 4 Click the 5 Expand the Procedures folder, and double-click Work area window tab to display its contents. Claim (rev. 1). The process is displayed in the modeling window: Fig 2.2 The claim process loaded into Process Composer Objects are selected either in the work area window, or in the modeling window, and the corresponding properties are displayed in the lower windows. You can resize windows as you wish. The modeling window is the graphical design area that displays the process schema. The work area window is the tree structure that will contain the process objects: and links in the Procedures folder nodes BUSINESS FIRST Quick Start Tutorial 20 activities and roles in the Activities and Roles folders The work area window will also contain the application that will be generated based on the process, in the Application Composers folder. The toolbar will be used to add objects to the modeling window. 2.3 Understanding the process In this section you will review such concepts as process, variable, node, activity, role, and assignment mode that will help you understand the process. Process A process is an ordered sequence of tasks executed by different people to achieve a common goal. It can be represented graphically. You can change how the process is executed by just making changes to the graph. Variables Variables represent the data manipulated during the process execution. Typically variables will be displayed as fields in the intended application, or exchanged with external applications via connectors. The variables that are implemented in the process are all listed in a Process Composer window named Procedure Variables, which is displayed when the process is selected in the Procedures folder of the work area window: 21 Contents Fig 2.3 Process variables in Process Composer Data can be simple workflow type (String, Date, Integer), ECM document type (not used in this process), or business type, such as the customerFeedback, which is of type claimdata. You will design the claimdata type in a subsequent step. A Process Composer feature known as the Data flow layer is very useful to display a graphical representation of which variables are used in input or output for an activity. To enable this feature, select modeling window. Display data flow layer in the toolbar just above the When the data flow layer is on, just select a variable in the Procedure Variables window to instantly see in the modeling window if it is used in input and/or output for one or more nodes in the process. Input (or In) variables refer to the data that is required for a step to be processed while output (or Out) variables refer to the data that is generated when a step is completed. BUSINESS FIRST Quick Start Tutorial 22 Fig 2.4 The data flow layer in Process Composer As displayed in the data flow layer, the proposal variable is used in both input and output mode for both sales steps, as well as in input mode for the Quality check and Send response letter steps. Basically it means that the data can be edited by both sales representative and the sales manager. However it will be read-only for the quality manager and sales assistant in the last two steps. Steps / Nodes Nodes are the graphical representations of the various steps in the process. Click on one node and see its properties in the related property windows. Nodes are designed by specifying a number of properties such as: 23 Name (will be displayed in the task list at runtime). Contents Associated activity: To specify what fields will be included in the application forms. Assignment: To specify who will perform the corresponding action. Duration: To set alert delays when appropriate. Variable mapping: To get and set the data values. Activities Activities are associated with most of the nodes. They define the actions to be performed for a step and specify the in and out variables. Let us take a look at the Claim_check activity. This activity is associated with the Quality check node/step. Click on the corresponding object in the Activities folder, in the work area window, to view its details. As you can see in the Activity variables window, the associated check form will feature the customerFeedback, proposal, managerCollaboration, and satisfactionRate fields. The customerFeedback field has the In mode as it contains the details typed by the sales assistant and is not modified in this step. The satisfactionRate field is in In / Out mode and will allow the quality manager to rate satisfaction from 1 to 3. These fields, as all the other fields, will be formatted later on during application composition. Roles / Assignment modes When designing an application, you also need to decide who the steps in the application will be assigned to. Not all users can perform a particular task, e.g. only sales assistants can process the claim details. A task is intended for a particular profile. This is what roles are used for. As with variables, a layer feature can be used to display a graphical representation of which assignment modes are used for the various process steps. This layer therefore depicts technical assignments, whereas the lanes reflect functional assignments. To enable this feature, select modeling window. Display assignment layer in the toolbar just above the When the assignment layer is on, icons are displayed next to the nodes to represent the assignment modes in use: BUSINESS FIRST Quick Start Tutorial 24 Fig 2.5 The assignment layer in Process Composer As displayed in the assignment layer, the following assignment modes are used in the claim process: Pool mode for the selected role External assignment* Workcase responsible Follow-up by the last performing actor, in this case the sales assistant who started the workcase N OTE 25 Contents * The external assignment mode we will be using is manager of related to the sales representative. Sending the process to the server 2.4 When a process is completed, it has to be deployed to a Process Engine server. Before you do this you need to start Process Engine and then open a Process Engine connection within Process Composer. RE MI N DER In this document we are assuming that you have installed BUSINESS FIRST via the installer, as described in chapter 1. If you have installed the various components individually, you will need to edit the parameter values given in this section as appropriate. 0 TO O PEN A C O N N EC T I O N T O P R O CE SS E N G IN E 1 Start Process Engine: 2 1.1 Select [Windows menu] Start BUSINESS FIRST 1.2 Check the server state (running or not running): If the state is not running, choose option 5 to start it If the state is running, you do not need to do anything In Process Composer, select File Connection to server Process Engine localhost:41100/w4instance The Connection window is displayed. 3 Set the Password field to: w4adm Fig 2.6 Connecting to Process Engine 4 Click Connection The server view is displayed instead of the work area window. N OTE Error 19104 when attempting to connect? BUSINESS FIRST Quick Start Tutorial 26 1. Make sure you typed the right password (w4adm). 2. Check that Process Engine is still running: Select [Windows menu] Start > BUSINESS FIRST > Process Engine to display the administration console. The server state should be marked as Running / connected. If the server state is marked as not running / disconnected, you should restart Process Engine (option 5 in the administration console). N OTE Use the tabs located under the menu bar to switch between the server view and the work area window. 0 TO DEP L O Y T H E PR O C ESS T O P R O CE SS E N G IN E 1 Display the work area window. 2 Right-click the Claim process in the work area window and select Send to localhost:41100/w4instance N OTE A process needs to be deployed again to Process Engine each time you make changes to it. Saving the process 2.5 Before you get any further it can be a good idea to save the process environment. 0 TO S A V E T H E PR O C ESS 1 Display the work area window. 2 Click Save in the work area title bar. Two windows are displayed in turn, for saving the model and then the workspace, respectively. 3 Save the model as claim_bpmn.w4m, and the workspace as claim_bpmn.w4w. Save the files to the following location: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Components\Process 4 Click Save 5 When prompted to confirm overwriting of the preexisting file, click Yes. N OTE 27 Contents Saving the workspace makes it easier to re-open your process environment subsequently: opening the workspace file loads the process directly in the work area window. 2.6 (optional) Have a try at process design! By now you should be familiar with how to design a process, by assembling and defining steps/nodes along with their flow, activities, roles, and assignment modes. We now suggest that you close the claim process and try working on your own. Have a look at the claim_draft_bpmn.w4m file that is part of the included material. This file is a previous version of our claim process. It needs to be complemented with the quality check step. In step 2 you have become familiar with process design with Process Composer. You’ve been introduced to key process-related concepts. You are now able to open a process in Process Composer, make changes to the process, and deploy it to the Process Engine server. BUSINESS FIRST Quick Start Tutorial 28 29 Contents Contents 3 Step 3 Creating actors In Step 3, you will: Get started with the BUSINESS FIRST administration interface. Create the actors and assign the roles required to play the intended application. In this step you will create the actors and assign the roles required to play the first version of the application right away. N OTE Roles have already been created when the process was uploaded to the server. To fully play our intended application, you will need four actors: As a sales assistant, Sarah will start the claim workcases by specifying the details of the claims received from the customers. Eventually she will also send response letters to the customers. As a sales representative, Emma will review the claim details specified by Sarah, and will either process the claim herself, or pass it on to the sales manager for approval. As the sales manager, Kevin will process only the claims that require his approval. As the quality manager, Clara will be notified that a claim has been issued and processed by the sales department, and will specify a satisfaction rate. To complete this step you will be using the BUSINESS FIRST administration interface: BUSINESS FIRST Administration. You will create the actors and then assign them the appropriate roles. BUSINESS FIRST Quick Start Tutorial 30 In this step: > 3.1 Starting BUSINESS FIRST Administration, page 31 > 3.2 Creating the first actor, page 33 > 3.3 Creating the remaining actors, page 35 > 3.4 Reviewing the list of actors, page 37 > 3.5 Assigning the roles, page 38 Approximate reading time for this step is 2 min Approximate time to complete this step is 4 min Starting BUSINESS FIRST Administration 3.1 You will now start BUSINESS FIRST Administration via the shortcut that was created upon installation. RE MI N DER In this document we are assuming that you have installed BUSINESS FIRST via the installer, as described in chapter 1. If you have installed the various components individually, you will need to edit the parameter values given in this section as appropriate. 0 TO S T A R T B U SI N ESS F I R ST A DM IN ISTR ATIO N 1 Select [Windows menu] Start BUSINESS FIRST BFAdmin The BUSINESS FIRST Administration login form is displayed. CA N ' T SEE T H I S PA G E? Make sure that Tomcat is still running: Check the W4Tomcat service status in the Windows Services. 2 31 Set the following fields: User: w4adm Password: w4adm Server name: localhost Port number: 41102 Contents Fig 3.1 BUSINESS FIRST Administration: Login form 3 Click Validate E RROR M ES S A G E W H EN V A L I DA T IN G ? Make sure that Process Engine is still running. The BUSINESS FIRST Administration user interface is displayed: BUSINESS FIRST Quick Start Tutorial 32 Fig 3.2 BUSINESS FIRST Administration: User interface The left-hand menu gives access to all the BUSINESS FIRST Administration features. Menu options fall down into sections, such as Administration, Coordination, etc. When a menu option is selected, the corresponding configuration form is displayed in the central pane, where the BUSINESS FIRST Administration welcome screen is now displayed. The banner, to the top, specifies the current connection parameters, and includes the Quit button, which you use when you want to log out. Within the context of this Quick Start Tutorial you will only use the Actors and Roles menu options, in the Administration section. Creating the first actor 3.2 You will now create the first actor: Kevin. 33 0 TO C R EA T E T H E F I R S T A C T O R 1 Select Administration Contents Actors The Actors tab is displayed. Note that by default a search area is displayed. You will use this feature later on in this step. 2 Click Create in the tool bar. Fig 3.3 BUSINESS FIRST Administration: Creating an actor (1/2) The Create : Actor form is displayed. 3 Set the following fields: Login: kevin * Password: kevin * First name: Kevin Last name: k Email address: kevin@w4demo.com ** Language: English BUSINESS FIRST Quick Start Tutorial 34 Fig 3.4 BUSINESS FIRST Administration: Creating an actor (2/2) 4 Click Register at the bottom of the form. N OTE 3.3 * Only the login and password are mandatory. ** Specify a valid email address if you intend to receive email notifications when playing the application. Creating the remaining actors You will now create the remaining actors: Sarah Emma Clara Proceed as described in: > 3.2 Creating the first actor, page 33 The details to be specified are as follows: 35 Contents LOGIN PASSWORD FIRST NAME LAST NAME EMAIL ADDRESS sarah sarah Sarah S sarah@w4demo.com clara clara Clara C clara@w4demo.com emma * emma Emma E emma@w4demo.com MANAGER kevin * Some extra steps are required before completing the creation of actor Emma: You will specify Kevin as Emma’s manager. This is because in the process it is specified that when a manager collaboration is required, the task is assigned to the manager of the sales representative who completed the sales agent action step. 0 TO S PEC I F Y A M A N A G ER F O R E M M A 1 After specifying the details for actor Emma in the Identity area, click next to the Manager field in the Organization area. Search an actor... The Search an actor window is displayed. 2 Set the Value field to kevin. Fig 3.5 BUSINESS FIRST Administration: Specifying a manager for an actor (1/2) 3 Click Apply 4 In the Table area, select actor kevin. BUSINESS FIRST Quick Start Tutorial 36 Fig 3.6 BUSINESS FIRST Administration: Specifying a manager for an actor (2/2) 5 Click Validate 6 Back in the Create : Actor form, click Register to complete the creation of actor Emma. Reviewing the list of actors 3.4 As we are reaching the end of this step it can be a good idea to have a look at the newly created actors. 37 0 TO R EV I EW T H E L I S T O F A C T O RS 1 Display the list of actors: 1.1 Select Administration displayed. 1.2 In the Actors tab, keep the default criteria in the search area then click Apply Actors to display the Actors tab if not already 2 By default, 20 actors are displayed in the list. We will increase that number to display all the actors created on the server: Enter 50 in the Max number spin box then click Apply 3 Click the Identifier column header to display the most recently created actors on top of the list: Contents Fig 3.7 BUSINESS FIRST Administration: Reviewing the list of actors Assigning the roles 3.5 You will now perform the first role assignment: You will assign actor Sarah the SalesAssistant role. You will also need to assign a license to the user via the declared role. 0 TO A SSI G N A C T O R S A R A H T H E SAL E SASSISTAN T R O L E 1 In the list of actors, select sarah then click Roles in the tool bar. The role assignment form is displayed. 2 In the Domains area, select global. 3 In the central area, click Apply to display the list of roles. 4 In the list of roles, hold down the CTRL key, select SalesAssistant and declared then click Assign BUSINESS FIRST Quick Start Tutorial 38 Fig 3.8 BUSINESS FIRST Administration: Assigning a role to an actor 5 Click 6 Proceed similarly for the remaining actors: Close ACTOR ROLE emma global SalesRepresentative, declared clara global QualityManager, declared, coordinator kevin global declared N OTE 39 DOMAIN Contents The coordinator role gives the permission to supervise the workcases. When using the evaluation version of BUSINESS FIRST, it is essential to assign the declared role to the actors for them to be able to log on. In step 3 you have become familiar with user and role management with BUSINESS FIRST Administration. You’ve had the opportunity to create the actors and assign them the roles required to play the application. BUSINESS FIRST Quick Start Tutorial 40 41 Contents Contents 4 Step 4 Designing the claim data In Step 4, you will: Get started with application design with Application Composer. Generate the first version of the intended application. In this step you will launch Application Composer to design the Claim business data, and play the automatically generated application. In this step: > 4.1 Configuring the Application Composer project, page 42 > 4.2 Launching Application Composer, page 43 > 4.3 Customizing the Claim business data, page 47 > 4.4 Adding specific parameters, page 69 4.1 Approximate reading time for this step is 8 min Approximate time to complete this step is 10 min Configuring the Application Composer project In this section, you will configure a connection to Application Composer. This will allow you to start Application Composer from within Process Composer. BUSINESS FIRST Quick Start Tutorial 42 0 TO A DD A N A P PL I C A T I O N C O MP O SE R CO N FIG U R ATIO N 1 Go back to Process Composer and make sure that the claim process is opened in the work area window. 2 Right-click the Application Composers folder in the work area window and select Add. The property window displays a configuration form, which you need to complete to start Application Composer from within Process Composer. 3 Change the Name field value to: w4claim 4 Change the Application id field value to: w4claim Your Application Composer property window should now display the following: Fig 4.1 Setting Application Composer properties After adding the Application Composer configuration, it can be a good idea to save it. 0 TO S A V E T H E A P PL I C A T I O N C OM P O SE R CO N FIG U R ATIO N 1 Click Save all in the work area title bar. A window prompts you for the name of the w4l file that is going to be created to save the Application Composer configuration. The w4l file is going to be saved to: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Components\Process 2 4.2 Click Save Launching Application Composer In this section you will start Application Composer from within Process Composer and have Application Composer perform a discovery of the process, and then automatically generate an application based on that process. 43 Contents N OTE During discovery Application Composer analyzes all the process objects to set up an application model with all the related classes. 0 TO L A U N C H A PP L I C A T I O N C O M P O SE R 1 In the Application Composers folder of the work area window, right-click select Launch. w4claim and Application Composer starts and prompts you to select the workspace. Fig 4.2 Selecting the Application Composer workspace at startup 2 Select the workspace directory then, click OK. The Application Composer main window is displayed. 3 Click File New Application The Create an application window is displayed. 4 Set the fields: ID - Enter w4claim Title - Enter Claim management BUSINESS FIRST Quick Start Tutorial 44 45 5 Click Finish. 6 Perform the discovery: 6.1 In the 6.2 In the Discovery view, right-click Contents Persistence folder of the application explorer, double-click and select Discover. Discovery. The Discover a W4 model window is displayed. 6.3 Set the fields in the Definitions area: Name - Enter claim Model procedure prefixes - Enter claim* then click 6.4 Leave the fields as is in the Authentication area. 6.5 Click Validate. to validate. A tree structure with the workflow objects (activities and variables) of the discovered process has been created. Expand Claim rev. 1 to display them. 6.6 Expand claim. BUSINESS FIRST Quick Start Tutorial 46 6.7 Right-click Claim rev. 1 and select Create / update the business model. 6.8 When prompted to confirm, click Yes. Fig 4.3 Application Composer following the discovery of the claim process The Outline view is where all data for the workflow application will be manipulated. A tree structure has been created there. The Process folder displays the classes for the process objects such as Actor, Role, Task, Workcase, along with their related attributes. Also in the Outline view, the Claim management folder and its Workflow folder represents the newly designed Claim process and its related activities, workcase and data. This is the area where you are going to work now: You will first design the claimdata business data and then enhance the look of the various activity forms 7 4.3 Click Save in the work area title bar. Customizing the Claim business data So far the claim business data has no more attributes than an id and a name, which have been auto- assigned to it by Application Composer. 47 Contents To display a preview of the corresponding form, in the Graphical interface folder of the application explorer, double-click Form builder. Then in Outline, select Claimdata in the Workflow subfolder of the Claim management folder. Fig 4.4 The form generated by default In this section you will add some features to the Claim business data so as to obtain the following display in the generated application: Fig 4.5 The intended form To obtain this result you will need to perform the following actions: > Assigning a name to the class, page 48 > Adding a text field, page 50 > Adding a multiple text field, page 53 > Adding a date field, page 53 > Reorganizing the fields in the form, page 55 > Changing field marks, page 57 > Viewing the application, page 60 Assigning a name to the class You will now specify a name for the class so that its label is more user-friendly. 0 TO A SSI G N A N A M E T O T H E C L ASS 1 In Outline, right-click Claimdata and select Edit... BUSINESS FIRST Quick Start Tutorial 48 The Edit : Class : Claimdata window is displayed. 2 Set the Name field to: Customer Feedback 3 In the Attributes area, make changes to the attributes that have been already created by Application Composer: 3.1 Click in the ID column for the second attribute (claimdataName) and change the value to claimdataReference. 3.2 Hit the TAB key. 3.3 Change the value in the Name column for the second attribute to Reference. 3.4 Click Validate at the end of the row. Fig 4.6 Assigning a name to the class (1/2) 4 Click Validate At this point the form preview is as follows: Fig 4.7 Assigning a name to the class (2/2) 49 Contents Adding a text field You will now add the Full Name field to the form. 0 TO A DD T H E F U L L N A M E F I EL D 1 Make sure the 2 Display the palette. Customer Feedback class is selected in Outline. If the palette is not available in the right-hand area ... Fig 4.8 Adding a text field to the form (1/6) ... select Window Show views 3 In the Palette Texts area of the palette, select the Simple text item ... BUSINESS FIRST Quick Start Tutorial 50 Fig 4.9 Adding a text field to the form (2/6) 4 ... then drag and drop it below the Reference field in the graphic representation of the form. N OTE You can drop the component when a horizontal bidirectional arrow is displayed at the intended location. Fig 4.10 Adding a text field to the form (3/6) 5 51 Select the newly added field in the form preview. Contents Fig 4.11 Adding a text field to the form (4/6) 6 In the toolbar of the Properties view, enable the Show unset properties option. If the Properties view is not available in the right-hand area, select Window Show views Properties 7 In the Properties view set the following fields: ID: claimdataCustomer Name: Full Name Number of columns: 50 Fig 4.12 Adding a text field to the form (5/6) At this point the form preview should be as follows: Fig 4.13 Adding a text field to the form (6/6) BUSINESS FIRST Quick Start Tutorial 52 Adding a multiple text field Proceed as described for the Full Name field to add the Description field to the form (select the Multiple text component on the palette) : > Adding a text field, page 50 Select the newly added field in the form preview then in the Properties view set the following fields: ID: claimdataDescription Name: Description Number of rows: 3 Number of columns: 50 At this point the form preview should be as follows: Fig 4.14 Adding a multiple text field to the form Adding a date field You will now add the Date field to the form to represent the date when a customer feedback is received. 53 0 TO A DD T H E DA T E F I EL D 1 In the Contents Dates area of the palette, select the Date item. Fig 4.15 Adding a date field to the form (1/4) 2 Drag and drop it below the Description field in the form preview. Fig 4.16 Adding a date field to the form (2/4) 3 Select the newly added field in the form preview then in the Properties view, and set or review the values for the following fields: ID: claimdataDate Name: Date 4 Right-click the field in the form preview and select Edit. In the Configuration area of the Edit : Date attribute window that is displayed, set or review the values for the following fields: Type: Date Default current date: BUSINESS FIRST Quick Start Tutorial 54 Fig 4.17 Adding a date field to the form (3/4) 5 Click Validate So far the form preview should be as follows: Fig 4.18 Adding a date field to the form (4/4) Reorganizing the fields in the form You will now reorganize some of the components: 55 The date field will be moved next to the reference field. The description input field will be moved below the description label. 0 TO R EO R G A N I ZE T H E F I EL DS I N THE FO R M 1 You will first reduce the size of the Reference field to make some room for the Date field: 1.1 Select the Reference field (the input field, not the label). 1.2 Hover over the right edge of the field. 1.3 When a horizontal bidirectional arrow is displayed, click and hold down the mouse button. 1.4 Move the mouse to the left and release it when the intended size is reached, e.g. 15. Contents Fig 4.19 Reorganizing the fields in the form (1/4) 2 You will now move the date field next to the reference field: 2.1 Click the Date field in the form builder. 2.2 Release the mouse button. 2.3 Click the Date field again and hold down the mouse button. 2.4 Drag the field to the right of the Reference field. 2.5 Drop the field when a bidirectional vertical arrow is displayed to the right of the Reference field. Fig 4.20 Reorganizing the fields in the form (2/4) 3 You will now move the Description input field below its label: 3.1 Click the Description input field in the form builder. 3.2 Release the mouse button. 3.3 Click the Description input field again and hold down the mouse button. 3.4 Drag the description input field below the description label. 3.5 Drop the field when a bidirectional horizontal arrow is displayed below the description label. BUSINESS FIRST Quick Start Tutorial 56 Fig 4.21 Reorganizing the fields in the form (3/4) At this point the form preview should be as follows: Fig 4.22 Reorganizing the fields in the form (4/4) Changing field marks You will now modify field marks. Marks define the behavior for the data in the form. For instance we don’t want the Id to be displayed, and want it to be auto-set by a database. This can be done by just modifying the marks for the Id field. 57 0 TO C H A N G E F I EL D M A R KS 1 The Id field will not be displayed in the forms. Not only will you hide it but you will also have its value set by a database. 1.1 Select the Id field in the form preview. 1.2 In the toolbar of the Properties view, make sure the is on. 1.3 In the Properties view, select Generic marks. 1.4 Clear the create mark (in the GUI area). 1.5 Check the hidden mark (in the GUI area). Contents Show unset properties option 1.6 Check the providerValue mark (in the Persistence area). Fig 4.23 Changing the marks for the Id field N OTE The create mark flags the fields that will be editable in the creation forms. The hidden mark flags the fields that will not be included in the details forms. The providerValue mark flags the fields whose values will be auto-set by a data provider. As you can notice the ID field is no longer displayed in the form preview. 2 We will now set the marks for the Reference, Date, and Full Name fields: 2.1 Hold down the CTRL key then select the Reference, Date, and Full Name attributes in the form preview. 2.2 Clear the set mark (in the GUI area). 2.3 Check the setConsult and main marks (in the GUI area). N OTE The set mark flags the fields that will be editable in the edit forms. The setConsult mark flags the fields whose values are displayed although non editable in edit forms. N OTE The main mark is a shortcut to the table, sort, filter and find marks. The table mark flags the fields that will make up columns in table views. The sort mark flags the fields that will be eligible as sort criteria. The filter mark flags the fields that will be eligible as filter criteria. The find mark flags the fields that will be eligible as search criteria. BUSINESS FIRST Quick Start Tutorial 58 3 Clear the set mark and check the setConsult mark for the Description field. 4 To check the changes made to the marks, select Customer feedback in Outline, then in the Data folder of the application explorer, double-click Fields. The Fields view is displayed. It provides an overview of all the fields in the class along with the corresponding marks: Fig 4.24 Changing field marks Specifying the reference attribute for the customer feedback The Reference field is highly representative of the Customer Feedback class and needs to be displayed whenever we want to reference the class. This is why it has the name mark. However the field also needs to be unique. As the workflow engine generates a unique workcase name for each process instance, it can be a good idea to use this value as the unique reference number for the claim workcases. We will thus specify a formula so that the reference value is calculated at runtime. 0 TO M A KE T H E R EF ER EN C E V A L U E S U N IQ U E 1 Select the Reference field in the form builder. 2 Display the Model area of the Properties view. 3 In the Advanced section, type CTRL+SPACE in the Formula field. This invokes autocompletion. 59 4 Select w4ClaimClaim in the popup list, either via the keyboard, or with the mouse. 5 Insert a dot. 6 Select w4_task_workcase_name in the popup list, either via the keyboard, or with the mouse. Contents Fig 4.25 Typing a formula for the Reference field 7 Insert a dollar ($) sign at the beginning of the formula. The formula should be as follows: $w4claimClaim.w4_task_workcase_name Viewing the application It can be a good idea to save the project and check what the web application looks like at this point. N OTE Application Composer can run web or SWING applications. Running SWING applications is quicker but requires a restart when changing actors. It is a good option when you want to check the changes you made for a screen for instance. Running web applications is slightly longer, although it is easier to switch between actors as no restart is required. It is a good option when it comes to playing a sequence of tasks performed by various actors. 0 TO V I EW T H E A P PL I C A T I O N 1 Click Save in the main tool bar to save the project. 2 Select Run Display web in the main tool bar. A progress bar is displayed while the application is being compiled, then the application’s login form is displayed: BUSINESS FIRST Quick Start Tutorial 60 Fig 4.26 Connecting to the first version of the application (1/2) If you wish to log on to the application later without using Application Composer, the URL is as follows: http://localhost:41400/w4claim/home.htm 3 You will now create a claim workcase and therefore need to log on as a user with the SalesAssistant role: Connect as user Sarah. The application’s main window is displayed: 61 Contents Fig 4.27 Connecting to the first version of the application (2/2) In the left-hand menu, you can: Create a claim workcase Review the task list (the default form that is displayed at login) Search for workcases View sample graphic reports (reports are empty so far as no data has been created) View all the registered customer feedbacks (none so far) 4 You will now create a claim workcase: Click Create The first task of the claim workcase is displayed. BUSINESS FIRST Quick Start Tutorial 62 Fig 4.28 Creating the first workcase This task is associated with the Customer feedback details step. As specified in the process model, it contains the customerFeedback field, which was defined as a claim data type. As you can see, the reference and date are automatically filled in. However the date can be changed via a calendar control. 5 Complete the form. Full name field: At that point the customer name needs to be typed. However in a subsequent step you will have it auto-set by a database. Description field: Remember that you are registering a claim from a customer of your bike hiring company. The claim could concern an incident with a bike, invoicing, the customer being badly attended by an employee, etc... 6 Click Submit to send the form to the next user: Emma. 7 Log on as user Emma: 7.1 Disconnect as user Sarah via the 7.2 Connect as user Emma. Quit button. Now that you are connected as Emma, you notice that you cannot create a claim workcase. This is because Emma does not have the SalesAssistant role, which is the initiator role. 63 Contents Fig 4.29 Reviewing the sales assistant’s task list (1/2) The claim created by user Sarah is available in Emma’s task list. If not, you may have made mistakes in the steps described earlier and/or some of the fields may not be properly named. The 8 Click Offered icon in the # column flags the tasks that have not been opened so far. Search in the left menu. The Search tab is displayed. The drop-down list to the right contains a number of predefined filters. For instance Alive workcases displays the newly created workcases. 9 Select the Alive workcases filter then select the workcase in the list. Fig 4.30 Reviewing the sales assistant’s task list (2/2) BUSINESS FIRST Quick Start Tutorial 64 N OTE 10 When you select a workcase, some action buttons become available in the toolbar above. The standard action is Details. It is also available by double-clicking the workcase. Display the workcase details. The upper part of the window displays the workcase data, i.e. process variables, along with their current value. The lower part includes a number of tabs, such as History, Comments, Attachments, etc. Fig 4.31 Reviewing the workcase history Focus on the workcase history. It specifies that: The first step was performed by Sarah and it is now completed. The second step is offered and assigned to an actor with the sales representative role. Similar information can be obtained via the graphical follow-up. 11 65 Display the graphical follow-up: Select Contents Graphical follow-up in the toolbar. Fig 4.32 Reviewing the graphical follow-up The icon flags a completed step. The icon flags an alive step. 12 Close the graphical follow-up. 13 Close the Details form and go back to the Search tab. The as: Search... button to the top right corner gives access to many useful features, such Performing searches within the displayed list Selecting a sort by mode Selecting the columns to be displayed Saving display preferences or search definitions Also to he right of Search tab are the Filter and Summary items, which lets you apply quick filters to the data currently displayed in that tab. BUSINESS FIRST Quick Start Tutorial 66 Fig 4.33 Filter and Summary items You will have the opportunity to use these features later on. 14 Go back to the My tasks tab to start and process the task that has been assigned to you. N OTE 15 When you select a task, some action buttons become available in the toolbar above. The standard action is Process task. It is also available by double-clicking the task. Select the workcase then click Process task The sales form is displayed. It contains the customer feedback data entered by Sarah (non-editable). Fig 4.34 Task being processed by sales representative 67 Contents 16 Do not make any changes. Just close the task via the Save button. The task list is displayed and the saved icon flags the task in the State column. As you may have noticed, the sales forms need some formatting done. Also, all the data that may be specified in the form fields will be lost, as so far the data is stored to temporary files which are overwritten each time a new deployment takes place. You will thus implement data persistence in the next step. Before that however, you will perform some administrative tasks to delete the current case. You will connect as Clara as she has the coordinator role, which is required to perform this task. 17 Disconnect as user Emma, then connect as user Clara. Connected as Clara, you can notice that a new section, Administration, is available in the left-hand menu. 18 Click Workcases. Notice that the All preference is enabled by default. Obviously so far all preferences give the same results. As with the Search tab, the standard action is Notice two other actions: Cancel. N OTE 19 Details. Delete (not yet available and therefore dimmed), and Cancel terminates the workcase by canceling any current tasks. Delete removes any workcase data from the workflow database. Select the current workcase, then cancel it. When prompted for Cancel selected objects?, click Yes to confirm. Notice now how the State column icon has changed to Also notice that the 20 Click Canceled. Delete action is now available. Delete When prompted to confirm deletion, click Yes. The workcase does not exist anymore in the workflow database and thus is no longer displayed in the list. N OTE Message Error when committing when deleting a workcase: This message is normal at that stage as deleting a workcase involves deleting its embedded business data from the persistence database. However the database has not been created yet. 21 Log out from the application. 22 Close your navigator. 23 Shut down Tomcat. BUSINESS FIRST Quick Start Tutorial 68 Adding specific parameters 4.4 Parameters define specific application features. They have default settings, which can be modified. For example, by default form validation errors are displayed in pop-up windows. However we want them to be displayed in red in the forms. You will thus change the corresponding error parameters. 0 TO A DD S PEC I F I C PA R A M ET ER S 1 Go back to Application Composer then double-click folder of the application explorer. Resources in the Resources The Resources view is displayed. It lists all the available parameters, along with their default values. Click Select resource type in the toolbar. Select Standard resources from the drop-down list. Fig 4.35 Adding specific parameters (1/4) 2 In the Filter text area in the toolbar, start typing LY_FO... The list of displayed resources is updated as you type. 69 Contents Fig 4.36 Adding specific parameters (2/4) 3 When the LY_FORM_SHOW_ALL_ERRORS resource is displayed, select this resource and click Override in the toolbar. Fig 4.37 Adding specific parameters (3/4) The Override window is displayed. 4 Change the Value field to: true. BUSINESS FIRST Quick Start Tutorial 70 Fig 4.38 Adding specific parameters (4/4) 5 Click OK. 6 Proceed similarly to override the LY_FORM_SHOW_ ERRORS_IN_FORM parameter. 7 Select Application resources in the Select resource type list and proceed as described above to override the LY_WEB_TABLE_TRANSLATE_ RELATION_TO_LINK parameter. To pick up the parameter changes you will need to save the project and close Application Composer. In step 4 you have become familiar with application design with Application Composer. You’ve had the opportunity to launch the discovery of a process by Application Composer from Process Composer, and to design application forms by using the form builder. 71 Contents Contents 5 Step 5 Implementing database persistence In Step 5, you will connect the application to a database which will be used to store the business data values manipulated by the application. In this step, you will create a PostgreSQL database and then generate its structure in your Application Composer project. R EM I N DER In this document we are assuming that you have installed BUSINESS FIRST via the installer, as described in chapter 1, and therefore you are using a PostgreSQL server. If you are using another DBMS to complete this step, make changes as appropriate to fit your context. In this document we are assuming that you have installed BUSINESS FIRST via the installer, as described in chapter 1. If you have installed the various components individually, you will need to edit the parameter values given in this section as appropriate In this step: > 5.1 Registering a PostgreSQL server, page 73 > 5.2 Creating a PostgreSQL database, page 73 > 5.3 Adding the PostgreSQL driver, page 74 > 5.4 Generating the database, page 74 > 5.5 Deploying the application to Extension Bus, page 76 Approximate reading time for this step is 2 min Approximate time to complete this step is 10 min BUSINESS FIRST Quick Start Tutorial 72 Registering a PostgreSQL server 5.1 You will now work with the PostgreSQL administration interface to register a PostgreSQL server. 0 TO R EG I ST ER A PO ST G R ESQ L SE R V E R 1 Make sure your Application Composer project is closed. 2 Select the shortcut PostgreSQL that has been created at installation: [Windows menu] Start BUSINESS FIRST Tools Admin PGSQL. 3 In pgAdmin, click Add a connection to a server The New server registration window is displayed. 4 Set the following fields: Name: localhost Host: localhost Port: 41300 Maintenance DB: postgres Username: postgres Password: [empty] 5 Click OK. The localhost (localhost:41300) server has been added to the list of servers. You may need to exit and restart pgAdmin to refresh the list of servers. Creating a PostgreSQL database 5.2 Still in the PostgreSQL administration interface you will now create a PostgreSQL database. 0 TO C R EA T E A P O S T G R ES Q L DATAB ASE 1 In pgAdmin, right-click the localhost (localhost:41300) server then select Connect 2 Expand the localhost:41300 node. 3 Right-click Databases then select New Database... The New Database window is displayed. 73 4 Set the following fields: Name: w4claim Owner: postgres 5 Click OK. Contents Adding the PostgreSQL driver 5.3 You will now add the PostgreSQL driver archive to the list of libraries in use in the Application Composer project. Source file and location: C:\Program Files\W4 BUSINESS FIRST\ProcessEngine\extbus\product\common\lib\postgresql.jar Target location: the lib folder of the claim application, i.e: C:\Users\[...]\W4 BUSINESS FIRST\ApplicationComposer_Workspace\w4claim\w4claim\lib NOTE Make sure you copy the file. Do not just move it. Amend the paths above as appropriate to match your context if required. We now need to add this driver to the list of drivers in use by Application Composer. 0 TO R EF ER EN C E T H E DR I V ER 1 Open the project in Application Composer. 2 In the application explorer, right-click the Claim management (w4claim) project and select Properties. The Properties for w4claim window is displayed. 3 Select Java build path. 4 Select the Libraries tab. 5 Click the Add external JARs button. The JAR selection window is displayed. 5.4 6 Navigate to the location specified above and select the driver. 7 Back to the Properties for w4claim window, click OK. Generating the database You will now generate the database table(s) based on the project data model defined in Application Composer. Workflow objects are persisted in the Process Engine database while business data objects such as the CustomerFeedback claim type data will be stored in this database. NOTE BUSINESS FIRST Quick Start Tutorial 74 0 TO G EN ER A T E T H E DA T A B A SE 1 In the Persistence folder of the application explorer, right-click select New RDBMS data. Data sources then The New : RDBMS data window is displayed. 2 Set the following fields: ID: ClaimDB Driver: PostgreSQL URL: jdbc:postgresql://localhost:41300/w4claim Database name: w4claim User: postgres Fig 5.1 Generating the database (1/3) 3 Click Validate The new ClaimDB data source has been added to the Data sources folder in the application explorer: Fig 5.2 Generating the database (2/3) 4 75 Right-click the new data source and select Action Contents Generate / alter database. The Generate / alter database window is displayed. 5 Select Alter database. Fig 5.3 Generating the database (3/3) 6 Click Validate 7 When prompted for Would you like to proceed?, click Yes. Deploying the application to Extension Bus 5.5 From now on, all the CustomerFeedback data handled in the application will persist in the newly created database. However you need to make the claim data definition available to Process Engine. You thus need to deploy the application to Extension Bus. 0 TO DEP L O Y T H E A P PL I C A T I O N TO E XTE N SIO N B U S 1 Select Publish Deploy application to Extension Bus The message The application was successfully deployed should be displayed. 2 Click OK. 3 Save your project. In step 5 you have connected the application to a database to make sure the business data manipulated in the application will persist. You have also made the new data model available to Process Engine. BUSINESS FIRST Quick Start Tutorial 76 77 Contents Contents 6 Step 6 Customizing the default activity forms In Step 6, you will practice what you have learned as regards application form design to customize some of the default forms generated by Application Composer at process discovery. Application Composer has automatically generated default forms for each activity that was included in the process. In this step you will redesign these default forms for an enhanced user experience. In this step: > 6.1 Previewing the default activity forms, page 78 > 6.2 Customizing the default Claim_Details form, page 80 > 6.3 Customizing the default Claim_Sales_Agent form, page 83 > 6.4 Customizing the other default forms, page 87 > 6.5 Playing the application, page 88 6.1 Approximate reading time for this step is 4 min Approximate time to complete this step is 15 min Previewing the default activity forms First take a look at the activity forms generated by default via the form builder. BUSINESS FIRST Quick Start Tutorial 78 0 TO PR EV I EW T H E DEF A U L T A C TIV ITY FO R M S 1 In Outline, click N OTE Claim (w4claimClaim) in the workflow folder. This class is shared by all the activities in the process. One of the activity forms is displayed in the form builder, e.g. for the details activity: Fig 6.1 Form preview for the alert activity 2 To preview the other activity forms, select the form to be displayed in the drop-down list located at the top of the form builder. Fig 6.2 Selecting an activity for preview in the form builder N OTE 79 Contents To identify the desired form, bear in mind that the name of the form includes the name of the corresponding activity, e.g. w4claimClaimDetailsProcessTask is for the Claim_Details activity. Customizing the default Claim_Details form 6.2 You will now fine-tune the default form for the Claim_Details activity: You will hide some fields, rename some labels, and rearrange the layout of the fields in the form. 0 TO C U S T O M I ZE T H E DEF A U L T CL AIM _DE TAIL S FO R M 1 In Outline, select 2 Display the preview for the w4claimClaimDetailsProcessTask form: Claim (w4claimClaim). Fig 6.3 Customizing the default Claim_Details form (1/7) 3 You will first hide the alert and overdue dates as in practice such fields are not relevant for steps with no duration delay defined on them: 3.1 Hold down the CTRL key then select the Alert date and Overdue date fields. 3.2 In the Properties area in the upper part of the form builder, select the hidden check box. The Alert date and Overdue date fields are no longer displayed: Fig 6.4 Customizing the default Claim_Details form (2/7) BUSINESS FIRST Quick Start Tutorial 80 4 By default in process task forms, business data are displayed in edit mode. However when we want to create the data within the process task form we need it to be displayed in creation mode so that the fields are editable: 4.1 Select the customerFeedback data in the form. 4.2 Select the Create action check box. As you can notice, the customerFeedback fields become editable: Fig 6.5 Customizing the default Claim_Details form (3/7) 5 Filling in the customerFeedback data should be mandatory: 5.1 Select the customerFeedback data in the form. 5.2 Clear the optional checkbox. As you can notice, the customerFeedback label is now displayed in bold, denoting that the field is mandatory: Fig 6.6 Customizing the default Claim_Details form (4/7) 6 You will now change the layout of the customerFeedback data so that the fields are displayed below the label: 6.1 81 Contents Drag the customerFeedback fields below the customerFeedback label until a horizontal bidirectional arrow is displayed. Fig 6.7 Customizing the default Claim_Details form (5/7) 6.2 Release the mouse button. Fig 6.8 Customizing the default Claim_Details form (6/7) 7 You will now change the label for the customerFeedback data: 7.1 Double-click the customerFeedback label in the form. The label becomes editable. 7.2 Change the label to: Customer feedback 7.3 Press ENTER. BUSINESS FIRST Quick Start Tutorial 82 Fig 6.9 Customizing the default Claim_Details form (7/7) Customizing the default Claim_Sales_Agent form 6.3 In this section you will convert a text field to a two-option button, which sales representatives will use to decide whether they process the task themselves, or pass it on to their manager. You will also add a rule to the button so that if sales representatives process the task themselves, the proposal field is mandatory, i.e proposal should be set to optional when manager collaboration is required. Also, to make sure the sales representative checks either of the options, you will make the enumerated field mandatory in the form. Finally you will complete the customization of the fields in the forms. 83 0 TO C O N V ER T T H E M A N A G ER C OL L AB O R ATIO N FIE L D TO AN E N U M E R ATE 1 Display the w4claimClaimSalesAgentProcessTask form in the form builder. Contents Fig 6.10 Converting an attribute type (1/3) N OTE 2 Default field positions may differ in your project. Right-click the Manager collaboration field then select Convert attribute type... The Convert attribute type window is displayed. 3 Select the Enumerated Attribute option button then click Validate. The Modify : Enumerated attribute window is displayed. 4 5 In the Options area, create the first option: 4.1 Change the default ID for the first option to: w4claimClaimManagerCollaborationYes 4.2 Set the Name field to yes 4.3 Set the Short Name field to yes 4.4 Set the Value field to yes 4.5 Click New at the end of the row. Proceed similarly to edit the second option: ID: w4claimClaimManagerCollaborationNo Name: no Short Name: no Value: no BUSINESS FIRST Quick Start Tutorial 84 Fig 6.11 Converting an attribute type (2/3) 6 Click Validate. Fig 6.12 Converting an attribute type (3/3) 0 TO A DD A R U L E T O T H E Y ES O P TIO N 1 Right-click the Manager collaboration field in the form preview then select Edit... The Modify : Enumerated Attribute : Manager Collaboration window is displayed. 2 In the Options area, select the w4claimClaimManagerCollaborationYes row, then select Rules... in the toolbar. The Rules : Option : yes window is displayed. 3 Click New... The New : Rules window is displayed. 4 85 Set the following fields: Contents Target attribute: Proposal (w4claimClaimProposal) Rule trigger: Operation: SET_OPTIONAL Fig 6.13 Adding a rule to an option 5 Click Validate. 6 Back in the Rules : Option : yes window, click Validate. 7 Back in the Modify : Enumerated Attribute : Manager Collaboration window, click Validate. 0 TO M A KE T H E EN U M ER A T ED F IE L D M AN DATO R Y 1 Select the Manager collaboration field in the form preview. 2 Clear the optional check box. 0 TO C O M PL ET E T H E F O R M C U S T O M IZ ATIO N 1 Right-click the Proposal field in the form preview then select 2 The Modify : Text Attribute : Proposal window is displayed. 3 Set the fields: Multiple: Number of rows: 3 Number of columns: 50 4 Move the input area for the Proposal field below its label. 5 Move the Proposal field below the Manager collaboration field. Edit... BUSINESS FIRST Quick Start Tutorial 86 At that point the form preview should be as follows: Fig 6.14 The customized Claim_Sales form 6.4 Customizing the other default forms You will now practice what you have learned in the previous sections to customize the remaining default activity forms. As you may have noticed, your changes are spread across all views, i.e. when you make changes to an attribute for instance, the changes apply to all the forms where it is included. Customize the Claim_Sales_Manager form: Remove the optional mark for the Proposal field. Customize the Claim_SendLetter form: Change the response date field so that the current date is displayed by default, without the hours. This should be a required field. Hide the alert and overdue dates. Customize the Claim_Alert form: Make whatever changes you like. Customize the Claim_Check form: Make whatever changes you like. Suggestion: You may convert Satisfaction rate to an enumerated attribute that displays a radio button with three values, ranging from 1 to 3. 87 Contents Playing the application 6.5 You will now start a claim workcase from scratch in the application and review the changes that you have just made to the Details and Sales steps. 0 TO PL A Y T H E A P PL I C A T I O N 1 Save your project. 2 Run the application with the web viewer. 3 Connect as user Sarah. 4 Create a new workcase. Fig 6.15 Creating a workcase Notice that there are no more alarm/overdue date fields displayed. 5 Complete and submit the form. N OTE 6 At that point you still need to type a value for the customer Full Name field, although in the next step you will act so that it can be selected in a list. Connect as user Emma. You can see that the task is available in her task list (My tasks tab). 7 Double-click the task to process it. BUSINESS FIRST Quick Start Tutorial 88 Fig 6.16 Processing a task (1/3) If Emma chooses to process this task herself (Manager collaboration field set to no), the proposal becomes mandatory (this field is displayed in bold). Fig 6.17 Processing a task (2/3) An error message is returned when you try to submit a form that contains a field that has not been specified. Also the label of the offending field is displayed in red, and the focus is moved to the corresponding input area. 89 Contents Fig 6.18 Processing a task (3/3) The alarm date field shows the deadline for the task to be completed. When it has expired, the sign is displayed next to the task in Emma's task list AND an alert task will be added to the quality manager’s task list. N OTE Should you wish to check that alerts are operational (as specified in the process an alert is triggered when a workcase fails to be completed within a one-day period), leave the task unprocessed for 1 day, or decrease the duration to a few minutes. 8 Set the Manager collaboration field to yes. 9 Enter a suggestion in Proposal field, e.g. 15 % discount. 10 Click Submit. 11 Connect as Kevin. 12 Process the task. As Kevin, modify the proposal to: 10 % discount on next rental, and then submit the form. 13 Log out from the application. 14 Close your navigator. 15 Shut down Tomcat. BUSINESS FIRST Quick Start Tutorial 90 In step 6 you have gone a step further towards all the customizing capabilities available with Application Composer. You’ve had the opportunity to add specific behaviors for at least the first two steps. You have also experienced the iterative approach: You compose, run the application, fine-tune the forms, run again to check your changes, and so on. 91 Contents Contents 7 Step 7 Implementing external data In Step 7, you will connect the application to an external list of customers. To make it easier to fill in the claim details form, it can be a good idea to link the application to a list of existing customers. This list is included in the Quick Start Tutorial material. It is an Excel file whose model and data you are going to import in this step. In this step: > 7.1 Discovering a CSV file, page 92 > 7.2 Importing the introspected list to the project, page 94 > 7.3 Adding a claim / customer relation, page 96 > 7.4 Playing the application, page 104 > 7.5 Adding imported attributes, page 105 7.1 Approximate reading time for this step is 2 min Approximate time to complete this step is 20 min Discovering a CSV file You will now discover the CSV file containing the list of customers. This file is part of the material that is shipped with the Quick Start Tutorial. BUSINESS FIRST Quick Start Tutorial 92 0 TO DI SC O V ER T H E C SV F I L E 1 Back to Application Composer, display the 2 In the Sources area, select Discovery view. CSV File Discovery... The CSV File Discovery window is displayed. 3 In the Identity tab, set the following fields: Project name: Customer File: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\elements\customer\List.csv Column separator: ; 4 In the Database tab, set the following fields: Update database schema: Database: ClaimDB Import data...: 5 Click Validate The results of the Customer discovery is displayed: Fig 7.1 Discovering a CSV file 93 Contents Importing the introspected list to the project 7.2 We will now implement the class created as a result of the file discovery. 0 TO I M P L EM EN T T H E C S V F I L E DISCO V E R Y 1 Right-click the model... Customer discovery then select Create/update the business Fig 7.2 Implementing the CSV file discovery (1/4) 2 When prompted to confirm, click Yes. A new class is displayed in Outline: BUSINESS FIRST Quick Start Tutorial 94 Fig 7.3 Implementing the CSV file discovery (2/4) 3 In Outline, right-click the List class and select Edit. The Edit : Class : List window is displayed. 4 Change the value of the Name field to: Customer List 5 Display the form builder. Fig 7.4 Implementing the CSV file discovery (3/4) 95 Contents 6 The Last name field will be used to represent a customer. Thus we will add the name mark to it: 6.1 Select the Last name field. 6.2 Add the name and main marks. As you can notice, adding the name mark results in disabling the optional mark. N OTE 7 Adding the name mark should result in removing the optional mark. If this is not the case, remove this mark. The Title, First name, Email, and Phone fields will be useful in the forms and tables. Thus we will remove the optional mark and add the main mark for these fields: 7.1 Select the Title, First name, Email, and Phone fields. 7.2 Remove the optional mark. 7.3 Add the main mark. Fig 7.5 Implementing the CSV file discovery (4/4) 7.3 Adding a claim / customer relation You will now add a field to the Customer Feedback form so that the customers can be selected from a drop-down list. You will thus create a new field in the Customer Feedback form. The field will have a relation to the newly created Customer class. BUSINESS FIRST Quick Start Tutorial 96 0 TO A DD T H E C L A I M / C U S T O M ER R E L ATIO N 1 In the 2 In the Claim management (w4claim) view, place the packages side by side. Data folder of the application explorer, double-click on Customer and Diagram. workflow Fig 7.6 Adding the claim / customer relation (1/10) N OTE 97 Use the Layout and Zoom to content features available by right-clicking on the diagram. 3 In the objects. 4 Click on Contents workflow package, click the Association ... Customer feedback class to display its contextual Fig 7.7 Adding the claim / customer relation (2/10) 5 ... hold down the mouse button, and move the mouse cursor to the of the Customer package. Customer List class BUSINESS FIRST Quick Start Tutorial 98 Fig 7.8 Adding the claim / customer relation (3/10) 99 6 Release the mouse button. 7 A new relational attribute has been added to the Contents Customer Feedback class. Fig 7.9 Adding the claim / customer relation (4/10) 8 Select this attribute. 9 In the Properties view, change the value of the Name field to: Customer Fig 7.10 Adding the claim / customer relation (5/10) BUSINESS FIRST Quick Start Tutorial 100 Fig 7.11 Adding the claim / customer relation (6/10) 10 101 You will now customize the field display using the marks: 10.1 Also in the Properties view, display the Generic marks area. 10.2 Check that the Customer attribute is selected in the diagram. 10.3 Add the create and hidden marks. 10.4 So that the field suggests the name of the customer as you type, add the autoCompletion mark. Contents Fig 7.12 Adding the claim / customer relation (7/10) 11 The data model has changed as a result of adding the claim / customer relation. Thus you need to reflect the changes in the persistence database, and also notify Process Engine of the changes by updating the application connector. 11.1 In the application explorer, right-click the ClaimDB data source in the sources sub-folder of the Persistence folder and select Actions Generate/alter database Data The Generate/alter database window is displayed. 11.2 Select Keep and add and check Generate foreign key constraints, as shown below: Fig 7.13 Adding the claim / customer relation (8/10) 12 11.3 Click Validate. 11.4 When prompted to confirm, click Yes. 11.5 Select Publish Deploy application to Extension Bus. You will now act so that the Full Name field value is automatically set with the name of the selected customer. To achieve this you will add a formula that will use the relation path to BUSINESS FIRST Quick Start Tutorial 102 the fields of the Customer List class: 12.1 Select the Full Name field in the Customer Feedback class on the diagram. 12.2 In the Model area of the Properties view and display the unset values. 12.3 In the Formula field (section Advanced), build the following formula using the autocompletion feature: claimdataRelationCustomerList.w4claimCustomerListFirstname + " " + claimdataRelationCustomerList.w4claimCustomerListLastname Fig 7.14 Adding the claim / customer relation (9/10) 103 13 Click Validate. 14 Add the readOnly mark to the Full Name attribute. 15 You will now specify an image to represent the customers and enhance the look of the tree view: 15.1 Select the Customer List class on the diagram. 15.2 In the Properties view, click Model area): 15.3 The Image selector window is displayed: Contents next to the Image field (section User interface in the Fig 7.15 Adding the claim / customer relation (10/10) 15.4 Click Add new images. 15.5 In the Open window that is displayed, select the file: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Elements\Images\customer.png N OTE A set of images is provided as part of the included material. You may of course select images of your own as you wish. Playing the application 7.4 At that point it can be a good idea to restart the application and see how the Full Name field value is now automatically set. 0 TO PER F O R M T H I S S T EP 1 Generate the application using whichever viewer you prefer. 2 Connect as user Sarah. 3 Create a new workcase. You will notice the following changes: A drop-down list is available for you to select the appropriate customer. BUSINESS FIRST Quick Start Tutorial 104 The Full name field is filled in automatically when the customer is selected in the list. It displays a sequence of the two attributes that make up the full name, i.e. First name + Last Name Fig 7.16 The database-fed drop-down list, web viewer 7.5 4 Log out from the application. 5 Close your navigator. 6 Shut down Tomcat. Adding imported attributes You will now display the customer’s email address and phone number in the form. 105 Contents You will do so by using two imported attributes. 0 TO A DD T H E I M P O R T ED A T T R I BU TE S 1 Select the 2 Select Customer Feedback class on the diagram to display its contextual objects. Create an import attribute. Fig 7.17 Adding import attributes (1/9) The Create an import attribute window is displayed. 3 Set the fields: Source relation - Customer (claimdataRelationCustomerList) Target attribute - Phone (w4claimCustomerListPhone) Fig 7.18 Adding import attributes (2/9) 4 Click OK. The attribute has been added to the class on the diagram: BUSINESS FIRST Quick Start Tutorial 106 Fig 7.19 Adding import attributes (3/9) 5 Select this attribute then display the Model area in the Properties view. 6 Set the properties: ID - claimdataImportPhone Name - Phone 7 Add the second imported attribute to the class on the diagram. 8 In the Create an import attribute, set the fields: Source relation - Customer (claimdataRelationCustomerList) Target attribute - Email (w4claimCustomerListEmail) 9 Set the properties for the second import attribute: ID - claimdataImportEmail Name - Email So far the class representation is as follows: 107 Contents Fig 7.20 Adding import attributes (4/9) 10 Display the form builder. So far the preview is as follows: Fig 7.21 Adding import attributes (5/9) N OTE If the form builder does not display the overview of the class, select the Customer Feedback class in Outline. You can see that the imported fields are not displayed on the preview. 11 Select both import attributes on the Claim management view and add the consult mark to them via the Properties view. 12 Display the form builder again. The import fields are now displayed : BUSINESS FIRST Quick Start Tutorial 108 Fig 7.22 Adding import attributes (6/9) 13 Re-organize the form to obtain the following layout: Fig 7.23 Adding import attributes (7/9) N OTE 109 Contents To organize data together select the appropriate items then click the Group icon in the Operations area. Fig 7.24 Adding import attributes (8/9) 14 Save your project. You may now run the application and connect as Sarah to see how selecting a customer now automatically fills in the remaining fields in the group. BUSINESS FIRST Quick Start Tutorial 110 Fig 7.25 Adding import attributes (9/9) In step 7 you’ve had the opportunity to work with a new type of discovery - the file discovery - as well as with new types of attribute - relation attributes and imported attributes. 111 Contents Contents 8 Step 8 Adding specific data views In Step 8, you will enhance the application by adding specific views. As you may have noticed, the application’s left menu provides a view of the feedback data registered in the database. This is a standard view that is generated by default and that is dynamically updated based on mark setting. In this step you will review the default customer feedback view, and then create a new one. Finally you will edit two standard views so that customer names are displayed in them. In this step: > 8.1 Editing the standard customer feedback view, page 112 > 8.2 Creating a specific view, page 116 > 8.3 (optional) Adding customer names to certain forms, page 124 8.1 Approximate reading time for this step is 3 min Approximate time to complete this step is 6 min Editing the standard customer feedback view As a result of setting the main mark earlier, the table view displays the reference, the date, and the customer full name together with the phone and the email (imported attributes from the customer list). BUSINESS FIRST Quick Start Tutorial 112 In the application explorer, the Navigation tree displays the structure of the application’s left menu. Fig 8.1 Application structure in the application explorer The navigation tree reflects the structure of the menu in the real application: 113 Contents Fig 8.2 Application menu Each menu item is defined as an action, and is based upon a template. 0 TO EDI T T H E ST A N DA R D C U ST O M E R FE E DB ACK V IE W 1 Via the application explorer display the 2 In Outline, select Navigation tree. Customer Feedback. BUSINESS FIRST Quick Start Tutorial 114 Review the overview of the action in the navigation tree: Fig 8.3 Editing the standard view (1/2) 3 In the Model area of the Properties view, set the Image field (section User interface) by selecting the file: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Elements\Images\feedback.png The image in front of the title has been updated: Fig 8.4 Editing the standard view (2/2) 115 Contents Creating a specific view 8.2 You will now create a new view: Feedback by customer. What we want to obtain is a tree view displaying all the customers, and for those who submitted feedback, the details they provided. To build this multiple view we are going to use a compound action. 0 TO C R EA T E T H E F EEDB A C K B Y CU STO M E R V IE W 1 Make sure the navigation tree is selected in the application explorer. 2 In Outline, select 3 Click Claim management (w4claimDashboard) Create a compound action... in the toolbar. Fig 8.5 Designing a compound action (1/5) The Create a compound action window is displayed. 4 Set the following fields: ID: FeedbackByCustomer Name: Feedback by Customer Image: C:\Program Files\W4 BUSINESS FIRST\QSTutorial\Elements\Images\feedback2.png 5 Create the first action: 5.1 In the Compound area, click Create an action The Create an action (step 1/2) window is displayed. 5.2 Set the following fields: Action type: tree ID: customerTree Name: Customer Tree BUSINESS FIRST Quick Start Tutorial 116 Fig 8.6 Designing a compound action (2/5) 5.3 Click Next The Create an action (step 2/2) window is displayed. 5.4 Set the following field: Target class: Customer List (w4claimCustomerList) 5.5 Click Validate Back to the Create a compound action window, you can notice that the first action has been created in the right-hand list of the Compound area: Fig 8.7 Designing a compound action (3/5) 6 117 Create the second action: Contents 6.1 In the Create an action (step 1/2) window, set the following fields: Action type: table ID: feedbackTable Name: Feedback Table 6.2 In the Create an action (step 2/2) window, set the following fields: Target class: Customer Feedback (claimdata) Back to the Create a compound action window, you can notice that the second action has been created in the right-hand list of the Compound area: Fig 8.8 Designing a compound action (4/5) Notice that the Context between two views field is set to The first action defines the context, which is exactly what we want. 7 Click Validate. The compound action has been added to the navigation tree: Fig 8.9 Designing a compound action (1/5) 0 TO R EV I EW T H E C O M PO U N D A CTIO N IN THE AP P L ICATIO N 1 Run the application. 2 Connect as Sarah. BUSINESS FIRST Quick Start Tutorial 118 Click the newly added menu Feedback by Customer in the left menu and take a look at the two views that make it up: Fig 8.10 The compound action Selecting the root displays all the feedback details. Selecting a particular customer displays the details of that customer only. 119 0 TO F I N E- T U N E T H E L A Y O U T 1 Go back to Application Composer. You will now fine-tune the layout by organizing the corresponding menu items. 1.1 Display the navigation tree. 1.2 In Outline, select 1.3 In the Model area of the Properties view, click interface section). 1.4 The Create a new string window is displayed. Contents Customer Feedback. next to the Group property (User 1.5 Set the Value field to: Customer Feedback. Fig 8.11 Organizing menu items (1/3) 1.6 Click OK. The actions is now displayed as part of the newly created group: Fig 8.12 Organizing menu items (2/3) 2 Drag and drop the newly created compound action Feedback by customer to the Customer Feedback action group. BUSINESS FIRST Quick Start Tutorial 120 Fig 8.13 Organizing menu items (3/3) The Customer feedback action is now a sub action in the Customer Feedback action group, which also comprises the Feedback by customer compound action: Fig 8.14 Reorganizing the navigation tree 3 121 You have probably noticed that the two views (Customer Tree and Feedback Table) have the same width. We will now reduce the size of the tree view: 3.1 In Outline, select 3.2 Display the View Structure area in the Proprerties view. 3.3 In the Compound action area, change the values for the Sizes spin boxes to: 30% and 70%. Contents Feedback by Customer. Fig 8.15 Adjusting view sizes 4 So far the views are available for all users. You will now restrict access to the Feedback by customer view to the actors with the Quality Manager role: 4.1 In Outline, select 4.2 Display the Specific marks area in the Properties view. 4.3 In the New specific mark area, type ROLE_QualityManager (observe upper case) then click Add. Customer Feedback. The new ROLE_QualityManager mark is displayed in the list. 4.4 Select the ROLE_QualityManager mark. Fig 8.16 Restricting access to a view 0 TO R EV I EW T H E F I N E- T U N ED L AYO U T 1 Save your project. 2 Run the application. 3 Connect as Sarah and review the compound action. BUSINESS FIRST Quick Start Tutorial 122 Fig 8.17 Checking access to the compound view (1/2) You can notice that only the compound action is available. 4 123 Connect as Clara. Contents Fig 8.18 Checking access to the compound view (2/2) N OTE If you want to display the Email and Telephone columns in this view, you need to add the name mark to the corresponding import attributes. Follow the steps as already described for the customization of the claim business data. You can notice that both actions area available. 8.3 5 Log out from the application. 6 Close the application. (optional) Adding customer names to certain forms So far the task list looks like the following: BUSINESS FIRST Quick Start Tutorial 124 Fig 8.19 Task list without customer names It can be a good idea to add the name of the corresponding customer to the task list details, and also to the search forms. 0 TO DI SP L A Y C U ST O M ER N A M E S IN THE TASK L ISTS 1 In the application explorer, double-click My tasks (w4claimWorkItems). Fig 8.20 Displaying customer names in task lists (1/3) The Edit : Action : My tasks window is displayed. 125 Contents 2 In the Parameters tab, change the current value for the Target class field to: Claim (w4claimClaim) Fig 8.21 Displaying customer names in task lists (2/3) 3 Click Validate. 4 Add an import attribute to the Claim class. 4.1 In Outline, select 4.2 In the application explorer, double-click Claim. Fields. The Fields view is displayed. 4.3 In the Create toolbar of the Fields view, select Create an import attribute. The Create an import attribute window is displayed. 4.4 Set the fields: Source relation - Customer feedback (w4claimClaimCustomerFeedback) Target attribute - Full Name (claimdataCustomer) Fig 8.22 Displaying customer names in task lists (3/3) 4.5 Click Validate. The attribute is added to the end of the list in the Fields view. 5 Change the attribute’s default ID and name: 5.1 Select the import attribute in the Fields view. 5.2 In the Model area of the Properties view, change the default values for the following properties to: BUSINESS FIRST Quick Start Tutorial 126 ID - w4claimClaimImportCustomer Name - Customer 6 Remove the setConsult mark from the attribute. 7 Add the WORK_ITEMS specific mark to the attribute. 8 Finally, click Move up as many times as necessary to move the attribute below the w4_task_alarm_or_overdue_detected attribute. 0 TO DI SP L A Y C U ST O M ER N A M E S IN SE AR CH FO R M S 1 In Outline, select 2 In the Fields view, right-click on the w4claimClaimRev1Customer attribute then select Move field to super class... 3 When prompted to confirm, click Yes. 4 In Outline, select 5 Via the Fields and Properties view, add the WORKCASE_ITEMS specific mark to the w4claimClaimRev1Customer attribute. 6 Finally, click Move up as many times as necessary to move the attribute below the w4_workcase_alarm_or_overdue_detected attribute. 0 TO C H EC K T H A T C U S T O M ER N AM E S AR E DISP L AYE D 1 Save your project. 2 Run the application using the web viewer. 3 Connect as user Emma. Claim rev.1 Workcase. As you can see customer names are displayed in the task list. Fig 8.23 Task list with customer names 4 Display the search form. As you can see customer names are displayed in the search form. 127 5 Log out from the application. 6 Close your navigator. 7 Shut down Tomcat. Contents In step 8 you have become familiar with the navigation tree. You’ve had the opportunity to customize standard views and create new ones, and also to specify access rights. BUSINESS FIRST Quick Start Tutorial 128 129 Contents Contents 9 Step 9 Attaching documents In Step 9, you will add a document attachment feature so that users can add documents when they work with the application screens. BUSINESS FIRST offers an embedded document manager (EECM) with such features as versioning, check-in, etc. BUSINESS FIRST also comes with a number of connectors to work with documents both on the process side (creating folders, generating documents, changing attributes, etc), and on the application side (attaching documents, viewing folders, viewing documents, check-in / check-out). Note that you can also implement ECMDoc variables in the process. Such variables are managed as documents. When you use such a variable you connect it to an ECM system and a document type in the same way as you are going to do now for document attachment. In this step: 9.1 Performing an ECM discovery, page 131 > 9.2 Making the document type available in the model, page 132 > 9.3 Making attachment names unique, page 134 > 9.4 Hiding unnecessary attributes, page 135 > 9.5 Editing a relation, page 135 > 9.6 Fine-tuning the default attachment form, page 136 > Approximate reading time for this step is 7 min Approximate time to complete this step is 7 min BUSINESS FIRST Quick Start Tutorial 130 Performing an ECM discovery 9.1 You will first perform a discovery of the available document management systems, also referred to as sources, available in Process Engine. 0 TO PER F O R M T H E EC M DI SC O V E R Y 1 Go back to your Application Composer project. 2 In the Discovery view, right-click ECMs then select Discover... Fig 9.1 ECM discovery (1/2) The ECM discovery window is displayed. 3 Leave the fields unchanged then click Validate. As a result of the discovery, two sub-folders have been added: File-src: the file server eecm-src: the BUSINESS FIRST embedded document manager Fig 9.2 ECM discovery (2/2) These are the default ECM systems that are available in Process Engine. 131 Contents N OTE Depending on which drivers are installed, other sources may be displayed, e.g. Alfresco, Documentum, Archea, FileNet, OpenText. You are going to use the embedded ECM system, as it is available as standard, and offers more features than the file system, e.g. versioning and attribute creation. Making the document type available in the model 9.2 For this step you are going to implement a standard document type together with its default attributes, and you will store the attachments to the root folder. So that the standard document type can be used by the application, it needs to be made available in the application model. 0 TO M A KE T H E DO C U M EN T T Y P E AV AIL AB L E IN THE M O DE L 1 Expand 2 Select document. 3 Select Create / Update the business model... in the Actions tool bar. ECMs, then eecm-src, then root folder. Fig 9.3 Implementing a document type (1/2) 4 When prompted to confirm, click Yes. Check the result in Outline: BUSINESS FIRST Quick Start Tutorial 132 Fig 9.4 Implementing a document type (2/2) 5 Select document ( / ) then change its name via the Properties view to: attachment ( / ) The value within the brackets represents the storage folder, i.e. the root folder. Display the form builder. The attributes that are associated with an attachment are displayed: Fig 9.5 Preview of the default form for document attachment Content: The file to be attached. Name: Internal storage name. Needs to be unique (a time stamp will be used to ensure uniqueness). Type: Internal parameter pointing to the object type. Default value is either document, or folder. Do not change this value. Parent folder path: Internal parameter targeting the storage folder, i.e: / (root folder). Do not change this value. 133 Contents Making attachment names unique 9.3 To avoid having similar attachment names it can be a good idea to use the current date to build the attachment names. 0 TO G ET U N I Q U E A T T A C H M EN T N AM E S 1 Specify a time stamp: 1.1 Display the Fields view. 1.2 Click 1.3 Set the fields as follows: ID: currentDate Name: Current date Type: Date and hours Default current date: 1.4 Click Validate. 1.5 Add the consult mark to the attribute. 1.6 Use the arrow to move this attribute above the Name attribute (with ID: w4claimEcmsEecmsSrcDocumentName) N OTE 2 New : Date attribute... in the tool bar. As Application Composer evaluates the fields according to their order, it is essential that the date should be located before the name, as the date value is required to build the name value. Specify a formula for the Name attribute: 2.1 Select the Name attribute (with ID: w4claimEcmsEcmsSrcDocumentName) 2.2 Click Modify in the toolbar to edit the attribute. Note that the ID has changed to: w4claimEcmsEecmSrcDocument1_w4claimEcmsEecmSrcDocumentName 2.3 N OTE Specify the following formula: currentDate.getTime(); Do not omit the trailing semi-colon. As you can see you can also use some Java scripts in formulas. BUSINESS FIRST Quick Start Tutorial 134 Hiding unnecessary attributes 9.4 You will now hide unnecessary attributes so that only the file selection field is displayed to add the attachment to the workcase. 0 TO H I DE U N N EC ESSA R Y F I EL DS 1 In the form builder, select all the attributes, except for the Content file attribute. 2 Select the hidden check box in the Properties area of the form builder. Editing a relation 9.5 We will now edit the relation between the workcase class and the new document attachment object so that all the attached documents should be stored in EECM, to the root folder specified earlier. 0 TO A DD T H E R EL A T I O N 1 In Outline, select 2 In the Fields view, double-click the Attachments attribute (w4_workcase_attachment). Workcase. The Modify : Relation Attribute : Attachments window is displayed. 3 Set the Target class field to: attachment (/) (w4claimEcmsEecmSrcDocument1) Fig 9.6 Editing a relation 4 Click Validate. You may now review the changes in the application. 135 0 TO R EV I EW T H E C H A N G ES 1 Run the application and connect as Sarah. 2 Select an item in the task list. Contents 3 Click Add attachment... The Add attachment window is displayed. 4 Click New... in the toolbar. The New : Attachment window is displayed. 5 Click Browse... and select a file located on your file system. Fig 9.7 The default document attachment form in the application 6 Click Validate. The attachment is now listed in the Add attachment window. N OTE To open or download the attachment, just double-click on it. Click Details to view all the document attributes. Fine-tuning the default attachment form 9.6 To enhance the layout of the attachment list and make it easier to identify each file, it can be a good idea to display who attached the document, and when. 0 TO F I N E- T U N E T H E DEF A U L T DO CU M E N T ATTACHM E N T FO R M 1 Back to Application Composer, select in the Model area. 2 In the Fields view, double-click the Creator attribute. Attachment (/) (w4claimEcmsEecmSrcDocument1) BUSINESS FIRST Quick Start Tutorial 136 3 If prompted for Would you like to create the corresponding typed field and associate it to the current class?, click Yes. The Modify : Typed field attribute : Creator window is displayed. 4 Do not make any changes. Click Validate The attribute is now displayed against a white background. 5 Select the Creator attribute. 6 Via the Properties view, add the main mark to the attribute. RE ME M B ER The main mark is a shortcut to a set of four marks that include the table mark. The table mark flags the fields that make up columns in table views. As the document attachment window is a table view, it will now display the Creator field. 7 Proceed similarly to add the main mark to the Creation date attribute. You may now review the changes in the application. 0 TO R EV I EW T H E C H A N G ES 1 Save your project. 2 Run the application again as Sarah. 3 Select an item in the task list. 4 Click Add attachment... The Add attachment window is displayed. Notice that two new columns are displayed: Creation date and Creator. Fig 9.8 The customized document attachment form 5 137 Back in the work list, click Contents Details to display all the workcase information. 6 Open the Attachments tab. You get the document list with the same table layout. N OTE The approach is similar for comments. Comments are attached via the corresponding button in the toolbar and the list of comments is displayed via the Comments tab in the workcase details. The approach is similar for document variables. You will need to edit the relation associated with the document variable. In step 9 you have performed an ECM discovery, implemented a document type in the application model, and fine-tuned the default document attachment form. BUSINESS FIRST Quick Start Tutorial 138 139 Contents Contents 10 Going further Running an application in web mode (jQuery) give you access to collaboration features. In this chapter we will review these features. Finally we will deploy the Claim application to a mobile device so that nomad users such as Emma, the sales representative, can process their tasks at any time and wherever they are, away on a business meeting or on the road, while enjoying the user-friendly experience of their mobile device, smartphone or tablet. In this section: > 10.1 Using collaboration features, page 140 > 10.2 Deploying the application to a mobile device, page 142 10.1 Using collaboration features Application Composer has a web viewer based on the jQuery framework and the jQuery UI library. jQuery applications offer many benefits such as the native support for collaboration features. jQuery applications require Google Chrome version 12 or higher, Mozilla Firefox version 4 or higher, or Microsoft Internet Explorer version 9 or higher. BUSINESS FIRST Quick Start Tutorial 140 0 TO R U N T H E A P PL I C A T I O N I N J Q U E R Y AN D U SE CO L L AB O R ATIO N FE ATU R E S 1 In Application Composer, select Run Display web in the main tool bar. A progress bar is displayed while the application is being compiled, then the application login form is displayed. 2 Connect to the application as you did in the previous steps. To access the collaboration features you need to display the active sessions. 3 Click Active sessions in the banner toolbar. The Active sessions area is displayed: Fig 10.1 Viewing active sessions Via the Active sessions area and its toolbar you can interact with other connected users, by sending messages, files or objects, by sharing your session, or discussing with them: 141 Contents Fig 10.2 Overview of the collaboration features These features are fully described in the Application Composer user guide. 10.2 Deploying the application to a mobile device When an application is generated via the web viewer (jQuery) in Application Composer, it can be deployed to Android and Apple mobile devices. Mobile applications have the same features as viewed through a web browser. In this section you will deploy the Claim application to a mobile device. Prerequisites are as follows: Android: Minimum Android OS version required: 2.1 Eclair. Apple: Minimum iOS version required: 5.0. BUSINESS FIRST Quick Start Tutorial 142 Compatible Apple devices: iPhone 3GS, iPhone 4, iPhone 4S, iPod touch (3rd generation), iPod touch (4th generation) and iPad. 0 TO DEP L O Y T H E A P PL I C A T I O N TO A M O B IL E DE V ICE 1 To deploy to mobile, you need to install the W4 Player application, available from both Google Play (Android) and Apple Store (Apple). 2 In W4 Player, select Add an application. 3 Set the following fields: Name - The application name that will be displayed in W4 Player, e.g. Claim management URL - The URL to the host server, e.g: server.company.com Port - 41400 Application - claim/home.htm 4 Validate. 5 Connect to the application. Fig 10.3 Logging on to the Claim mobile application 6 Connect to the application as you did in the previous steps. The same features are available in mobile as in the your web browser: 143 Contents Fig 10.4 Overview of the Claim mobile application For further information on how to deploy to mobile, please refer to the Application Composer user guide. BUSINESS FIRST Quick Start Tutorial 144 145 Contents A Appendix A The installer screens in detail A This appendix describes the installation steps in details. 0 TO I N ST A L L B U SI N ESS F I R ST 1 Start the BUSINESS FIRST installer. 2 Select the desired language then click OK. The welcome screen is displayed. We recommend that you close any active applications before you proceed. 3 Click Next. The License agreement screen is displayed. You should agree to the terms of the license agreement before proceeding to installation. 4 Accept the license terms then click Next. The Configuration PostgreSQL / Tomcat screen is displayed. The installer is going to open communication ports for PostgreSQL and Apache Tomcat. Make sure the default port numbers are not already in use and change default values as needed. N OTE You may for instance use the netstat -a command to display the list of open ports on your system. The required communication ports are as follows : [PostgreSQL] listening port. Default value: 41300. [TomcatBFAdmin] Http port. Default value: 41200. Tomcat listening port for BUSINESS FIRST Administration requests. BUSINESS FIRST Quick Start Tutorial 146 [TomcatBFAdmin] Shutdown port. Default value: 41201. Tomcat shutdown port for BUSINESS FIRST Administration requests. [TomcatApp] Http listening port. Default value: 41400. Tomcat listening port for Application Composer requests. [TomcatApp] Shutdown port. Default value: 41401. Tomcat shutdown port for Application Composer requests. 5 Review the suggested port numbers then click Next. The Process Engine configuration (1/2) screen is displayed. The installer is going to open communication ports for Process Engine and W4 Extension Bus. Make sure the default port numbers are not already in use and change default values as needed. The required communication ports are as follows: [Engine] Listening port. Default value: 41100. Process Engine listening port for client application requests. [ExtBus] Connector listening port. Default value: 41101. W4 Extension Bus listening port for Process Engine requests. [ExtBus] RMI listening port. Default value: 41102. W4 Extension Bus listening port for Java client API requests. [ExtBus] Listening TCP. Default value: 41104. W4 Extension Bus listening port for for.NET client API requests. 6 Review the suggested port numbers then click Next. The Process Engine configuration (2/2) screen is displayed. The installer suggests a default value for the Process Engine instance name. Change the default name as needed. 7 Review the default instance name then click Next. The Target folder screen is displayed. The installer suggests a default location for installing BUSINESS FIRST (C:\Program Files\W4 BUSINESS FIRST). RE ME M B ER On Windows 7, you should run the installer as an administrator if you are planning to install Business First to the Program Files folder. 8 Review the default location then click Next. The Select start menu folder screen is displayed. The installer is going to create a BUSINESS FIRST folder for you in the Start menu. 147 Appendix A The installer screens in detail 9 Review or change the default value then click Next. The Ready to install screen is displayed. You may go back to any previous screens to either review, or change values. When setup is complete shortcuts will be available in that folder for starting Application Composer, BUSINESS FIRST Administration, Process Composer, Process Engine, admin PGSQL, as well as for uninstalling BUSINESS FIRST. 10 Click Install. When setup is complete, the Completing the BUSINESS FIRST setup wizard screen is displayed. 11 Click Finish. BUSINESS FIRST Quick Start Tutorial 148 149 Appendix A The installer screens in detail Illustrations The process schema for our intended application 17 The claim process loaded into Process Composer 20 Process variables in Process Composer 22 The data flow layer in Process Composer 23 The assignment layer in Process Composer 25 Connecting to Process Engine 26 BUSINESS FIRST Administration: Login form 32 BUSINESS FIRST Administration: User interface 33 BUSINESS FIRST Administration: Creating an actor (1/2) 34 BUSINESS FIRST Administration: Creating an actor (2/2) 35 BUSINESS FIRST Administration: Specifying a manager for an actor (1/2) 36 BUSINESS FIRST Administration: Specifying a manager for an actor (2/2) 37 BUSINESS FIRST Administration: Reviewing the list of actors 38 BUSINESS FIRST Administration: Assigning a role to an actor 39 Setting Application Composer properties 43 Selecting the Application Composer workspace at startup 44 Application Composer following the discovery of the claim process 47 The form generated by default 48 The intended form 48 Assigning a name to the class (1/2) 49 Assigning a name to the class (2/2) 49 Adding a text field to the form (1/6) 50 Adding a text field to the form (2/6) 51 Adding a text field to the form (3/6) 51 Business First Quick Start Tutorial 150 Adding a text field to the form (4/6) 52 Adding a text field to the form (5/6) 52 Adding a text field to the form (6/6) 52 Adding a multiple text field to the form 53 Adding a date field to the form (1/4) 54 Adding a date field to the form (2/4) 54 Adding a date field to the form (3/4) 55 Adding a date field to the form (4/4) 55 Reorganizing the fields in the form (1/4) 56 Reorganizing the fields in the form (2/4) 56 Reorganizing the fields in the form (3/4) 57 Reorganizing the fields in the form (4/4) 57 Changing the marks for the Id field 58 Changing field marks 59 Typing a formula for the Reference field 60 Connecting to the first version of the application (1/2) 61 Connecting to the first version of the application (2/2) 62 Creating the first workcase 63 Reviewing the sales assistant’s task list (1/2) 64 Reviewing the sales assistant’s task list (2/2) 64 Reviewing the workcase history 65 Reviewing the graphical follow-up 66 Filter and Summary items 67 Task being processed by sales representative 67 Adding specific parameters (1/4) 69 Adding specific parameters (2/4) 70 Adding specific parameters (3/4) 70 Adding specific parameters (4/4) 71 Generating the database (1/3) 75 Generating the database (2/3) 75 Generating the database (3/3) 76 Form preview for the alert activity 79 Selecting an activity for preview in the form builder 79 Customizing the default Claim_Details form (1/7) 80 Customizing the default Claim_Details form (2/7) 80 151 Illustrations Customizing the default Claim_Details form (3/7) 81 Customizing the default Claim_Details form (4/7) 81 Customizing the default Claim_Details form (5/7) 82 Customizing the default Claim_Details form (6/7) 82 Customizing the default Claim_Details form (7/7) 83 Converting an attribute type (1/3) 84 Converting an attribute type (2/3) 85 Converting an attribute type (3/3) 85 Adding a rule to an option 86 The customized Claim_Sales form 87 Creating a workcase 88 Processing a task (1/3) 89 Processing a task (2/3) 89 Processing a task (3/3) 90 Discovering a CSV file 93 Implementing the CSV file discovery (1/4) 94 Implementing the CSV file discovery (2/4) 95 Implementing the CSV file discovery (3/4) 95 Implementing the CSV file discovery (4/4) 96 Adding the claim / customer relation (1/10) 97 Adding the claim / customer relation (2/10) 98 Adding the claim / customer relation (3/10) 99 Adding the claim / customer relation (4/10) 100 Adding the claim / customer relation (5/10) 100 Adding the claim / customer relation (6/10) 101 Adding the claim / customer relation (7/10) 102 Adding the claim / customer relation (8/10) 102 Adding the claim / customer relation (9/10) 103 Adding the claim / customer relation (10/10) 104 The database-fed drop-down list, web viewer 105 Adding import attributes (1/9) 106 Adding import attributes (2/9) 106 Adding import attributes (3/9) 107 Adding import attributes (4/9) 108 Adding import attributes (5/9) 108 Business First Quick Start Tutorial 152 Adding import attributes (6/9) 109 Adding import attributes (7/9) 109 Adding import attributes (8/9) 110 Adding import attributes (9/9) 111 Application structure in the application explorer 113 Application menu 114 Editing the standard view (1/2) 115 Editing the standard view (2/2) 115 Designing a compound action (1/5) 116 Designing a compound action (2/5) 117 Designing a compound action (3/5) 117 Designing a compound action (4/5) 118 Designing a compound action (1/5) 118 The compound action 119 Organizing menu items (1/3) 120 Organizing menu items (2/3) 120 Organizing menu items (3/3) 121 Reorganizing the navigation tree 121 Adjusting view sizes 122 Restricting access to a view 122 Checking access to the compound view (1/2) 123 Checking access to the compound view (2/2) 124 Task list without customer names 125 Displaying customer names in task lists (1/3) 125 Displaying customer names in task lists (2/3) 126 Displaying customer names in task lists (3/3) 126 Task list with customer names 127 ECM discovery (1/2) 131 ECM discovery (2/2) 131 Implementing a document type (1/2) 132 Implementing a document type (2/2) 133 Preview of the default form for document attachment 133 Editing a relation 135 The default document attachment form in the application 136 The customized document attachment form 137 153 Illustrations Viewing active sessions 141 Overview of the collaboration features 142 Logging on to the Claim mobile application 143 Overview of the Claim mobile application 144 Business First Quick Start Tutorial 154 155 Illustrations Index A Activities 24 Actor, create 33 Actors, view list 37 Apache Tomcat 11 Application Composer configuration, Process Composer 42 Application Composer configuration, save 43 Application Composer, launch 43 Application, deploy to Extension Bus 76 Assignment layer 24 Assignment modes 24 B BUSINESS FIRST Administration 31 BUSINESS FIRST Administration, start 31 BUSINESS FIRST installer 11 C Collaboration features 140 Coordinator role 39 create mark 58 D Data flow layer 22 Business First Tutorial 156 Database, generate 74 Declared role 39 Discovery 43, 44, 92 F filter mark 58 find mark 58 G Graphical follow-up 65 H hidden mark 58 J JDK 11 jQuery 140 L LY_FORM_SHOW_ ERRORS_IN_FORM 71 LY_FORM_SHOW_ALL_ERRORS 70 LY_WEB_TABLE_TRANSLATE_ RELATION_TO_LINK 71 M Marks 57 Mobile application 142 Modelling window 20 N Nodes 23 157 Index P PostgreSQL 11 PostgreSQL database, create 73 PostgreSQL driver, add 74 PostgreSQL server, register 73 Procedure, deploy to Process Engine 27 Process 21 Process Composer, start 19 Process, open 19 Process, save 27 Process, send to the Process Engine server 26 providerValue 58 Q Quick Start Tutorial material 12 R Role, assign to actor 38 Roles 24 S set mark 58 setConsult mark 58 Setup requirements 11 sort mark 58 Specific parameters 69 Steps 23 SWING applications 60 T table mark 58 V Variables 21 Business First Tutorial 158 W Web applications 60 Work area window 20 Workspace, save 27 159 Index QUICK START TUTORIAL Reference: B1ST_QUICKSTART_052_EN