Here is my stackexcnage answer. 

[1]:http://pages.bangor.ac.uk/~mas010/topgpds.html 


Another way of looking at this is to use the equivalence of categories between covering morphisms of a groupoid $P$ and actions of $P$ on sets. (Recall that a covering morphism $p:G \to P$ is a groupoid morphism having unique path lifting. Not necessarily unique path lifting gives a _fibration of groupoids_.) Given an operation of $P$ on a set $X$ then the corresponding covering morphism may be written $P \ltimes X$, an action groupoid, and thought of as a semidirect product because it is a special case of the semidirect product for an action of a groupoid $P$ on a groupoid $H$. For this one needs a morphism of groupoids $\omega: H \to Ob(P)$, where the latter is thought of as a discrete groupoid, and an element $w: x \to y$ in $P$ gives a morphism of groupoids $w_*: \omega^{-1}(x) \to \omega^{-1}(y)$. One has to be precise on conventions to get all this right, which I won't do here. 

So a groupoid $G$ has a representation as an action groupoid whenever you  are given a covering morphism $ G \to P$. This is closely related to Omar's answer, of course. 

I'll add that more details of these ideas are in my book [Topology and Groupoids][1].