src/Bpm/Resolver/Context/BpmResolver.php
public function setContext($context, $value)
    {
        if (!in_array($context, [static::CONTEXT_TASK], true)) {
            throw new DomainException('Context does not exist.');
        }

        $this->contexts[$context] = $value;

        return $this;
    }
public function setContext($context, $value)
    {
        if (!in_array($context, [static::CONTEXT_TASK], true)) {
            throw new DomainException('Context does not exist.');
        }

        $this->contexts[$context] = $value;

        return $this;
    }
Set context

@param string $context
@param mixed $value
@return \Ds\Component\Bpm\Resolver\Context\BpmResolver
@throws \DomainException