Please disable Adblockers and enable JavaScript for domain CEWebS.cs.univie.ac.at! We have NO ADS, but they may interfere with some of our course material.
[Info]
Workflow Execution
Use the following workflow engine:
-
- «http://cpee.org:9298/» (Backend)
Make sure all software you write runs on:
- almighty.cs.univie.ac.at, abgabe.cs.univie.ac.at
- Protokoll: ssh/sftp
- Login: Unet Account name (wie username bei wlan)
- Pass: Unet Passwort
Use one (or many) of the following technologies – your choice:
- JAVA, please create standlone microservices (no tomcat, jboss, …), e.g.
- jetty (JAR)
- PHP (subdirectory public_html on almighty.cs.univie.ac.at)
- access the PHP under «http://wwwlab.cs.univie.ac.at/~userid»
- Ruby
- Javascript (nodejs)
For UI’s, HTML/JS is obligatory (subdirectory public_html on almighty.cs.univie.ac.at).
Assignment 4a - Modell (5 points)
Port your process to CPEE (including data flow) and use the predefined timeout servive as endpoint.
Include the data flow from Aristaflow 3a.
If scripttasks are necessary, use them:
- Access datatelements with
data.someValue = 12
data.anotherValue + 1
data.str = "aaaaa"
- Random number (directly assigned to instance variable randomStr)
data.randomBool = [true, false].sample
data.randomStr = ["red", "blue", "green", "yellow", "violet", "orange"].sample
- The script language is ruby, don't use "includes/requires" please.
Solution approach 1 (~ 2 minutes) - might not work but worth a try:
- modeltype to signavio
- "Load Model" signavio.bpmn
- If the import is not successful, proceed to solution approach 2.
- Wherever you use the endpoint timeout (tip everywhere) add the parameter timeout (value 2).
Solution approach 2 (~ 10 minutes):
- Modeling by hand
- Do step 4 of solution approach 1
Submit the following two files:
- Signavio Modell + screenshot of model in cockpit in a PDF (.pdf)
- Tested CPEE Template (a0xxxxxxx.xml)
WARNING:
- 0 points if Matnr (a0xxxxxxx format) is not included in Attribute info.
- 0 points if Dataflow is not ported from 3a.
Assignment 4b - Runtime (10 points)
Write a set of REST web-services that replace the "timeout" services from a. REALLY. Replace EVERY occurrence of timeout with your own services.
- Every service should do something.
- Services for Signavio tasks with a user icon on it should deliver random values.
- If you have a hand icon, consider inserting a user task afterwards, as the hand denotes something that is 100% offline.
- Services for Signavio tasks with a gear should do SOMETHING (decide something, return data read from FS, …, NO RANDOM)
- (Almost) all services should have INPUT PARAMETER. Otherwise, how should they know what to do? Services for User human tasks have atleast the following parameters:
- role (string)
- organisation (string)
- link to a static html form that collects the returned data (non functional, by mockup state) (string - http://…/xxx.html).
- ALMOST ALWAYS services should return something (depends on scenario).
- If the label says "send mail", send a mail.
p.s. it is still allowed to change the Signavio model (changing labels is NOT allowed, change manual/automatic is allowed within
the boundaries of reason).
Important:
- Tasks have Input ($_REQUEST in PHP).
- Tasks have Output which can be used in finalize to fill data elements (e.g. for JSON data.x = result['y']).
- How often to run through loops is typically the result of data coming from process tasks.
- use rand() stuff from services, so that not all instances are the same.
Hand in three files:
- Signavio Modell as .pdf
- CPEE Template .xml
- Source Code .zip
WARNING 1:
- 0 points if Matnr (a0xxxxxxx format) is not included in Attribute info.
- 0 points if Dataflow is not ported from 3a.
- 0 points if it is not runnable or any timeout's remain.
- 0 points if parameters for human task do not follow the required schema.
Assignment 4c - Worklist (12 points)
A worklist is a program that allows process actors (i.e. humans) to interact with a process (the person that clicks execute in the CPEE Cockpit is not a process actor).
To realize a worklist, every human task (at least 4 tasks with a hand or a human in your Signavio model!) is REQUIRED to have EXACTLY the following additional parameters:
- organization, which represents the name of the organization (or organizational unit) to work on the task.
- role, that is intended to deliver the data that is bound to be returned by the task.
- form, that should be filled out by the user.
Of course there are MOST POSSIBLY additional input parameters. Each task should be realized as asynchronous task:
- When the task is called, save all parameters and tell the CPEE that you will answer later.
- Show the Task List for the users (assigned to the role). Each line in the list should contain the name of the task from the process, to be easily identified.
- When a user takes the task (including its name), show him or her the form (with the additional parameters so that he/she has context information).
- Gather the users input and send it back to the CPEE.
Write the following files (only these files):
- organisation.xml - contains all the units, roles and users (YOU HAVE TO USE THE FORMAT described below). The organisation.xml has to be READ an used in either receive.php and/or worklist.php and/or work.php, depending on your implementation.
- receive.php - called by the CPEE, saves Role, Form and Parameters.
- worklist.php - show all tasks for certain user (parameter user required).
- work.php - when the user clicks a task in the worklist.php, the form is to be shown. As the interessed reader of this assignment might have noticed, form is a parameter to the task. So work is intended to read (e.g. file_get_contents('http://netzwork_link_to_form')) and include its content. Proposed structure of work.php:
Head (task name)
form open
contents of link (read from parameter, replaced values in template)
submit button to final.php
form close
- final.php - when the user clicks SUBMIT in work.php, final.php (1) gets the data, (2) sends it via PUT to cpee, and (3) redirects () to worklist.php.
Alternatively, pure javascript implementations may combine worklist.php, work.php and final.php into worklist.html. The server side may be split up to multiple different files in this case (depending on framework usage). But please put the controller into a file called worklist.php so that we can find it.
Additional rules:
- Tasks are always assigned within the role (and organisation).
- For each role you use in your XML, at least 3 users should be in the organisation.xml.
- Everybody has to implement a give back functionality.
- All people whose matnrs end 4,5,6: round robin assign tasks to a user who has the role. Immediately Repeat when a task is given back.
- All people whose matnrs end 1,2,3: assign tasks to a user who has the least tasks. If more users have the same (minimal) amount of tasks random assign a task. Immediately repeat when a task is given back.
- All people whose matnrs end 7,8,9,0: show tasks to all users in the role. As soon as a user takes the task, the others no longer see it. Give back is to be implemented as well.
- Use the following XML format for describing your organization (example): «http://cpee.org/~demo/orgviz/organisation_studentmanagement.xml»
How to tell CPEE that you want to answer later?
<?
$headers = apache_request_headers() ;
# save $headers['CPEE-CALLBACK'], plus all $_REQUEST parameters
header('CPEE-CALLBACK: true');
exit;
?>
How to send data back to CPEE (by PUT'ing it to the url in $headers['CPEE_CALLBACK'])?
<?
$opts = array('http' =>
array(
'method' => 'PUT',
'header' => 'Content-type: application/json',
'content' => JSON_DATA
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://...', false, $context);
exit;
?>
Submit the following 4 files:
- Signavio model as PDF
- CPEE template as XML
- Source code as ZIP
- text file with url to the working example.
WARNING 1: 0 POINTS if matnr is not included in Attribute info.
WARNING 2: 0 POINTS if it is not runable.
WARNING 3: Assume that you need several days, including interaction with others (e.g. Forum) to do this.
Assignment 4d - Logging (8 Points)
Write a logging facility, which saves all information as «XES 2.x.» file.
Add the follwing aspect to your testset file (just copy it in below handlerwrapper):
<handlers>
<handler url="http://wwwlab.cs.univie.ac.at/~XXXXXX/logging/logging.php">
<events topic='activity'>calling,failed,manipulating,done</events>
</handler>
</handlers>
http:// has to point to your logging service in your account (use EXACTLY the format given above, just change XXXXXX to your username).
Pro TIP: Save all incoming information as you did for the worklist (headers and $_REQUEST) in a random file. Then you can check what data you get.
Tailor the list of <events> so that it suits your needs. Possible events can be found under «http://cpee.org:9298/1/notifications/topics»
Use your testset from Assignment 4c. The result should be a valid XES File.
Add event dispersing (hardcoded location) to the worklist so that it contributes to the events in the XES File. The worklist should send the following events:
- A task is assigned to a user.
- A task is finished.
- A task is given back (if this is possible for your solution).
The events from the worklist should also show up in the XES File.
Additional rules:
- All people whose matnrs end 1,2,3,4,5: the XES file should be in the «YAML format» (NOT XML) but noetheless follow exactly the XES format (same fields, same structure).
- All people whose matnrs end 6,7,8,9,0: the XES file should be in the XML format.
Submit the following 3 files:
- CPEE Template as XML
- Source Code as ZIP
- One example LOG in .yaml or .xml format
Letzte Änderung: 02.12.2019, 11:42 | 1592 Worte