private StepStateChange createStepStateChange(ExecutionState executionState, Map metadata) {
    INodeEntry currentNode = stepContext.getCurrentNode();

    return StateUtils.stepStateChange(
        StateUtils.stepState(executionState, metadata),
        null != currentNode ? currentNode.getNodename() : null);
  }
 private StepStateChange createStepStateChange(
     StepExecutionResult result, INodeEntry currentNode) {
   return StateUtils.stepStateChange(
       StateUtils.stepState(resultState(result), resultMetadata(result), resultMessage(result)),
       null != currentNode ? currentNode.getNodename() : null);
 }