MCPcopy Index your code
hub / github.com/sartography/SpiffWorkflow / get_position

Method get_position

SpiffWorkflow/bpmn/parser/node_parser.py:145–152  ·  view source on GitHub ↗
(self, node=None)

Source from the content-addressed store, hash-verified

143 return {}
144
145 def get_position(self, node=None):
146 node = node if node is not None else self.node
147 nodeid = node.get('id')
148 if nodeid is not None:
149 bounds = first(self.doc_xpath(f".//bpmndi:BPMNShape[@bpmnElement='{nodeid}']//dc:Bounds"))
150 if bounds is not None:
151 return {'x': float(bounds.get('x', 0)), 'y': float(bounds.get('y', 0))}
152 return {'x': 0.0, 'y': 0.0}
153
154 def _get_lane(self):
155 noderef = first(self.doc_xpath(f".//bpmn:flowNodeRef[text()='{self.bpmn_id}']"))

Callers 1

parse_nodeMethod · 0.80

Calls 3

doc_xpathMethod · 0.95
firstFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected