You are on page 1of 97

Business Agility!

Second Workshop for Product Evaluation My Second Process

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

Workshop Manual for Product Evaluation

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. Well 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

CONFIDENTIAL

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

Workshop Manual for Product Evaluation

1.

BizAgi Process Modeler will show a window which looks like this picture:

2. 3.

Write the name of the process in the tab labeled Diagram 1: Office Supply Request. 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

CONFIDENTIAL

Workshop Manual for Product Evaluation

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 well 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

CONFIDENTIAL

Workshop Manual for Product Evaluation

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. Well 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

CONFIDENTIAL

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

10

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

11

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

12

Workshop Manual for Product Evaluation

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. 2. Open to Edit the Quotations sub process and set the functional area to Purchase Department Adjust the Phase Name to Select Vendor, the sub process will look like this:

www.bizagi.com

CONFIDENTIAL

13

Workshop Manual for Product Evaluation

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 diagrams syntax. 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
Register Office Supply Request Approve Office Supply Request Receive Products Process Invoice Request Quotations

5.

Help Text
Register the information of your request Approve or reject the products requested Mark the products as received and enter the Invoice Make the internal process for the invoice to be paid Generate and print the Quotations to send to the vendor Select the vendor.

Duration (days)
2 3 2 5 3

Select vendor

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

CONFIDENTIAL

14

Workshop Manual for Product Evaluation

Once the Process Diagram has been created well 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 dont know for sure what attributes well use, for this reason, well create some basic attributes and well add some more attributes later. 1. 2. In the second step on the wizard in BizAgi Studio select Model Data: A window will appear asking for the Process Entity, which will be named according to the process. Click on Ok to continue. A new window displaying the Process Entity will appear:

3.

www.bizagi.com

CONFIDENTIAL

15

Workshop Manual for Product Evaluation

4. Well create the Master Entities that we know well 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.

Lets 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

CONFIDENTIAL

16

Workshop Manual for Product Evaluation

Repeat the procedure for the City and Vendor Entity:

www.bizagi.com

CONFIDENTIAL

17

Workshop Manual for Product Evaluation

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 Invoice Approved Invoice Address Invoice Number Invoice Invoice Total Request Justification Request Date Products Received Receive Order Date Order Total Quotation Request Purchase Order Number Date for Delivery The result must look like this:

Type Boolean String String File Currency String Date Time Boolean Date Time Currency Template String Date - Time

Length 50 20 100 20 -

www.bizagi.com

CONFIDENTIAL

18

Workshop Manual for Product Evaluation

Click on Finish. 7. Lets create the attributes related to the Product Request Entity. Edit the Attribute List: Display Name Quantity Approved Rejection Comments Total Price Unit Price Comments Integer Boolean String Currency Currency String Type Length 100 100

8. Lets create the attributes related to the Vendor Request Entity. Edit the Attribute List: Display Name Selected Boolean Type Length

9. Lets create the attributes related to the Quotations Entity. Edit the Attribute List: Display Name Quotation Total Quotation Date Quotation Selected www.bizagi.com Type Currency Date-Time File Boolean Length

CONFIDENTIAL

19

Workshop Manual for Product Evaluation

At this point you must have a model like this one:

Well create the attributes to represent the relations between the different master entities like this: From OfficeSupplyRequest OfficeSupplyRequest OfficeSupplyRequest Display Name Product Request Quotations Vendor Request To ProductRequest Quotations Vendor Request Relation Type Collection (1-n) Collection (1-n) Entity (1-1)

A Request can have multiple products associated and can also have multiple quotations associated, thats 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

CONFIDENTIAL

20

Workshop Manual for Product Evaluation

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. Well create the relations between Master and Parameter Entities like this: From OfficeSupplyRequest Product Request Vendor* Display Name City For Delivery Product Type Vendor City To City Product Type City Relation Type Entity (1-1) Entity (1-1) Entity (1-1)

Vendor Request Vendor Vendor Entity (1-1) Quotations Vendor Vendor Entity (1-1) *Vendor is a parameter entity but its listed in the above table to include its relation with City parameter entity.

www.bizagi.com

CONFIDENTIAL

21

Workshop Manual for Product Evaluation

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 Product Type Table: City Display Name City Name Table: Vendor Display Name Vendor Name Vendor Address Vendor Telephone Vendor Email String String String String Type Length 50 100 20 30 String Type 50 Length String Type 50 Length

www.bizagi.com

