BPMN en usecases gemaakt
This commit is contained in:
parent
86846e1da7
commit
9fd1abff3f
|
@ -0,0 +1,22 @@
|
|||
Process beschrijving:
|
||||
Het process begint bij de klant, hierna genoemd reiziger. De reiziger vult een bericht in bij een computer zuil.
|
||||
Het bericht is maximaal 140 tekens lang, er wordt ook om de naam gevraagt. De naam mag leeg gelaten worden, waarna er automatisch "anoniem" wordt bijgevuld.
|
||||
Nadat het bericht in de database is opgeslagen, is het de beurt aan de moderator om het bericht goed te keuren.
|
||||
Als de moderator het bericht goedkeurt, wordt automatisch het bericht gepubliseerd op twitter, en wordt op een groot scherm in de stations hal getoond.
|
||||
Als het bericht wordt afgekeurd wordt er niets meer met het bericht gedaan.
|
||||
|
||||
Actoren:
|
||||
klant/reiziger, moderator
|
||||
|
||||
ICT infrastructuur:
|
||||
computer zuil voor de klant
|
||||
computer voor de moderator
|
||||
groot beeldscherm in de stations hal
|
||||
een database
|
||||
|
||||
Diagram structuur:
|
||||
pool: Twitter Zuil Systeem
|
||||
lanes: klant/reiziger, moderator
|
||||
|
||||
Diagram gateways:
|
||||
- Exclusive gateway
|
|
@ -0,0 +1 @@
|
|||
<mxfile host="app.diagrams.net" modified="2020-10-29T13:10:51.090Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36" etag="9DVRkeiO1KHzNX0h3d4E" version="13.8.6" type="device"><diagram id="0cQANHcvoKupn-erzmt7" name="Page-1">5Vrbcts2EP0aPcbDi6jLY3Rx0tTueOrOpM4bSK5IJCChgmAk6uu7IEFRFHVzZEqq6/HIwBIAgbNnF7trdexxtPwkyDx85D6wjmX4y4496ViW2bWsjvo1/KyQDIxuIQgE9fWgSvBMV6CFhpam1IekNlByziSd14Uej2PwZE1GhOCL+rAZZ/W3zkmg32hUgmePMGgM+0p9GepTOBujPwMNwvLNpqGfRKQcrAVJSHy+2BDZ0449FpzLohUtx8AUeCUuxbz7PU/XGxMQy1Mm/E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d+GGTdrqX8AvBM77h2z457jDGqWXNYFb9iUuw2F7Y1KbjSPFiGP3DTZzKPd9TvweUAkLJD/R9PrmOcVlnV+DUuPpQmq7dOixQCrZ2x5/14zrbhojm1dJav4Ve/euqc+NR0pLOla+Yh5KCEJuMLnB6SYgdj3e+37hrKO7XB0R2H8skmH1b2GUbRNbss+ldznZh3ngd+slaMPl4IzBsW/Ikqq3z6z7cGtMfsq6fSlS6pl3fiou++faBHWHjWfaxHYrb6wUkR51dd+7Om/</diagram></mxfile>
|
Binary file not shown.
After Width: | Height: | Size: 367 KiB |
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
<mxfile host="Electron" modified="2020-10-29T13:51:48.926Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.6.2 Chrome/83.0.4103.122 Electron/9.2.0 Safari/537.36" etag="NEsN18mxCChIiTvpMfO5" version="13.6.2" type="device"><diagram id="5_x_X4hH6fVbAsXM8oa-" name="Page-1">3ZfbcpswEIafxpfpYA6OfZnacZrpYTJxO0lzJ8MGNBWIkRdj5+m7CsIcPXYPTtJegX6tFu23yyIGzjTeXCmWRp9lAGJgW8Fm4MwGtj10PIsuWtkWyng4KoRQ8cAYVcKCP4ERzbow4wGsGoYopUCeNkVfJgn42NCYUjJvmj1K0XxqykLzRKsSFj4T0DG74wFGJgqvZv0BeBiVTx5aZiZmpbERVhELZF6TnMuBM1VSYnEXb6YgNLySS7Fuvmd2tzEFCR6zIJ/eThZ35/La/fItOkse5v6cnRkvayYyE/BHwcifPb8F/sRDUGbzuC2JUBypvs1iceGjVAPn/RoUcmL2iS1B3MgVRy4TMllKRBnXDC4ED/UEypTUCGNBgyHdygwFT2C6y6JFYjfCcrvkDjY1yUR8BTIGVFsyMbNOSd+Unz0247xKpmukqJbH0oyZ8gl3nivCdGMg/wJwuwNcvzOKaZD/FWnXemXSXod0B7CSWRJAYCDkEUdYpMzXszm1sya4v8DIdQ9X49DugWRbp6I07lC6TtYSKEhSl6C4T3tocyO/1H/hZZh5TWbOqIeZ1cPMORWySQcZvUyopHjD1PrexpelNux2vq85R9RfGOsh49rBYrtCgLhDjoLGJqIV8f5BTUzorjhLZKKxPnIhWhIzbdAnlKB6+mPMg0Dsy0mzP7xuAzhVWpzDbRKS4EIfpSqstUwQDLW9N4ieB9/14J1XDmeb+uRse4jmSmbKh8NnFmQqBDzc2iAoT3h7clNj7/WgLzUFgiFfN8+FffkwT7iRXB+kdt/H81bqJ62UFnGbVfVzXMuR2z7SuC1HBZiOo+fy2IX9BxXj/nMVYx9ZMZM3VTG7f6Dyy9dO9LEVY48OlN5vVwwNqx+Ywrz6DXQufwI=</diagram></mxfile>
|
Binary file not shown.
After Width: | Height: | Size: 109 KiB |
Binary file not shown.
|
@ -36,7 +36,7 @@ def vraaginvoer():
|
|||
return False
|
||||
|
||||
try:
|
||||
naam = input('Onder welke naam?:')
|
||||
naam = input('Onder welke naam?: ')
|
||||
if len(naam) > 32:
|
||||
print('Uw naam is te lang, verander uw naam in de geboorteakte bij uw gemeente.')
|
||||
return False
|
||||
|
|
28
moderator.py
28
moderator.py
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
deze python script werkt, en werkt in de terminal
|
||||
voor een web versie, zie moderator_web.py
|
||||
deze script en moderator_web.py werken onafhankelijk van elkaar
|
||||
"""
|
||||
import hashlib
|
||||
import getpass
|
||||
import database_connector
|
||||
|
@ -77,10 +82,11 @@ def publishtwit(berichtid):
|
|||
cur.execute("SELECT naam FROM locaties WHERE locatieid = (%s)", [bericht[9]])
|
||||
locatie = cur.fetchone()
|
||||
|
||||
# het bericht dat gepubliceerd wordt
|
||||
formatted = str(bericht[1] + ' | Door ' + bericht[4] + ' op ' + locatie[0])
|
||||
|
||||
if len(formatted) < 180:
|
||||
response = twitter_API.request('statuses/update', {'status': formatted})
|
||||
response = twitter_API.request('statuses/update', {'status': formatted})pytho
|
||||
jsonresponse = response.json()
|
||||
if response.status_code == 200:
|
||||
# vul tabel twitterberichten eerst in
|
||||
|
@ -208,8 +214,28 @@ def listmessages(moderatorid):
|
|||
print('2. Moderators weergeven')
|
||||
print('3. Gepubliseerde berichten weergeven')
|
||||
print('4. Locaties weergeven')
|
||||
print('0. Vorige Menu')
|
||||
print('_________________________________')
|
||||
|
||||
while inputcorrect == False:
|
||||
try:
|
||||
optie = int(input('Kies optie: '))
|
||||
inputcorrect = True
|
||||
except:
|
||||
print('Ongeldige invoer')
|
||||
|
||||
if optie == 0:
|
||||
return True
|
||||
elif optie == 1:
|
||||
return
|
||||
elif optie == 2:
|
||||
return
|
||||
elif optie == 3:
|
||||
return
|
||||
elif optie == 4:
|
||||
return
|
||||
else:
|
||||
print('Ongeldige invoer')
|
||||
|
||||
def menu(moderatorid, moderatornaam):
|
||||
while True:
|
||||
|
|
27
publish.py
27
publish.py
|
@ -1,27 +0,0 @@
|
|||
"""
|
||||
from TwitterAPI import TwitterAPI
|
||||
from api_keys import * imports these variables
|
||||
|
||||
TWITTER_APIKEY
|
||||
TWITTER_APISECRET
|
||||
TWITTER_BEARER
|
||||
TWITTER_ACCESSTOKEN
|
||||
TWITTER_ACCESSSECRET
|
||||
OWM_KEY
|
||||
"""
|
||||
from TwitterAPI import TwitterAPI
|
||||
from api_keys import *
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
twitter_API = TwitterAPI(TWITTER_APIKEY, TWITTER_APISECRET, TWITTER_ACCESSTOKEN, TWITTER_ACCESSSECRET)
|
||||
|
||||
r = twitter_API.request('statuses/update', {'status':'Another test tweet'})
|
||||
print(r.status_code)
|
||||
print(r.json())
|
||||
|
||||
#test = {'created_at': 'Tue Sep 29 20:39:57 +0000 2020', 'id': 1311043058117550087, 'id_str': '1311043058117550087', 'text': 'Another tweet', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': []}, 'source': '', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 1308331480553267202, 'id_str': '1308331480553267202', 'name': 'nszuiltest33332', 'screen_name': 'nszuiltest33332', 'location': '', 'description': 'this is a testing account for a school project because I MUST use twitter and no other services that also offer an API', 'url': None, 'entities': {'description': {'urls': []}}, 'protected': True, 'followers_count': 0, 'friends_count': 0, 'listed_count': 0, 'created_at': 'Tue Sep 22 09:05:14 +0000 2020', 'favourites_count': 0, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': False, 'statuses_count': 3, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'F5F8FA', 'profile_background_image_url': None, 'profile_background_image_url_https': None, 'profile_background_tile': False, 'profile_image_url': 'http://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png', 'profile_image_url_https': 'https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png', 'profile_link_color': '1DA1F2', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': True, 'default_profile': True, 'default_profile_image': True, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 0, 'favorite_count': 0, 'favorited': False, 'retweeted': False, 'lang': 'en'}
|
||||
|
||||
#print(test['id'])
|
Reference in New Issue