Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

Both sides previous revision Poprzednia wersja
Nowa wersja
Poprzednia wersja
pl:dydaktyka:dss:lab1 [2017/10/09 23:31]
kkluza [Modeling a simple process]
pl:dydaktyka:dss:lab1 [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
-====== Lab. 1: Working with the Activiti platform ======+====== Lab. 1: Working with Activiti platform ======
  
 ===== Signavio Process Editor ===== ===== Signavio Process Editor =====
 +
 +**This part will be required for the next classes!**
  
 Please sign up for the Signavio Platform: [[http://​academic.signavio.com/​p/​register?​link=0b77d60921ec4ab2ac93286867a9af7d|Registration for the Signavio BPM Academic Initiative]] Please sign up for the Signavio Platform: [[http://​academic.signavio.com/​p/​register?​link=0b77d60921ec4ab2ac93286867a9af7d|Registration for the Signavio BPM Academic Initiative]]
Linia 23: Linia 25:
   password: kermit   password: kermit
  
-You can also use the temporary server version at our server: http://​192.168.1.145:​8080/​activiti-explorer/​ui/​+You can also use the temporary server version at our server: ​\\ 
 +http://​192.168.1.145:​8080/​activiti-explorer/​ui/​
  
 When logged in, you should have noticed the top bar displaying the menu of 4 icons for administration of: When logged in, you should have noticed the top bar displaying the menu of 4 icons for administration of:
Linia 38: Linia 41:
  
 So, create a new user for you. Remember about a unique identifier! ​ So, create a new user for you. Remember about a unique identifier! ​
-Assign your user to some groups but not the Admin group. 
  
 ==== Creating a new process model ==== ==== Creating a new process model ====
Linia 89: Linia 91:
 ==== Start a simple process ==== ==== Start a simple process ====
  
-We save the model and turn off ** Activiti Modeler **+After saving ​the model, closing the **Activiti Modeler**go to **Activiti Explorer**. 
-We go to ** Activiti Explorer **. +In the //Model workspace// tab, select ​your process from the menu, 
-In the // Model workspace // tab, select ​our process from the menu +and from the list //Model action// choose **Deploy**.
-And from the list // Model action // choose ** Deploy **.+
  
-You should ​move us to the // Deployments // tab in ** Manage **, where we choose ​our process (by clicking on its name) in the // Process Definitions // \ +You should ​have been moved to the //​Deployments//​ tab (in **Manage**), where you can choose ​your process (by clicking on its name) in the //Process Definitions// ​\
-{{enteaching: bim: lab1 :: proces1-deploy.png |}} +{{  :pl:dydaktyka:​bim:​lab1::​proces1-deploy.png ​ |}} 
-Once deployed, from the // Deployed process definitions // tab we can start our process with the ** Start process ** button. ​You should open the form: \\ +Once deployed, from the //Deployed process definitions//​ tab, you can start your process with the **Start process** button. ​ 
-{{enteaching: bim: lab1: process1-run1-form.png |}} +The following ​form should opened: \\ 
-Complete the form with any data and click ** Start process **.+{{  :pl:​dydaktyka:bim:lab1:proces1-run1-form.png ​ |}} 
 +Complete the form with any data and click **Start process**.
  
-If all goes well, under the tab ** Processes ** -> // My instances // we should see the instance of our process,+If everything is like it should be, under the tab **Processes** -> //My instances//, you should see the instance of your process.
  
-Since the first task was assigned to us (the user who started the process)we clicked ​the ** Tasks ** icon and went through ​the tabs // Inbox // where we should wait for our task // Specify offer //. +As the first task was assigned to the user who started the process, ​click the **Tasks** icon and go to the //​Inbox// ​tab, where task //Specify offer// ​should wait for you
-We fill in the // Responsible // field with the name of another user (eg ''​ fozzie ''​ or predefined user); ​we can also check the checkbox // Specifications details //. Then click ** Complete task **.+Fill up the //​Responsible//​ field with the name of another user (eg ''​fozzie''​ or some predefined user); check the checkbox //​Specifications details//. Then click **Complete task**.
  
-Now click the ** Processes ** icon and go to the // My instances // tab to view the diagram, task list and variables of our process. +Now click the **Processes** icon and go to the //My instances// tab to view the diagram, ​the task list and variables of your process. 
-Since the // Approve offer // is waiting for another user, we log in to the account of the specified user (if it was a "​user"​, his password is: "'​fozzie"), and then we finish the task // Approve offer / /. +Since the //Approve offer// is waiting for another user, we log in to the account of the specified user (if it was ''​fozzie''​, his password is: ''​fozzie''​), and then we finish the task //Approve offer//. 
-We're going back to our account ​and checking ​that my Instances // tab has disappeared.+We're going back to our accountchecking ​if in the //My Instances// tab, a process ​has disappeared.
  
-The historical data of our process is stored in the database, which is quickly available in the // Database // tab (click on the ** Manage ** icon). Look for the '​ACT_HI_PROCINST'​ table and find your process there. +The historical data of our process is stored in the database, which is quickly available in the //​Database//​ tab (click on the **Manage** icon). Look for the '​ACT_HI_PROCINST'​ table and find your process there. 
-Because ​our Activiti ​installation with Activiti Modeler does not have a permanent ​model set up in the lab, we will save our model at home on disk. To do this, select // Show all // from the menu // Deployments // and look for our process. Please save your process file (file with extension ** .bpmn20.xml **) and view its syntax. ​Note the attributes of the '​process'​ tagas well as additional attributes of other process elements ​typically ​used by Activiti.+Because ​the installation ​of the Activiti ​with Activiti Modeler ​in the lab does not have a permanent ​database for models, we will save our model on disk. To do this, select //Show all// from the menu //​Deployments//​ and look for our process. Please save your process file (file with extension **.bpmn20.xml**) and view its syntax. ​Check the additional ​attributes of the '​process'​ tag as well as additional attributes of other process elements ​and note which are used by Activiti.
  
  
 ==== Model development ==== ==== Model development ====
  
-We go back to the // Model workspace // page to expand ​our model to the gate+Let'​s ​go back to the //Model workspace// page to enhance ​our model with gateways
-Depending on the level of detail of the tender ​specifications,​ if it is insufficiently detailed, ​you will want to ask the tenderer to provide additional information. +Depending on the level of detail of the offer specifications, ​ 
-To expand ​our model, select the appropriate model, then click on // Edit model //.+if it is insufficiently detailed, ​we will want to ask the tenderer to provide additional information. 
 +To enhance ​our model, select the appropriate model, ​and then click //Edit model//.
  
-Please ​expand ​the model to the form as in the following diagram: \\ +Please ​extend ​the model as in the following diagram: \\ 
-{{: Enteaching: bim: LAB1: process3-diagram.png?​ 800 |}}+{{:pl:dydaktyka:bim:lab1:​process3-diagram.png?​800|}}
  
-An important element of the model is the use of appropriate conditions on flows across ​the XOR gate (depending on the value of the '​specDetails'​ variable). +An important element of the model is the use of appropriate conditions on flows from the XOR gateway ​(depending on the ''​specDetails'' variable ​value). 
-Check out the [[http://​www.activiti.org/​userguide/​index.html|Activiti User Guide]] ​on how to define the appropriate conditions for this gateway.+How to define the appropriate conditions for the gateway, you can check in the [[http://​www.activiti.org/​userguide/​index.html|Activiti User Guide]].
  
  
 ===== Further development of the model ===== ===== Further development of the model =====
  
-=== Boundary Event Timer ===+=== Timer Boundary Event === 
 + 
 +Our subprocess consists of two tasks consisting in contacting the customer by email and calling to inform the customer about this email. In a very detailed version, we should have modeled the task of waiting for a response from the customer -- for simplicity, let's assume that when the customer has provided enough information on the phone, the user completes the "Call customer"​ task; otherwise, it will not finish until obtaining sufficient information. 
 + 
 +In the standard case, when the deadline for offer submission expires, the subprocess should automatically terminate and terminate the process. To do this, we can extend the process using the ''​Timer Boundary Event'':​ 
 + 
 +{{  :​pl:​dydaktyka:​bim:​lab1:​process5-eclipse-example.png?​800 ​ |}} 
 + 
 +The ''​Timer ​Boundary Event''​ element has the following attributes:​ 
 +  * ''​cancelActiviti''​ -- in our case it should be set to **''​true''​** for the subprocess to be interrupted when the event is called, 
 +  * ''​timeDate''​ -- sets a specific date (in the [[wp>ISO 8601]] format) when launching an event, 
 +<code xml> 
 +<​timerEventDefinition>​ 
 +    <​timeDate>​2012-12-06T17:​00:​00</​timeDate>​ 
 +</​timerEventDefinition>​ 
 +</​code>​ 
 +  * ''​timeDuration''​ -- sets the time that must pass until the event is triggered, e.g. for 3 days: 
 +<code xml> 
 +<​timerEventDefinition>​ 
 +    <​timeDuration>​P3D</​timeDuration>​ 
 +</​timerEventDefinition>​ 
 +</​code>​ 
 +  * ''​timeCycle''​ -- sets recurring intervals of time to trigger a periodic event, e.g. 5 repetitions,​ each of which lasts an hour: 
 +<code xml> 
 +<​timerEventDefinition>​ 
 +    <​timeCycle>​R5/​PT1H</​timeCycle>​ 
 +</​timerEventDefinition>​ 
 +</​code>​ 
 + 
 +To test the process and not wait too long for effects, I suggest setting the ''​timeDuration''​ to 2 minutes. 
 + 
 +Please test your model, and view the process instance diagram during this waiting (it should look similar to the model shown in the diagram below): 
 +{{  :​pl:​dydaktyka:​bim:​lab1:​process5-run-example.png?​800 ​ |}} 
 + 
 +At this point, the new "Timer job" should appear in the **Manage** -> **Jobs** tab. If necessary, you can manually trigger the event with the **Execute** button: 
 + ​{{ ​ :​pl:​dydaktyka:​bim:​lab1:​timer-job.png ​ |}} 
 + 
 +=== Task Mail ===
  
-Our subprocess consists ​of two tasks that we contact ​the customer by email and we also call to inform them about the email sent. In a very detailed version, we still have the task of waiting for a response from the customer - for simplicityassume that when the customer has answered enough ​information ​on the phonethe user completes the "Call customer" ​task; otherwise, it will not finish until can not obtain sufficient information.+One of the tasks in the subprocess should send the mail to the client\\ 
 +In the full processthis would require some additional ​information ​to send the email \\ 
 +like what details would you like to know. \\ 
 +But for nowwe will just mock this task.
  
-In the standard casewhen the deadline for submitting tenders expires, the subprocess should automatically terminate and terminate the processTo do this we expand the process using the 'Timer Boundary Event':+There is no mail server configuredbut one can try to send messages to the local addresslike ''​student@AML-Lab-316.geist.agh.edu.pl''​ (check ​the address at your local machine)After sending the email, ​we can check the terminal with ''​mail'',​ if we have it on the mailbox.
  
-{{en: teaching: bim: lab1: process5-eclipse-example.png? 800 |}}+In the e-mail, you can also send some information stored in some variables instances of the process.
  
  
pl/dydaktyka/dss/lab1.1507584669.txt.gz · ostatnio zmienione: 2019/06/27 15:57 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0