CONFIDENTIAL

22

Workshop Manual for Product Evaluation

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 its possible that we dont know all these values so far, well add some values for the Product Type and Vendor entity and later well 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

CONFIDENTIAL

23

Workshop Manual for Product Evaluation

19. Enter a description for the product type:

You may add some values as follows: idEntity1 (Auto generated) 1 2 3 4 5 6 20. Repeat this procedure for the vendor entity. Name Pen Pencil Notebook Printer Paper Mouse Keyboard

www.bizagi.com

CONFIDENTIAL

24

Workshop Manual for Product Evaluation

idEntity1 (Auto generated) 1 2 3 4

Vendor Name Vendor 1 Vendor 2 Vendor 3 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

CONFIDENTIAL

25

Workshop Manual for Product Evaluation

STEP 3: FORMS CREATION


Once the Process Diagram and the Data Model are ready well 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. 2.

To create the forms please select the Third Step on the wizard: After selecting the step youll 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

CONFIDENTIAL

26

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

27

Workshop Manual for Product Evaluation

Display Name Petitioner Delivery Address

Type Entity System - WFUSER String (Length 50)

Click on finish to save the changes. 6. Drag and drop a Group:

www.bizagi.com

CONFIDENTIAL

28

Workshop Manual for Product Evaluation

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 Request Date Petitioner Request Justification Order Total Delivery Address Delivery City Date for Delivery Path Office Supply Request Office Supply Request Petitioner fullName Office Supply Request Office Supply Request Office Supply Request Office Supply Request Office Supply Request Group Request Information Request Information Request Information Request Information Delivery Information Delivery Information Delivery Information Visible True True True True True True True Required False False True True True True True Editable False False True True True True True

Keep in mind that by default the values for every render in BizAgi are: Property Visible Required Editable Default Value True False true

www.bizagi.com

CONFIDENTIAL

29

Workshop Manual for Product Evaluation

10. Double click on the fullName field to change it to Petitioner. The result must look as follows:

11. Lets 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 Product Type

Visible True

Required False

Editable False

www.bizagi.com

CONFIDENTIAL

30

Workshop Manual for Product Evaluation

Quantity Comments

True True

False False

False False

www.bizagi.com

CONFIDENTIAL

31

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

32

Workshop Manual for Product Evaluation

14. Name the Form as Product Request Edit Form

www.bizagi.com

CONFIDENTIAL

33

Workshop Manual for Product Evaluation

15. Drag and drop the following elements to the form: Attribute Product Type Quantity Comments Visible True True True Required True True True Editable 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

CONFIDENTIAL

34

Workshop Manual for Product Evaluation

www.bizagi.com

CONFIDENTIAL

35

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

36

Workshop Manual for Product Evaluation

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. 2.

After entering into the flow chart area, select the activity Approve Office supply Request, by clicking on it Well 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.

Lets us change the information in the tables for the Product Request, in order to do this, lets create a new form. Click on the Product Request Collection (The selection must be appear in light blue):

www.bizagi.com

CONFIDENTIAL

37

Workshop Manual for Product Evaluation

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 Product Type Quantity Comments Approved Rejection Comments Visible True True True True True Editable False False False True True Required False False False False False

The result should look like this:

www.bizagi.com

CONFIDENTIAL

38

Workshop Manual for Product Evaluation

6. Save and close the form. 7. Youll 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 wont 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

CONFIDENTIAL

39

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

40

Workshop Manual for Product Evaluation

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 dont 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. 3. Click on the Request Quotations Activity Include the following information Attribute Request Date Petitioner (fullName) Delivery Address Delivery City Date for Delivery Quotation Request The result as follows: Visible True True True True True True Editable False False False False False True Required False False False False False False Group Request Information Request Information Delivery Information Delivery Information Delivery Information Quotations Information

www.bizagi.com

CONFIDENTIAL

41

Workshop Manual for Product Evaluation

Save and close the form.

www.bizagi.com

CONFIDENTIAL

42

Workshop Manual for Product Evaluation

EVENT: RECEIVE QUOTATIONS


Well define a form for the Receive Quotations Event; this event must include the following information:

1. 2. 3.

Click on the Receive Quotations Event Copy the information from the Request Quotations Activity using the copy from functionality. Drag and Drop the Quotations Collection to the Quotations Information group:

www.bizagi.com

CONFIDENTIAL

43

Workshop Manual for Product Evaluation

