2024-02-08 17:45:02 +00:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
|
|
|
|
|
<bpmn:process id="Process_1smb9b5" isExecutable="true">
|
|
|
|
|
<bpmn:startEvent id="StartEvent_1">
|
|
|
|
|
<bpmn:outgoing>Flow_0bngcu2</bpmn:outgoing>
|
|
|
|
|
</bpmn:startEvent>
|
|
|
|
|
<bpmn:sequenceFlow id="Flow_0bngcu2" sourceRef="StartEvent_1" targetRef="Activity_10fbwgl" />
|
2024-02-08 17:52:17 +00:00
|
|
|
|
<bpmn:scriptTask id="Activity_10fbwgl" name="Simple Script Task">
|
|
|
|
|
<bpmn:incoming>Flow_0bngcu2</bpmn:incoming>
|
2024-02-09 21:24:27 +00:00
|
|
|
|
<bpmn:script>
|
2024-02-09 21:29:45 +00:00
|
|
|
|
# Creating Variables
|
|
|
|
|
age = 51 # This is an integer
|
2024-02-09 21:24:27 +00:00
|
|
|
|
height = 1.93 # This is a float or "floating point number"
|
|
|
|
|
children = ['Robert', 'Edward', 'Tad', 'Willie'] # This is a list
|
|
|
|
|
is_married = True # This is a boolean
|
|
|
|
|
|
2024-02-09 21:29:45 +00:00
|
|
|
|
# Updating Variables
|
|
|
|
|
Age = 50 # Variables are case sensitive, this is a new variable.
|
|
|
|
|
age = 54 # This updates the age variable.
|
|
|
|
|
|
|
|
|
|
# Referencing variables
|
|
|
|
|
my_age = age # my_age is now set to 54
|
|
|
|
|
|
|
|
|
|
# Deleting variables
|
|
|
|
|
del(Age) # The age variable no longer exists. You will get an error if you try to use it.
|
|
|
|
|
|
|
|
|
|
|
2024-02-09 21:24:27 +00:00
|
|
|
|
# This is a dictionary, and you will use a lot of them...
|
|
|
|
|
cabinet = {
|
|
|
|
|
"Secretary of State": "William H. Seward",
|
|
|
|
|
"Secretary of the Treasury": "Salmon P. Chase",
|
|
|
|
|
"Secretary of War": "Edwin M. Stanton",
|
|
|
|
|
"Attorney General": "Edward Bates"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Dictionaries can be deeply nested and contain any type of variable
|
|
|
|
|
cabinet = {
|
|
|
|
|
"Secretary of State": {
|
|
|
|
|
"name": "William H. Seward",
|
|
|
|
|
"age": 60,
|
|
|
|
|
"children": ['William Jr.', 'Frederick', 'Augustus', 'Anna']
|
|
|
|
|
}
|
2024-02-14 13:39:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Readability
|
|
|
|
|
# The creator of Python Guido van Rossum, said
|
|
|
|
|
# “Code is read much more often than it’s written.” IT's important to
|
|
|
|
|
# create code that is easy to understand later on. For this reason
|
|
|
|
|
# We recommend following some standards
|
|
|
|
|
# (see https://realpython.com/python-pep8/ for more info.)
|
|
|
|
|
# * </bpmn:script>
|
2024-02-08 17:52:17 +00:00
|
|
|
|
</bpmn:scriptTask>
|
2024-02-08 17:45:02 +00:00
|
|
|
|
</bpmn:process>
|
|
|
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
|
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1smb9b5">
|
|
|
|
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
|
|
|
|
<dc:Bounds x="142" y="12" width="36" height="36" />
|
|
|
|
|
</bpmndi:BPMNShape>
|
2024-02-08 17:52:17 +00:00
|
|
|
|
<bpmndi:BPMNShape id="Activity_079whp1_di" bpmnElement="Activity_10fbwgl">
|
2024-02-08 17:45:02 +00:00
|
|
|
|
<dc:Bounds x="230" y="-10" width="100" height="80" />
|
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
|
<bpmndi:BPMNEdge id="Flow_0bngcu2_di" bpmnElement="Flow_0bngcu2">
|
|
|
|
|
<di:waypoint x="178" y="30" />
|
|
|
|
|
<di:waypoint x="230" y="30" />
|
|
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
|
</bpmndi:BPMNPlane>
|
|
|
|
|
</bpmndi:BPMNDiagram>
|
|
|
|
|
</bpmn:definitions>
|