In [1], Wehrheim and Woodward construct a category from the "partially defined" Weinstein category of Lagrangian correspondences. This seems to be an instance of a more general construction. I would summarize it as follows:
Let's say that a partially defined category is exactly like a category, except that composition is only defined on some subsets of the morphisms $$\circ : S_{X,Y,Z} \subset \operatorname{Hom}(X, Y) \times \operatorname{Hom}(Y, Z) \to \operatorname{Hom}(X, Z).$$ Then we make a category out of that by taking the same objects, and the morphisms are now finite sequences of morphisms $(f_1, f_2, f_3, \ldots, f_n)$ up to the equivalence relation that two adjacent morphisms are combined if they are composable (e.g. $(f,g,h) \sim (g \circ f, h)$ if $g \circ f$ is defined). All compositions are now well-defined by concatenation.
Questions: Did this construction appear elsewhere? Does it have a name? Did anyone study a 2-category version of this?
[1] Wehrheim, K. and Woodward, C. T. Functoriality for Lagrangian correspondences in Floer theory. Quantum topology 1, no. 2 (2010): 129-170.