4. Add the following information to the Quotations Collection Display form: Attribute Vendor (Vendor Name) Quotation Date Quotation Total Quotation True True True True Visible False False False False Editable Required False False False False

www.bizagi.com

CONFIDENTIAL

44

Workshop Manual for Product Evaluation

www.bizagi.com

CONFIDENTIAL

45

Workshop Manual for Product Evaluation

Remember to change the Edition Properties. The result as follows:

www.bizagi.com

CONFIDENTIAL

46

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

47

Workshop Manual for Product Evaluation

7.

Include the following information in the form: Attribute Vendor Quotation Date Quotation Total Quotation True True True True Visible True True True True Editable True True True True Required

The result as follows:

8. Save and close the Quotations Edit form and youll 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

CONFIDENTIAL

48

Workshop Manual for Product Evaluation

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. 2.

Select the Select Vendor Activity by clicking on it Copy the information from the Receive Quotations Event by using the Copy from functionality

www.bizagi.com

CONFIDENTIAL

49

Workshop Manual for Product Evaluation

3.

Add the Selected Field to the Display form:

The result as follows:

www.bizagi.com

CONFIDENTIAL

50

Workshop Manual for Product Evaluation

4. Mark the Quotations Collection as Not Editable. It wont need an Edit or Add form and well be able to make the selection of the vendor in the main screen:

5.

Save the form. Next, well 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

CONFIDENTIAL

51

Workshop Manual for Product Evaluation

www.bizagi.com

CONFIDENTIAL

52

Workshop Manual for Product Evaluation

www.bizagi.com

CONFIDENTIAL

53

Workshop Manual for Product Evaluation

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 youll be back at the main process

www.bizagi.com

CONFIDENTIAL

54

Workshop Manual for Product Evaluation

ACTIVITY: RECEIVE PRODUCTS


At this point the vendor was selected and a Purchase Order was generated and sent using a web service. Now well need to define the form for the Receive Products Activity. The form must contain the following information:

1. 2. 3.

Select the activity by clicking on it Copy the information from the Register Office Supply Request by using the Copy From functionality 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

CONFIDENTIAL

55

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

56

Workshop Manual for Product Evaluation

7.

Save and close the form.

www.bizagi.com

CONFIDENTIAL

57

Workshop Manual for Product Evaluation

ACTIVITY: PROCESS INVOICE


This is the last activity in the process; well process the invoice for the payment here. This activity must contain the following information:

1. 2.

Select the Process Invoice activity by clicking on it Include the following information Attribute Request Date Petitioner (fullName) Delivery Address Delivery City Date for Delivery Visible True True True True True Editable False False False False False False False False False False Required Group Request Information Request Information Delivery Information Delivery Information 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 Product Type Quantity Unit Price Total Price True True True True Visible False False True True Editable Required False False True True

www.bizagi.com

CONFIDENTIAL

58

Workshop Manual for Product Evaluation

The result as follows:

6. Include the following information for the Vendor Information Attribute Vendor Request Vendor Vendor Name Vendor Request Vendor Vendor Email Invoice Address Invoice Number Invoice Total Invoice Invoice Approved The form will look like this: True True True True True True True Visible False False True True True True True Editable Required False False True True True True True

www.bizagi.com

CONFIDENTIAL

59

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

60

Workshop Manual for Product Evaluation

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. 2. To create the Business Rules please select the Fourth Step from the wizard and Select Define Expressions: 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

CONFIDENTIAL

61

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

62

Workshop Manual for Product Evaluation

5.

Compare the Approved attribute to True and click on Set the Filter:

www.bizagi.com

CONFIDENTIAL

63

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

64

Workshop Manual for Product Evaluation

Transition: Notify Rejection


The process will follow this path when no products have been approved 1. 2. 3. Select the transition (The arrow) from the decision to the Notify Rejection Task. Repeat the steps from 2 to 6 from the Notify Approval Transition. 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 well select the IsElse rule 1. 2. 3. 4. Select the transition (the arrow) by clicking over it Click on Cancel on the Boolean Expression Window Select the Is Else Rule Click on Ok to save the selection

Transition: Vendor Ok? Yes


1. 2. 3. 4. Click on the Quotations Subprocess. A new window will appear showing the transitions available. Click on the transition Yes (The yellow arrow). The Boolean Expression window will pop up. 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

CONFIDENTIAL

65

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

66

