- 
                Notifications
    
You must be signed in to change notification settings  - Fork 14
 
Description
Hi there again,
I'm using this great library for my bachelor's thesis, which is about automatic BPMN generation using NLP. (therefore, the input is sort of messy). I majorly used the "render" function, and I got interesting error messages when the diagram became larger.
for example, the input syntax as
title: debug
width: 10000
colourtheme: BLUEMOUNTAIN
lane: any employee
(start) as start
[the process of an office supply request starts] as activity_01
[submits an office supply request] as activity_02
<register the requirement?> as gateway_1
lane: immediate supervisor
[receive the request] as activity_03
<> as gateway_1_end
lane: supervisor
[approve a change] as activity_04
[ask for a change] as activity_05
[reject the request] as activity_06
<> as gateway_2
[the process end] as activity_07
[make a change] as activity_08
[return it to the petitioner employee] as activity_09
lane: petitioner employee
[review the comments for the change request] as activity_10
[request go to the purchase department] as activity_11
[making quotations] as activity_12
[select a vendor] as activity_13
lane: purchase department
[have] as activity_14
[choose a different vendor] as activity_15
<> as gateway_2_end
[select a vendor] as activity_16
[confirm a vendor] as activity_17
[the system generate a purchase order] as activity_18
[the system send a purchase order] as activity_19
[the system wait a purchase order] as activity_20
[deliver the product] as activity_21
[the invoice received] as activity_22
<the system in any case send a notification?> as gateway_3
lane: user
[know] as activity_23
<> as gateway_3_end
[approval rejection or change in any of the cases required] as activity_24
(end) as end
start->activity_01->activity_02->gateway_1
gateway_1-"yes"->activity_03->gateway_1_end
gateway_1-"no"->gateway_1_end
gateway_1_end->activity_04->activity_05->activity_06->gateway_2
gateway_2-"reject the request"->activity_07->gateway_2_end
gateway_2-"ask the request"->activity_08->activity_09->activity_10->gateway_2_end
gateway_2-"approve the request"->activity_11->activity_12->activity_13->gateway_2_end
gateway_2-"the vendor is not valid"->activity_14->activity_15->gateway_2_end
gateway_2_end->activity_16->activity_17->activity_18->activity_19->activity_20->activity_21->activity_22->gateway_3
gateway_3-"yes"->activity_23->gateway_3_end
gateway_3-"no"->gateway_3_end
gateway_3_end->activity_24->end
will lead to an error message as
/usr/local/bin/python3.10 /Users/shuaiwei_yu/Desktop/bachelor-thesis/project/BPMNrenderer.py
Traceback (most recent call last):
File "/Users/shuaiwei_yu/Desktop/bachelor-thesis/project/BPMNrenderer.py", line 60, in 
render(input_syntax, "/Users/shuaiwei_yu/Desktop/output/text06_test.png")
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/processpiper/text2diagram.py", line 303, in render
exec(generated_code)
File "", line 77, in 
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/processpiper/processmap.py", line 385, in draw
lane.draw_connection(all_shapes)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/processpiper/lane.py", line 221, in draw_connection
shape.draw_connection(self.painter, all_shapes)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/processpiper/shape.py", line 729, in draw_connection
) = self.find_nearest_points_same_pool_diff_lanes(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/processpiper/shape.py", line 436, in find_nearest_points_same_pool_diff_lanes
del points_source[nearest_points["source_name"]]
KeyError: 'source_name'
sometimes when you can just change the order a bit, and this will fix the problem, but with such a large diagram, this trick doesn't work. Can you give me some hints about this? Thank you very much!