Date post: | 16-Oct-2014 |
Category: |
Documents |
Upload: | potiguara-batista-de-oliveira |
View: | 97 times |
Download: | 10 times |
Business Agility! Second Workshop for Product Evaluation
My Second Process
www.bizagi.com
2
Workshop Manual for Product Evaluation
CONFIDENTIAL
Table of Contents
1. WORKSHOP: OFFICE SUPPLY REQUEST............................................. 4
Description of the Process of Office Supply Request ............................................... 4
Scope .................................................................................................................. 4
Step by step process modeling ................................................................................ 5
STEP 1: DEFINING AND MODELING THE PROCESS ............................................... 5
Additional Information ....................................................................................... 5
STEP 2: PROCESS DATA ....................................................................................... 14
STEP 3: FORMS CREATION ................................................................................... 26
ACTIVITY: REGISTER OFFICE SUPPLY REQUEST ............................................ 26
..........................................................................................................................27
ACTIVITY: APPROVE OFFICE SUPPLY REQUEST ............................................. 37
ACTIVITY: QUOTATIONS – REQUEST QUOTATIONS ..................................... 41
EVENT: RECEIVE QUOTATIONS ...................................................................... 43
ACTIVITY: SELECT VENDOR ............................................................................ 49
ACTIVITY: RECEIVE PRODUCTS ...................................................................... 55
ACTIVITY: PROCESS INVOICE .......................................................................... 58
STEP 4-1: BUSINESS RULES ................................................................................. 61
Transition Conditions........................................................................................ 61
Transition: Notify Approval............................................................................... 61
Transition: Notify Rejection .............................................................................. 65
Transition: Notify Change Required .................................................................. 65
Transition: Vendor Ok? Yes .............................................................................. 65
Transition: Vendor Ok? No ............................................................................... 66
STEP 4-2: ACTIVITIES EVENTS ............................................................................. 67
Set Petitioner and Date .................................................................................... 67
www.bizagi.com
3
Workshop Manual for Product Evaluation
CONFIDENTIAL
Set selected vendor .......................................................................................... 68
Set Quotation Request ..................................................................................... 74
STEP 5: PERFORMERS .......................................................................................... 81
ACTIVITY: REGISTER OFFICE SUPPLY REQUEST ............................................ 81
ACTIVITY: APPROVE OFFICE SUPPLY REQUEST ............................................ 82
ACTIVITY: PROCESS INVOICE .......................................................................... 83
STEP 6: INTEGRATE WITH OTHER SERVICES ...................................................... 85
STEP 7: WEB APPLICATION .................................................................................. 93
USERS .............................................................................................................. 93
TESTING THE WEB APPLICATION ................................................................... 93
SENDING THE NOTIFICATIONS (OPTIONAL) .................................................. 93
2. CONCLUSION .................................................................................... 97
www.bizagi.com
4
Workshop Manual for Product Evaluation
CONFIDENTIAL
1. WORKSHOP: OFFICE SUPPLY REQUEST The primary purpose of this exercise is to cover features that were not included in the first workshop, which are more advanced and equally important, such as Collections (1-n relations), tables in forms (grids), creation of a sub processes and creation of Data model from the forms designer among others. The first workshop for product evaluation is a prerequisite for this workshop, since some subjects that were covered in the first workshop will not be explained again.
We’ll implement an Office Supply Request process. The company had excellent results from the implementation of the
Vacation Request Process and they have chosen you to implement this new process.
The information about the process and data to be controlled and visualized can be found in the following pages. Follow
step by step the instructions of this manual and at the end you will have automated the process of Office supply Request.
Description of the Process of Office Supply Request
The process of an Office Supply Request starts when any employee of the organization submits an office supply request.
Once the requirement is registered, the request is received by the immediate supervisor of the employee requesting the
office supplies; the supervisor must approve or ask for a change, or reject the request. If the request is rejected the process
will end. If the request is asked to make a change then it is returned to the petitioner/employee who can review the
comments for the change request. If the request is approved it will go to the purchase department that will be in charge of
making quotations (using a subprocess) and select a vendor. If the vendor is not valid in the system the purchase
department will have to choose a different vendor. After a vendor is selected and confirmed, the system will generate and
send a purchase order and wait for the product to be delivered and the invoice received. In any case the system will send a
notification to let the user know what the result was. In any of the cases, approval, rejection or change required the system
will send the user a notification.
Scope This process focuses in controlling the requests of Office supplies of the organization, from the initial request up to its
delivery.
The quotations process will be defined as a sub process as follows:
www.bizagi.com
5
Workshop Manual for Product Evaluation
CONFIDENTIAL
Step by step process modeling
We will use BizAgi Process Modeler to create the new process model; next, we will export it to the BizAgi BPM suite
following with the steps to complete the application. This new way to make the first step shows the big ability for reuse the
built processes in the free BizAgi modeler and the new feature which export those models directly to the BizAgi Studio in
order to complete de process implementation.
Open the BizAgi Process Modeler from the shortcut in your desktop to start the application.
STEP 1: DEFINING AND MODELING THE PROCESS
This is the first step in the BizAgi implementation, in this step BizAgi Process Modeler gives a complete environment with
shapes and templates to draw the flow diagrams for the process; the available shapes are the Business Process Modeling
Notation (BPMN) shapes. The BPMN standard is used to model any process according with the industry standards.
Additional Information The Enterprise is planning the internal server process organization in the same BizAgi application; the new process should
be created together in the “Vacations Request” BizAgi project. First, we will begin modeling the process in the BizAgi
Process Modeler following with a new power feature which integrates the BizAgi Studio BPM suite with “one click button”.
www.bizagi.com
6
Workshop Manual for Product Evaluation
CONFIDENTIAL
1. BizAgi Process Modeler will show a window which looks like this picture:
2. Write the name of the process in the tab labeled “Diagram 1”: Office Supply Request.
3. In the working area you can start modeling the process diagram. Create new “lanes” to set the functional areas and
rename it according to the process. The diagram should looks like this:
For more information on lanes take a look at the first workshop for product evaluation.
4. Create the Phases until the process looks like the following picture:
www.bizagi.com
7
Workshop Manual for Product Evaluation
CONFIDENTIAL
5. Start diagramming the process until it looks like this:
Warning… All the sequence flows must be properly connected and all the figures must be inside the area
between the phases and lanes and NOT on the limit of a phase or functional area.
6. The “Generate Purchase Order” task will invoke an ERP (web service) that might take some time to answer, for this
reason it will be defined as Asynchronous. The different icon marks it from the others (right click and select type of
task and select service task).
7. We must convert the Notifications activities to Script tasks, in that way we’ll be able to show is not an interface but an
activity which will be executed automatically by the system. Right click on the Activity:
www.bizagi.com
8
Workshop Manual for Product Evaluation
CONFIDENTIAL
For more information on Script tasks visit
http://wiki.bizagi.com/en/index.php?title=Activity:_User_and_Service_Task#Script_Task
Repeat this procedure for the Notify Rejection and Notify Approval Activities.
8. We’ll transform the Products Received Events to Link Events; a Link is a mechanism for connecting two sections of a
Process. Link Events can be used to create looping situations or to avoid long Sequence Flow lines.
For more information on Link Events visit
http://wiki.bizagi.com/en/index.php?title=Message_Signal_and_Link_Events#Link_Intermediate_Event
www.bizagi.com
9
Workshop Manual for Product Evaluation
CONFIDENTIAL
The process will look like this:
9. We need to convert the Quotations activity into a Sub process, right click on the activity and transform it to a Sub
process:
www.bizagi.com
10
Workshop Manual for Product Evaluation
CONFIDENTIAL
10. The process should look like this:
Make right click on the Quotations Sub process figure and select “Edit subprocess” option:
A new tab for drawing another process flow will be displayed in the modeler. You should model the new Quotations
sub process on it.
11. Draw the diagram for the Quotation subprocess. It should look like this in the second tab of the BizAgi Process
Modeler:
www.bizagi.com
11
Workshop Manual for Product Evaluation
CONFIDENTIAL
The “Verify Vendor” activity is an interface. Please take into account setting it like a Service Task using the right click
menu.
12. Now, you can save or export your model to different file formats (.jpg, .pdf, .doc) or to publish in different ways (html,
SharePoint). For complete information about the BizAgi Process Modeler possibilities go to the following link:
http://modelerforum.bizagi.com/modelerforum/
Before the rest of the design please save the process model into .bpm (BizAgi process model) file.
13. Next you will export the new process model to de BizAgi BPM Suite in order to continue building the process
application for the workshop, please return to the “Office Supply Request” Tab, and press the “Validate” button, you
have to get the next message (in the figure) to verify that your model is error free before continue.
14. Press the “RunProcess” button:
Warning… Before you can run the process, BizAgi BPM suite must be installed and there must be at least a project
created .
www.bizagi.com
12
Workshop Manual for Product Evaluation
CONFIDENTIAL
The wizard will be started to export-import the process model in the BPM suite; the steps are showed in the figures
below.
Select the topmost process in the displayed tree to import and press Next.
www.bizagi.com
13
Workshop Manual for Product Evaluation
CONFIDENTIAL
The second step in the wizard shows the name of the process to import. Leave the suggested name (this feature is used
to change the name of the process imported to the BPM suite) and press next, the following screen will be displayed:
Be sure selecting the appropriate project, the same as the Workshop 1, in this case it is BPMProject, press Finish.
Finally the BPM suite will be started and the process model will be opened and ready to work in BizAgi Studio internal
process modeler (step 1 in previous Workshop 1).
15. Now you must adjust some additional features for your process in the process model from BizAgi Studio process
modeler.
1. Open to Edit the “Quotations” sub process and set the functional area to “Purchase Department”
2. Adjust the Phase Name to “Select Vendor”, the sub process will look like this:
www.bizagi.com
14
Workshop Manual for Product Evaluation
CONFIDENTIAL
3. Verify, save and close the sub process and continue setting the properties for service tasks like automatic
asynchronous tasks. Right click on the “Generate Purchase Request” service task and “Verify Vendor” service
task inside Quotations sub process. For both of them configure the properties in the following picture:
4. Save and Check the process on both processes windows; this option allows the verification of the diagram’s
syntax.
5. Some parameters (properties) like duration and help text must be updated in the process activities when the
process diagram is complete. Set those properties in the processes activities as follows in the next table:
Activity Help Text Duration (days)
Register Office Supply Request Register the information of your request 2
Approve Office Supply Request Approve or reject the products requested 3
Receive Products Mark the products as received and enter the Invoice
2
Process Invoice Make the internal process for the invoice to be paid
5
Request Quotations
Generate and print the Quotations to send to the vendor
3
Select vendor Select the vendor. 3
6. When you finish please verify the diagram again, save and close the diagram modeler windows to go back to the
process wizard.
STEP 2: PROCESS DATA
www.bizagi.com
15
Workshop Manual for Product Evaluation
CONFIDENTIAL
Once the Process Diagram has been created we’ll proceed to the Data Model Creation. This Data Model will include all the
information required by the process.
A structured data model will be used to represent the information; it may happen that we don’t know for sure what
attributes we’ll use, for this reason, we’ll create some basic attributes and we’ll add some more attributes later.
1. In the second step on the wizard in BizAgi Studio select Model Data:
2. A window will appear asking for the Process Entity, which will be named according to the process. Click on Ok to
continue.
3. A new window displaying the Process Entity will appear:
www.bizagi.com
16
Workshop Manual for Product Evaluation
CONFIDENTIAL
4. We’ll create the Master Entities that we know we’ll use, such as Product Request, Quotations and Vendor Request. To
add a Master Entity Click on the button located in the Entity Bar, drag and drop the Master, then type the Name for
the Master Entity Product Request:
Repeat the procedure for the Quotations and Vendor Request Entity:
5. Let’s create also the Parameter Entities used, Product Type, Vendor and City. To create the Product Type Entity drag
and drop the button from the Entity Bar and type the Entity Name Product Type:
www.bizagi.com
17
Workshop Manual for Product Evaluation
CONFIDENTIAL
Repeat the procedure for the City and Vendor Entity:
www.bizagi.com
18
Workshop Manual for Product Evaluation
CONFIDENTIAL
You may need to reorganize the Entities to make them look as you wish.
6. Right click on the Office Supply Request and Edit its Attribute List. Include the following attributes:
Display Name Type Length
Invoice Approved Boolean -
Invoice Address String 50
Invoice Number String 20
Invoice File -
Invoice Total Currency -
Request Justification String 100
Request Date Date – Time -
Products Received Boolean -
Receive Order Date Date – Time -
Order Total Currency -
Quotation Request Template -
Purchase Order Number String 20
Date for Delivery Date - Time -
The result must look like this:
www.bizagi.com
19
Workshop Manual for Product Evaluation
CONFIDENTIAL
Click on Finish.
7. Let’s create the attributes related to the Product Request Entity. Edit the Attribute List:
Display Name Type Length
Quantity Integer -
Approved Boolean -
Rejection Comments String 100
Total Price Currency -
Unit Price Currency -
Comments String 100
8. Let’s create the attributes related to the Vendor Request Entity. Edit the Attribute List:
Display Name Type Length
Selected Boolean -
9. Let’s create the attributes related to the Quotations Entity. Edit the Attribute List:
Display Name Type Length
Quotation Total Currency -
Quotation Date Date-Time -
Quotation File -
Selected Boolean -
www.bizagi.com
20
Workshop Manual for Product Evaluation
CONFIDENTIAL
At this point you must have a model like this one:
We’ll create the attributes to represent the relations between the different master entities like this:
From Display Name To Relation Type
OfficeSupplyRequest Product Request ProductRequest Collection (1-n)
OfficeSupplyRequest Quotations Quotations Collection (1-n)
OfficeSupplyRequest Vendor Request Vendor Request Entity (1-1)
A Request can have multiple products associated and can also have multiple quotations associated, that’s the reason for the relation to be a Collection. 10. To create the collection from Office Supply Request to Product Request, edit the Attribute List of the Office Supply
Request Entity and add the Attribute as follows:
www.bizagi.com
21
Workshop Manual for Product Evaluation
CONFIDENTIAL
11. Add a new Attribute and repeat the procedure for the relation between Office Supply Request and Quotations 12. Create a new Attribute type: Entity – Master – Vendor Request for the Vendor Request Relation.
Click on finish to save the changes. 13. We’ll create the relations between Master and Parameter Entities like this:
From Display Name To Relation Type
OfficeSupplyRequest City For Delivery City Entity (1-1)
Product Request Product Type Product Type Entity (1-1)
Vendor* Vendor City City Entity (1-1)
Vendor Request Vendor Vendor Entity (1-1)
Quotations Vendor Vendor Entity (1-1)
*Vendor is a parameter entity but it’s listed in the above table to include its relation with City parameter entity.
www.bizagi.com
22
Workshop Manual for Product Evaluation
CONFIDENTIAL
14. Edit the Attribute List of the Office Supply Request Entity and add a new attribute for the Delivery city like this:
Click on Finish to save. 15. The Parameters entities must have an attribute for the values, lets add attributes according to this tables: Table: Product Type
Display Name Type Length
Product Type String 50
Table: City
Display Name Type Length
City Name String 50
Table: Vendor
Display Name Type Length
Vendor Name String 50
Vendor Address String 100
Vendor Telephone String 20
Vendor Email String 30
www.bizagi.com
23
Workshop Manual for Product Evaluation
CONFIDENTIAL
16. Repeat this procedure for the other entities to create all the relations in the step 13. You may reorganize the entities.
At this point the model must look like this
We may add some values for the Parameter Entities, but it’s possible that we don’t know all these values so far, we’ll add some values for the Product Type and Vendor entity and later we’ll see how add values from other steps in the process. 17. Right click on the Product Type Entity and select Values
18. Add a New Product Type:
www.bizagi.com
24
Workshop Manual for Product Evaluation
CONFIDENTIAL
19. Enter a description for the product type:
You may add some values as follows:
idEntity1 (Auto generated) Name
1 Pen
2 Pencil
3 Notebook
4 Printer Paper
5 Mouse
6 Keyboard
20. Repeat this procedure for the vendor entity.
www.bizagi.com
25
Workshop Manual for Product Evaluation
CONFIDENTIAL
idEntity1 (Auto generated) Vendor Name
1 Vendor 1
2 Vendor 2
3 Vendor 3
4 Vendor 4
You may fill the other columns or leave them blank, but have in mind that the Verify Vendor Service task will not verify the vendor if any of the fields Name, Phone, Address and City is not filled. Make sure you selected a Display Attribute for each one of the parameter Entities http://wiki.bizagi.com/en/index.php?title=Process_Data:_Entities_and_Attributes step 4.
Close the diagram and save the changes made to the model.
www.bizagi.com
26
Workshop Manual for Product Evaluation
CONFIDENTIAL
STEP 3: FORMS CREATION
Once the Process Diagram and the Data Model are ready we’ll proceed to create the forms associated to each one of the
activities of the process.
ACTIVITY: REGISTER OFFICE SUPPLY REQUEST Let us create the form for the first activity of the process, Register Office Supply Request, which must contain the
following information:
1. To create the forms please select the Third Step on the wizard:
2. After selecting the step you’ll see a diagram where only activities and events will be available, select the activity
Register Office supply Request by clicking on it.
The attribute for the petitioner has not been created; we can create it from the forms designer as follows:
www.bizagi.com
27
Workshop Manual for Product Evaluation
CONFIDENTIAL
3. Right click on the Office Supply Request entity in the XPath submenu and select Edit Entity:
4. Click on Next on the properties Window
5. Add a new attribute for the petitioner and Delivery Address as follows:
www.bizagi.com
28
Workshop Manual for Product Evaluation
CONFIDENTIAL
Display Name Type
Petitioner Entity – System - WFUSER
Delivery Address String (Length 50)
Click on finish to save the changes.
6. Drag and drop a Group:
www.bizagi.com
29
Workshop Manual for Product Evaluation
CONFIDENTIAL
7. Double Click on the group name (Group 1) to change it, write Request Information.
8. Repeat step 6 two more times to add the Product Information and Delivery Information Group:
9. Drag and drop the following inside the groups as follows:
Attribute Path Group Visible Required Editable
Request Date Office Supply Request Request Information True False False
Petitioner Office Supply Request –
Petitioner – fullName
Request Information True False False
Request
Justification
Office Supply Request Request Information True True True
Order Total Office Supply Request Request Information True True True
Delivery Address Office Supply Request Delivery Information True True True
Delivery City Office Supply Request Delivery Information True True True
Date for Delivery Office Supply Request Delivery Information True True True
Keep in mind that by default the values for every render in BizAgi are:
Property Default Value
Visible True
Required False
Editable true
www.bizagi.com
30
Workshop Manual for Product Evaluation
CONFIDENTIAL
10. Double click on the fullName field to change it to Petitioner. The result must look as follows:
11. Let’s include the product information. Drag and drop the Product Request Collection in the Office Supply Request
Entity from the Data Binding window region:
12. Drag and drop the attributes from the collection to be shown in the Display form:
Attribute Visible Required Editable
Product Type True False False
www.bizagi.com
31
Workshop Manual for Product Evaluation
CONFIDENTIAL
Quantity True False False
Comments True False False
www.bizagi.com
32
Workshop Manual for Product Evaluation
CONFIDENTIAL
Click on the Product Request Collection, go to the Properties window and click on Edit form and select New Form.
13. A new form tab will appear. Click on it to edit the Edit Form:
www.bizagi.com
33
Workshop Manual for Product Evaluation
CONFIDENTIAL
14. Name the Form as Product Request Edit Form
www.bizagi.com
34
Workshop Manual for Product Evaluation
CONFIDENTIAL
15. Drag and drop the following elements to the form:
Attribute Visible Required Editable
Product Type True True True
Quantity True True True
Comments True True True
The result will look like this:
Close and Save the Form.
16. Click on the Product Request Collection, go to the properties submenu and click on the Add form, select the form you
just created:
www.bizagi.com
35
Workshop Manual for Product Evaluation
CONFIDENTIAL
www.bizagi.com
36
Workshop Manual for Product Evaluation
CONFIDENTIAL
17. At this point we are aware of the need to add some values to the City Entity. Right click on the Delivery City attribute
and select the Edit Values option.
18. Include some information as shown:
Close the window using the X at the right corner. Save and close the form.
www.bizagi.com
37
Workshop Manual for Product Evaluation
CONFIDENTIAL
ACTIVITY: APPROVE OFFICE SUPPLY REQUEST Let us create the form for the second activity of the process, Approve Office Supply Request, which must contain the
following information:
1. After entering into the flow chart area, select the activity Approve Office supply Request, by clicking on it
2. We’ll include the information from the Register Office Supply Request Activity as not editable, use the Copy From
feature (for more information on this feature you may see the first workshop for product evaluation) to copy the
information to the form. Change the editable fields to not editable:
3. Let’s us change the information in the tables for the Product Request, in order to do this, let’s create a new form. Click
on the Product Request Collection (The selection must be appear in light blue):
www.bizagi.com
38
Workshop Manual for Product Evaluation
CONFIDENTIAL
In the properties of the Product Request Collection click on Display Form and select New Form.
4. A new Form will open, Name it as follows, Approve Product Request Display
5. Drag and drop the following elements, remember to change the Editable conditions:
Attribute Visible Editable Required
Product Type True False False
Quantity True False False
Comments True False False
Approved True True False
Rejection Comments True True False
The result should look like this:
www.bizagi.com
39
Workshop Manual for Product Evaluation
CONFIDENTIAL
6. Save and close the form. 7. You’ll be back at the main form for the Approve Office Supply Request form. The form we just created can be reused
also in the edit form; the difference is that for the display form we won’t have the fields editable. Click on the Product Request Collection, in the properties check the option Display Form fields as Read Only.
8. In the Edit Form select the form we just created, leave the Add form blank:
www.bizagi.com
40
Workshop Manual for Product Evaluation
CONFIDENTIAL
9. Click on the Product Request Collection and change the Editable Property to False. This is done to avoid new products by the person who is approving.
10. Save the form and close the form designer.
www.bizagi.com
41
Workshop Manual for Product Evaluation
CONFIDENTIAL
ACTIVITY: QUOTATIONS – REQUEST QUOTATIONS The next step is to create the form for this activity that is part of the subprocess. This activity must contain the
following information:
Notice that this activity could be replaced with an automatic task sending an email directly to the vendor through a
SMTP server. We will do it manually to give the users the option to do the workshop even if they don’t have a SMTP
server. The letter generated in this activity can be sent using an email, via fax or regular mail. You may see the letter
and save it using the Edit Button.
1. Click on the Quotations Subprocess:
A New window for the subprocess will appear.
2. Click on the Request Quotations Activity 3. Include the following information
Attribute Visible Editable Required Group
Request Date True False False Request Information
Petitioner (fullName) True False False Request Information
Delivery Address True False False Delivery Information
Delivery City True False False Delivery Information
Date for Delivery True False False Delivery Information
Quotation Request True True False Quotations Information
The result as follows:
www.bizagi.com
42
Workshop Manual for Product Evaluation
CONFIDENTIAL
Save and close the form.
www.bizagi.com
43
Workshop Manual for Product Evaluation
CONFIDENTIAL
EVENT: RECEIVE QUOTATIONS We’ll define a form for the Receive Quotations Event; this event must include the following information:
1. Click on the Receive Quotations Event
2. Copy the information from the Request Quotations Activity using the copy from functionality.
3. Drag and Drop the Quotations Collection to the Quotations Information group:
www.bizagi.com
44
Workshop Manual for Product Evaluation
CONFIDENTIAL
4. Add the following information to the Quotations Collection Display form:
Attribute Visible Editable Required
Vendor (Vendor Name) True False False
Quotation Date True False False
Quotation Total True False False
Quotation True False False
www.bizagi.com
45
Workshop Manual for Product Evaluation
CONFIDENTIAL
www.bizagi.com
46
Workshop Manual for Product Evaluation
CONFIDENTIAL
Remember to change the Edition Properties. The result as follows:
www.bizagi.com
47
Workshop Manual for Product Evaluation
CONFIDENTIAL
5. Add an Add Form. You may use the information already included in the Display Form. Click on the Quotations Collection and select a new form for the Add form:
6. Name the form Quotations Edit Form
www.bizagi.com
48
Workshop Manual for Product Evaluation
CONFIDENTIAL
7. Include the following information in the form:
Attribute Visible Editable Required
Vendor True True True
Quotation Date True True True
Quotation Total True True True
Quotation True True True
The result as follows:
8. Save and close the Quotations Edit form and you’ll be back at the main Receive Quotations form. 9. Choose the form you just created as edit form:
10. Save and close the Receive Quotations Form.
www.bizagi.com
49
Workshop Manual for Product Evaluation
CONFIDENTIAL
ACTIVITY: SELECT VENDOR The next step is the creation of the form for the Select vendor activity. The idea at this point is to include all the
information on the Receive Quotation Event and add a field for the vendor selection. The form must look like this:
1. Select the Select Vendor Activity by clicking on it 2. Copy the information from the Receive Quotations Event by using the Copy from functionality
www.bizagi.com
50
Workshop Manual for Product Evaluation
CONFIDENTIAL
3. Add the Selected Field to the Display form:
The result as follows:
www.bizagi.com
51
Workshop Manual for Product Evaluation
CONFIDENTIAL
4. Mark the Quotations Collection as Not Editable. It won’t need an Edit or Add form and we’ll be able to make the
selection of the vendor in the main screen:
5. Save the form. Next, we’ll need to create a validation in order to make sure that at least 1 quotation is selected. Click
on the Quotations Collection and select the advanced submenu in the Properties menu. Select Grid Validations:
6. In the new window fill the information as shown:
www.bizagi.com
52
Workshop Manual for Product Evaluation
CONFIDENTIAL
www.bizagi.com
53
Workshop Manual for Product Evaluation
CONFIDENTIAL
www.bizagi.com
54
Workshop Manual for Product Evaluation
CONFIDENTIAL
This error message will appear if the final user tries to select 0 or more than 1 quotation. Click Ok to save the Validation 7. Save and Close the form.
8. Close the Subprocess and you’ll be back at the main process
www.bizagi.com
55
Workshop Manual for Product Evaluation
CONFIDENTIAL
ACTIVITY: RECEIVE PRODUCTS At this point the vendor was selected and a Purchase Order was generated and sent using a web service. Now we’ll need to
define the form for the Receive Products Activity. The form must contain the following information:
1. Select the activity by clicking on it 2. Copy the information from the Register Office Supply Request by using the Copy From functionality 3. Change the Product Request Collection as not editable:
4. Add the Products Received Attribute to the Product Information Group. This field must be required.
www.bizagi.com
56
Workshop Manual for Product Evaluation
CONFIDENTIAL
5. Save the form then add a validation for the Products Received Field.
Click Ok to save the validation. 6. Change all the other fields as not editable. The result as follows:
www.bizagi.com
57
Workshop Manual for Product Evaluation
CONFIDENTIAL
7. Save and close the form.
www.bizagi.com
58
Workshop Manual for Product Evaluation
CONFIDENTIAL
ACTIVITY: PROCESS INVOICE This is the last activity in the process; we’ll process the invoice for the payment here. This activity must contain the following information:
1. Select the Process Invoice activity by clicking on it 2. Include the following information
Attribute Visible Editable Required Group
Request Date True False False Request Information
Petitioner (fullName) True False False Request Information
Delivery Address True False False Delivery Information
Delivery City True False False Delivery Information
Date for Delivery True False False Delivery Information
3. Add two additional groups, Product Information and Vendor Information 4. Add the Product Request Collection to the Product Information group. Change the Editable property of this group to
False. 5. Add the following information to the Product Request Display form:
Attribute Visible Editable Required
Product Type True False False
Quantity True False False
Unit Price True True True
Total Price True True True
www.bizagi.com
59
Workshop Manual for Product Evaluation
CONFIDENTIAL
The result as follows:
6. Include the following information for the Vendor Information
The form will look like this:
Attribute Visible Editable Required
Vendor Request – Vendor -
Vendor Name
True False False
Vendor Request – Vendor -
Vendor Email
True False False
Invoice Address True True True
Invoice Number True True True
Invoice Total True True True
Invoice True True True
Invoice Approved True True True
www.bizagi.com
60
Workshop Manual for Product Evaluation
CONFIDENTIAL
7. Save the form and close it. 8. Close the forms step by clicking on the green arrow and go back to the Process Wizard
www.bizagi.com
61
Workshop Manual for Product Evaluation
CONFIDENTIAL
STEP 4-1: BUSINESS RULES
Once we have defined the forms we must create the business rules that control the process route.
Transition Conditions 1. To create the Business Rules please select the Fourth Step from the wizard and Select Define Expressions:
2. The Rule editor will be open indicating the transitions with no rule associated with a yellow shade
Transition: Notify Approval 1. Click on the transition (the arrow) from the decision to the Notify Approval Script Task. The Boolean Expression
window will open:
2. Click on the Custom XPaths button:
www.bizagi.com
62
Workshop Manual for Product Evaluation
CONFIDENTIAL
3. Click on the Add custom XPath button:
4. Select the Product Request Collection (1) then select the count function (2) and finally add a filter condition (3):
www.bizagi.com
63
Workshop Manual for Product Evaluation
CONFIDENTIAL
5. Compare the Approved attribute to True and click on Set the Filter:
www.bizagi.com
64
Workshop Manual for Product Evaluation
CONFIDENTIAL
6. Click Ok to save the Custom XPath
7. Add a Second Custom XPath selecting the Product Request Collection and select the Count function without any filter
(steps 3 and 4)
8. Click on Ok to save the Custom Xpath:
9. Compare the two custom XPath we created. Drag and drop the values:
10. Click on finish to save the rule
www.bizagi.com
65
Workshop Manual for Product Evaluation
CONFIDENTIAL
Transition: Notify Rejection The process will follow this path when no products have been approved
1. Select the transition (The arrow) from the decision to the Notify Rejection Task. 2. Repeat the steps from 2 to 6 from the Notify Approval Transition. 3. Compare the Custom XPath to 0 (zero).
4. Click on Finish to save the Boolean Expression
Transition: Notify Change Required This path will be followed when the other conditions are not met. For this path we’ll select the “IsElse” rule
1. Select the transition (the arrow) by clicking over it
2. Click on Cancel on the Boolean Expression Window
3. Select the Is Else Rule
4. Click on Ok to save the selection
Transition: Vendor Ok? Yes 1. Click on the Quotations Subprocess. A new window will appear showing the transitions available.
2. Click on the transition Yes (The yellow arrow).
3. The Boolean Expression window will pop up.
4. Drag and drop the Selected Attribute from the vendor request entity for the condition, this attribute will be the result
of the previous web service that will tell us if the vendor selected is ok. The condition must look like this:
www.bizagi.com
66
Workshop Manual for Product Evaluation
CONFIDENTIAL
5. Click on Finish to save the expression and ok to save the Rule in the transition.
Transition: Vendor Ok? No 5. Click on the No transition (the yellow arrow). Click Cancel on the Boolean Expression Editor.
6. Assign the Is Else condition for the transition (For more information you may see the previous workshop of previous
rules).
7. Do not forget to save all the changes and close the process and subprocess rules modeler.
www.bizagi.com
67
Workshop Manual for Product Evaluation
CONFIDENTIAL
STEP 4-2: ACTIVITIES EVENTS
For the First Activity of the process we must create a rule to set the Date of the Request and to save the Case Creator as
the petitioner. Create the rule in the same way we did it for the first workshop
Set Petitioner and Date 1. Go to the step 4 of the Wizard Process, select the Activities Actions (Events) Option
2. Click on the Register Office supply Request Activity
3. Click on the On Enter Option, then click on the to Add an Event: 4. Select the Expression Option 5. Fill the Name, Display Name and Description as follows:
6. Right Click on the Arrow from Begin to End and include a new Assignment. Description: SetPetitionerAndDate 7. Right click on the Petitioner Assignment and Select Properties 8. The Assignments Windows will open, Add a new Assignment Variable 9. In the Add Assignment Window Click on the Combo and Select the Select Attribute Option 10. Select the Petitioner Item from the Data Model and click on Ok 11. Select the Expression Ratio Button and Write Me.Case.Creator.Id, this Expression is a default Expression in BizAgi that
will allow us to take the Creator id. Make sure your have written the expression exactly (case sensitive!) as stated before or else the expression won’t execute appropriately.
12. Click on Ok to Close the Add Assignment Window 13. In the same rule we’ll add a new Assignment for the date, Add a new row, in the first combo select the RequestDate
Attribute: 14. Select the Expression Ratio Button for this assignment and the text DateTime.Now will appear automatically,
indicating the function BizAgi uses to get the Real Date when the Case was created. Click Ok when done. 15. Click Ok to save the Assignments, and Ok to save the rule
www.bizagi.com
68
Workshop Manual for Product Evaluation
CONFIDENTIAL
Set selected vendor After a quotation is selected we’ll have to take that quotation’s vendor and add it directly to the Office Supply Request, so
the web service will be able to check directly the vendor.
1. Click on the Quotations subprocess.
2. Click on the Select Vendor Activity
3. Select the On Exit Option
4. Add an expression
www.bizagi.com
69
Workshop Manual for Product Evaluation
CONFIDENTIAL
5. Name the expression as follow. SetVendor.
6. Add a Variable Declaration by right clicking on the green play button; Type: Object, Name: Vendor. Click on Ok to
Save
7. Add an Assignment function. Description: Set Vendor
8. Double click on the assignment to edit it
9. Click on the icon to add a condition to the assignment.
10. Select an attribute. The attribute must be the vendor variable we just created
www.bizagi.com
70
Workshop Manual for Product Evaluation
CONFIDENTIAL
11. Select the XPath Option and click the XPath Button to edit it.
12. Click on the Quotations Collection
13. Click on the button Add a filter condition.
www.bizagi.com
71
Workshop Manual for Product Evaluation
CONFIDENTIAL
14. Set the Condition:
www.bizagi.com
72
Workshop Manual for Product Evaluation
CONFIDENTIAL
15. Click on the button to save the Filter.
16. Open the Quotations Collection and select the Vendor. Please be aware that the final XPath must be shown as in the
image below:
17. Click on Ok to save the XPath
www.bizagi.com
73
Workshop Manual for Product Evaluation
CONFIDENTIAL
18. Add a second assignment and select the Vendor Request- Vendor Attribute:
Click on Ok to save the selection.
19. Select the Expression Option and write exactly Vendor.getXPath("idVendor")
www.bizagi.com
74
Workshop Manual for Product Evaluation
CONFIDENTIAL
Click Ok on all the windows to save the rule
Set Quotation Request 1. Select the Request Quotations Activity
www.bizagi.com
75
Workshop Manual for Product Evaluation
CONFIDENTIAL
2. Click the On Enter option and select Letter
3. Click on New
www.bizagi.com
76
Workshop Manual for Product Evaluation
CONFIDENTIAL
4. Type the Name Quotation and click Next
5. Select the Quotation Request Attribute and click Next
www.bizagi.com
77
Workshop Manual for Product Evaluation
CONFIDENTIAL
6. Insert the following information:
For the Date start writing “<” and the IntelliSense will help you include the field.
www.bizagi.com
78
Workshop Manual for Product Evaluation
CONFIDENTIAL
7. Include the Product Request table by clicking on the dynamic grid button:
8. Double click on the Grid (Number 2 of the last step)
9. Select the Product Request Collection and click Ok
www.bizagi.com
79
Workshop Manual for Product Evaluation
CONFIDENTIAL
10. Select the form and click Ok. The form must be called as the Edit form we created for the first Activity Product
Request Edit Form (BizAgi adds some “_”). Any of the images from the Entity can be included. :
11. Click Ok in the Add new Dynamic Grid window and Next in the Template wizard.
www.bizagi.com
80
Workshop Manual for Product Evaluation
CONFIDENTIAL
Click on finish. And ok to save the letter event. Do not forget to close the subprocess window (using the upper green
arrow) to go back to the main process
www.bizagi.com
81
Workshop Manual for Product Evaluation
CONFIDENTIAL
STEP 5: PERFORMERS
For this process we’ll use 3 different assignments:
The activities Register Office Supply Request and Receive Product will always be executed by the case creator
The Approval activity will always be executed by the Case Creator’s boss
The activities in the Purchase Department will be always executed by a person with the position Purchase
Department Assistant.
The process to create these performers assignment will be like the one we used in the first workshop, if you need more
information please take a look at the First Workshop for Product Evaluation.
Click on the Step 5 of the Process Wizard and select the Define Performers Option
We’ll find the different activities and we can notice the ones whose performer has not been assigned.
ACTIVITY: REGISTER OFFICE SUPPLY REQUEST 1. Select the Activity by clicking on it
2. Add a Condition
3. Select the User ID as Property for the condition
4. Click on Select Expression, in the new Rule window click Cancel.
5. Select the Case Creator rule:
6. Click on Ok to save the rule selection and Ok to save the condition, it must look like this:
www.bizagi.com
82
Workshop Manual for Product Evaluation
CONFIDENTIAL
7. Click on Ok to finish. Repeat this procedure for the Receive Products Activity.
ACTIVITY: APPROVE OFFICE SUPPLY REQUEST 1. Select the Approve Office Supply Request
2. Add a condition
3. Select the User ID as property for the condition
4. Click on Select Expression, in the new Rule window click Cancel.
5. Select the CurrentAsigneeBoss rule.
www.bizagi.com
83
Workshop Manual for Product Evaluation
CONFIDENTIAL
6. Click on Ok to save the rule selection and Ok to save the condition, it must look like this:
7. Click on Ok to finish
ACTIVITY: PROCESS INVOICE 1. Select Process Invoice Activity
2. Add a condition
3. Select the “Positions” as property for the condition, and select the root node “Organization” in the “Value” combo
box to display the “New” link.
4. Click on New to Add a new position
www.bizagi.com
84
Workshop Manual for Product Evaluation
CONFIDENTIAL
5. Create the position called Purchase Department Assistant
6. Save the Condition and the performer assignment
Repeat this procedure for all the activities in the Quotations Subprocess by selecting the position “Purchase Department
Assistant” we just created from the Value field in the Performer condition dialog
Close the Diagram by clicking the green arrow located on the top right corner of the screen to go back to the Process
Wizard.
www.bizagi.com
85
Workshop Manual for Product Evaluation
CONFIDENTIAL
STEP 6: INTEGRATE WITH OTHER SERVICES
This second workshop includes two interfaces, one to verify the selected vendor information and another that generates the purchase order for the requested products. To verify the vendor all his/her information would be sent and the web service would determine if is OK or not. For the purchase order generation the necessary information is the products in the request, the selected quotation and vendor; this second interface has no return value.
There are two options to implement this step. One option is, if you have an Internet connection available, to use this URL:
http://www.bizagi.com/OfficeSupplyWS/OfficeService.asmx, and no further configuration is needed.
Otherwise, install the web service locally (for more information on installing web services locally please refer to the First Workshop for Product Evaluation). Download and unzipped the file OfficeSupplyWS.zip from:
ftp://ftp.bizagi.com/OfficeSupplyService/
User: bizagiWSUser Password: bizagiWSUser
1. From the Project Wizard select the Sixth Step and click on Define Integration Interfaces.
2. A view of the process would be presented. In this view only the service tasks would be active. First we are going to
configure the Verify Vendor interface that is in the subprocess Quotations.
So click on the Quotations subprocess and here select the Verify Vendor task.
3. The Interface Wizard opens up. First type the URL for the web service.
If an Internet connection exists, type: http://www.bizagi.com/OfficeSupplyWS/OfficeService.asmx
www.bizagi.com
86
Workshop Manual for Product Evaluation
CONFIDENTIAL
If the web service is installed locally: http://localhost/OfficeSupplyWS/OfficeService.asmx
4. Click the Go button to see the available methods. Select the method VerifyVendor and click Next. To understand what the interface receives and returns, type the URL in a browser and you will see this:
When a web service is completely defined like this one, BizAgi is able to show in a table the information that needs to be send and received. So it is easy to mapped data from BizAgi to data in the web service.
www.bizagi.com
87
Workshop Manual for Product Evaluation
CONFIDENTIAL
5. In the second step of the configuration you will see a table corresponding to BizAgi data and another one of the web service data. Map the information in BizAgi in OfficeSupplyRequest – VendorRequest – Vendor with the matching information in the web service. Then click on Next to continue.
www.bizagi.com
88
Workshop Manual for Product Evaluation
CONFIDENTIAL
6. If no error is returned, the value of VENDOR_STATUS from the web service response is going to be saved in the
Selected attribute of OfficeSupplyRequest – VendorRequest in BizAgi. Connect this two elements and click on Next.
7. The last step of the wizard is used to set the Action taken when an uncontrolled error occurs, in the section Error invoking Web Service. Additionally, it is possible to evaluate potential errors returned by the web service. For this case, the web service response message includes an error structure. The error value is the Xpath: IntVerifyVendorResponse/ERROR_MESSAGE/eCode and if this code is different from zero (0) an error occurred in the web service. Then, the way to indicate this to the process is setting it in the Response errors section. Click on Response XPath to check for error value and type the above XPath (IntVerifyVendorResponse/ERROR_MESSAGE/eCode) when finished click Enter.
www.bizagi.com
89
Workshop Manual for Product Evaluation
CONFIDENTIAL
Click on Add error validation. Configure the validation as shown in the picture below. The Error message column can be a constant string or can be also an XPath. For this exercise use the XPath: IntVerifyVendorResponse/ERROR_MESSAGE/eMessage for the error message.
www.bizagi.com
90
Workshop Manual for Product Evaluation
CONFIDENTIAL
Finally click Finish.
Remember that the service task will not validate the vendor if the Name, Address, Telephone and City fields are blank. Therefore, it is advisable to review the Vendor entity values to ensure all these fields are set. 8. When the interface wizard closes, return to the parent process by clicking on the green arrow. Now the Generate
Purchase Order interface will be configured. Click on this task and type the same URL used before, click the Go button and select the method GeneratePurchaseOrder. We can see that the input parameter for this method is a single String value but this really is an XML formatted as a string. The WSDL of this web service does not show the real structure of the expected request, so is necessary to use the wizard’s advanced options. Check for advanced options and then click on Next.
9. In the Input parameters window select the XPath from which the request information will start to be selected. Click on
Select BizAgi XPath to Retrieve data and double click on OfficeSupplyRequest.
www.bizagi.com
91
Workshop Manual for Product Evaluation
CONFIDENTIAL
10. Then select the information that would be sent to the web service. This is done by clicking on Define Schema if XML or complex type is expected. A new window opens showing the data model starting from the XPath we just selected. This schema would be used to extract the data from BizAgi in XML format and send it to the web service. In this window check the PurchaseOrderNumber and all the attributes from ProductRequest and Quotation except those from OfficeSupplyRequest. Then click OK to close the window.
www.bizagi.com
92
Workshop Manual for Product Evaluation
CONFIDENTIAL
11. Once the schema has been generated, it is possible to view it clicking on the View schema link that appears. This is useful to know the structure that would have the extracted information. For this interface it is assumed that it’s the same structure than the web service expects so no additional configuration is needed in this window. To continue, click Next.
12. The web service returns a string value but it will not be saved in the data model. Click Next in the Output parameters
window. Then in the Error handling window select the Action Throw Exception and then click Finish.
www.bizagi.com
93
Workshop Manual for Product Evaluation
CONFIDENTIAL
STEP 7: WEB APPLICATION
Click on the step 7 of the process wizard and select Development
USERS The web application has 3 users, so that the behavior of the assignments can be verified.
The users are the following. Remember you have already created the Boss and Applicant User
If you need more information on User creation please visit our wiki or check the first workshop for product evaluation.
USER PASSWORD DOMAIN IMMEDIATE
BOSS POSITION
Boss Boss domain
Applicant Applicant domain Boss
Purchase Purchase domain
Purchase Department Assistant
TESTING THE WEB APPLICATION In the last workshop we learnt how to test the application. For more information please take a look at our first workshop
for the product evaluation.
SENDING THE NOTIFICATIONS (OPTIONAL) In the first workshop for product evaluation we also learnt how to configure the SMTP server (if you have one) and how to
configure the notifications. If you completed the last workshop you won’t need to re-configure the SMTP server and the
applicant email. If you did not complete the workshop please take a look at it to see how it’s made.
We need to configure the following notifications:
www.bizagi.com
94
Workshop Manual for Product Evaluation
CONFIDENTIAL
Activity: Notify Change Required
www.bizagi.com
95
Workshop Manual for Product Evaluation
CONFIDENTIAL
Activity: Notify Rejection
www.bizagi.com
96
Workshop Manual for Product Evaluation
CONFIDENTIAL
Activity: Notify Approval
www.bizagi.com
97
Workshop Manual for Product Evaluation
CONFIDENTIAL
2. CONCLUSION In this workshop, you learned how to:
Create a collection
Draw a table in a form
Set an automatic event
Make semi advanced rules
Create a template with information
Convert a service task to Asynchronous service task
Use web services with transformation files
Configure a controlled web service message error
Create a sub process
Handle the forms, rules, events and performers associated to a subprocess
Create validations in a grid in a form
Add values to a parameter entity from the form designer
Modify entities from the form designer
Thanks for completing this workshop, for BizAgi has been a pleasure to show you why we are the most agile solution to
automate process.
We hope that your experience with BizAgi has been satisfactory; should you have any question or comment, please feel
free to contact us at:
http://www.bizagi.com/eng/bizagi/contact/contact.aspx
If you need to review the solution of the workshop, you may open BizAgi and the project will be available.
NEXT STEPS
To learn more about BizAgi and BPMN please take our online courses at e-learning.bizagi.
At any moment you may press F1 to get help in BizAgi Studio
Visit our resource center at http://wiki.bizagi.com/en
More advanced users who do not want to use the process wizard may use BizAgi in advanced mode. To see how,
please click here.
To generate a purchase order as a pdf please click here