Workshop Manual for Product Evaluation

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. 2. Go to the step 4 of the Wizard Process, select the Activities Actions (Events) Option 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. 7. 8. 9. 10. 11.

12. 13. 14. 15.

Right Click on the Arrow from Begin to End and include a new Assignment. Description: SetPetitionerAndDate Right click on the Petitioner Assignment and Select Properties The Assignments Windows will open, Add a new Assignment Variable In the Add Assignment Window Click on the Combo and Select the Select Attribute Option Select the Petitioner Item from the Data Model and click on Ok 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 wont execute appropriately. Click on Ok to Close the Add Assignment Window In the same rule well add a new Assignment for the date, Add a new row, in the first combo select the RequestDate Attribute: 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. Click Ok to save the Assignments, and Ok to save the rule

www.bizagi.com

CONFIDENTIAL

67

Workshop Manual for Product Evaluation

Set selected vendor


After a quotation is selected well have to take that quotations vendor and add it directly to the Office Supply Request, so the web service will be able to check directly the vendor. 1. 2. 3. Click on the Quotations subprocess. Click on the Select Vendor Activity Select the On Exit Option

4. Add an expression

www.bizagi.com

CONFIDENTIAL

68

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

69

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

70

Workshop Manual for Product Evaluation

14. Set the Condition:

www.bizagi.com

CONFIDENTIAL

71

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

72

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

73

Workshop Manual for Product Evaluation

Click Ok on all the windows to save the rule

Set Quotation Request


1. Select the Request Quotations Activity

www.bizagi.com

CONFIDENTIAL

74

Workshop Manual for Product Evaluation

2.

Click the On Enter option and select Letter

3.

Click on New

www.bizagi.com

CONFIDENTIAL

75

Workshop Manual for Product Evaluation

4. Type the Name Quotation and click Next

5.

Select the Quotation Request Attribute and click Next

www.bizagi.com

CONFIDENTIAL

76

Workshop Manual for Product Evaluation

6. Insert the following information: For the Date start writing < and the IntelliSense will help you include the field.

www.bizagi.com

CONFIDENTIAL

77

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

78

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

79

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

80

Workshop Manual for Product Evaluation

STEP 5: PERFORMERS
For this process well 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 Creators 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 Well find the different activities and we can notice the ones whose performer has not been assigned.

ACTIVITY: REGISTER OFFICE SUPPLY REQUEST


1. 2. 3. 4. Select the Activity by clicking on it Add a Condition Select the User ID as Property for the condition 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

CONFIDENTIAL

81

Workshop Manual for Product Evaluation

7.

Click on Ok to finish. Repeat this procedure for the Receive Products Activity.

ACTIVITY: APPROVE OFFICE SUPPLY REQUEST


1. 2. 3. 4. 5. Select the Approve Office Supply Request Add a condition Select the User ID as property for the condition Click on Select Expression, in the new Rule window click Cancel. Select the CurrentAsigneeBoss rule.

www.bizagi.com

CONFIDENTIAL

82

Workshop Manual for Product Evaluation

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. 2. 3. Select Process Invoice Activity Add a condition 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

CONFIDENTIAL

83

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

84

Workshop Manual for Product Evaluation

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. 2. From the Project Wizard select the Sixth Step and click on Define Integration Interfaces. 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

CONFIDENTIAL

85

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

86

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

87

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

88

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

89

Workshop Manual for Product Evaluation

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 wizards 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

CONFIDENTIAL

90

Workshop Manual for Product Evaluation

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

CONFIDENTIAL

91

Workshop Manual for Product Evaluation

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 its 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

CONFIDENTIAL

92

Workshop Manual for Product Evaluation

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 Boss Applicant Purchase PASSWORD Boss Applicant Purchase DOMAIN domain domain domain Boss Purchase Department Assistant IMMEDIATE BOSS POSITION

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 wont 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 its made. We need to configure the following notifications:

www.bizagi.com

CONFIDENTIAL

93

Workshop Manual for Product Evaluation

Activity: Notify Change Required

www.bizagi.com

CONFIDENTIAL

94

Workshop Manual for Product Evaluation

Activity: Notify Rejection

www.bizagi.com

CONFIDENTIAL

95

Workshop Manual for Product Evaluation

Activity: Notify Approval

www.bizagi.com

CONFIDENTIAL

96

Workshop Manual for Product Evaluation

2.

CONCLUSION
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

In this workshop, you learned how to:

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

www.bizagi.com

CONFIDENTIAL

97

You might also like