public function addInNode(ezcWorkflowNode $node)
{
// Check whether the node is already an incoming node of this node.
if (ezcWorkflowUtil::findObject($this->inNodes, $node) === false) {
// Add this node as an outgoing node to the other node.
if (!self::$internalCall) {
self::$internalCall = true;
$node->addOutNode($this);
} else {
self::$internalCall = false;
}
// Add the other node as an incoming node to this node.
$this->inNodes[] = $node;
$this->numInNodes++;
}
return $this;
}