Professional Documents
Culture Documents
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
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
1.
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.
Scope
This process focuses in controlling the requests of Office supplies of the organization, from the initial request up to its delivery.
www.bizagi.com
CONFIDENTIAL
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
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
5.
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
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.
www.bizagi.com
CONFIDENTIAL
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
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
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
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
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
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.
www.bizagi.com
CONFIDENTIAL
14
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
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
www.bizagi.com
CONFIDENTIAL
17
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
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
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
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
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
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
www.bizagi.com
CONFIDENTIAL
23
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
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
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
3.
Right click on the Office Supply Request entity in the XPath submenu and select Edit Entity:
5.
Add a new attribute for the petitioner and Delivery Address as follows:
www.bizagi.com
CONFIDENTIAL
27
www.bizagi.com
CONFIDENTIAL
28
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
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:
Visible True
Required False
Editable False
www.bizagi.com
CONFIDENTIAL
30
Quantity Comments
True True
False False
False False
www.bizagi.com
CONFIDENTIAL
31
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
www.bizagi.com
CONFIDENTIAL
33
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
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
www.bizagi.com
CONFIDENTIAL
35
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.
Close the window using the X at the right corner. Save and close the form.
www.bizagi.com
CONFIDENTIAL
36
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
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
www.bizagi.com
CONFIDENTIAL
38
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
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.
www.bizagi.com
CONFIDENTIAL
40
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
www.bizagi.com
CONFIDENTIAL
42
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
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
www.bizagi.com
CONFIDENTIAL
45
www.bizagi.com
CONFIDENTIAL
46
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:
www.bizagi.com
CONFIDENTIAL
47
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
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:
www.bizagi.com
CONFIDENTIAL
48
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
3.
www.bizagi.com
CONFIDENTIAL
50
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:
www.bizagi.com
CONFIDENTIAL
51
www.bizagi.com
CONFIDENTIAL
52
www.bizagi.com
CONFIDENTIAL
53
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.
www.bizagi.com
CONFIDENTIAL
54
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
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
7.
www.bizagi.com
CONFIDENTIAL
57
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
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
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
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
2.
www.bizagi.com
CONFIDENTIAL
61
3.
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
5.
Compare the Approved attribute to True and click on Set the Filter:
www.bizagi.com
CONFIDENTIAL
63
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:
CONFIDENTIAL
64
www.bizagi.com
CONFIDENTIAL
65
5.
Click on Finish to save the expression and ok to save the Rule in the transition.
www.bizagi.com
CONFIDENTIAL
66
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.
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
4. Add an expression
www.bizagi.com
CONFIDENTIAL
68
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
11. Select the XPath Option and click the XPath Button to edit it.
www.bizagi.com
CONFIDENTIAL
70
www.bizagi.com
CONFIDENTIAL
71
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:
www.bizagi.com
CONFIDENTIAL
72
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
www.bizagi.com
CONFIDENTIAL
74
2.
3.
Click on New
www.bizagi.com
CONFIDENTIAL
75
5.
www.bizagi.com
CONFIDENTIAL
76
6. Insert the following information: For the Date start writing < and the IntelliSense will help you include the field.
www.bizagi.com
CONFIDENTIAL
77
7.
Include the Product Request table by clicking on the dynamic grid button:
www.bizagi.com
CONFIDENTIAL
78
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
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
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.
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
7.
Click on Ok to finish. Repeat this procedure for the Receive Products Activity.
www.bizagi.com
CONFIDENTIAL
82
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
www.bizagi.com
CONFIDENTIAL
83
5.
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
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
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
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
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
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
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
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
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
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
www.bizagi.com
CONFIDENTIAL
93
www.bizagi.com
CONFIDENTIAL
94
www.bizagi.com
CONFIDENTIAL
95
www.bizagi.com
CONFIDENTIAL
96
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
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