public virtual object Execute(ICommandContext commandContext)
        {
            IExecutionEntityManager executionManager = commandContext.ExecutionEntityManager;
            IExecutionEntity        processInstance  = executionManager.FindById <IExecutionEntity>(new KeyValuePair <string, object>("id", processInstanceId));

            if (processInstance == null)
            {
                throw new ActivitiObjectNotFoundException("No process instance found for id = '" + processInstanceId + "'.", typeof(IProcessInstance));
            }
            else if (!processInstance.ProcessInstanceType)
            {
                throw new ActivitiIllegalArgumentException("A process instance id is required, but the provided id " + "'" + processInstanceId + "' " + "points to a child execution of process instance " + "'" + processInstance.ProcessInstanceId + "'. " + "Please invoke the " + this.GetType().Name + " with a root execution id.");
            }

            executionManager.UpdateProcessInstanceBusinessKey(processInstance, businessKey);

            return(null);
        }