AnsweredAssumed Answered

How to update BusinessKey via ExecutionEntity

Question asked by xuemzhan on Jul 30, 2016
Latest reply on Aug 3, 2016 by martin.grofcik
Hi Exports,

Here is my code trying to update BusinessKey when the process instance was started.

<blockcode>
@Override
public void setBusinessKey(ProcessInstance instance, String businessKey) {
   try {
      ExecutionEntity entity = (ExecutionEntity)instance;
      if (entity != null) {
         entity.updateProcessBusinessKey(businessKey);
      }
   } catch (Exception e) {
      SystemLog.debug("An exception : " + e.getMessage());
   }
}
</blockcode>

I found that there is no "CommandContext" returned in the updateProcessBusinessKey method. 

Outcomes