/** * Updates the ActionChain which is a description of actions that lead to this action. * The action chain is updated in a way that the immediate parent is the first element of * the chain. So the index of the chain indicates how many actions are in between this * action and the causing action. * * @param actionDescription the ActionDescription which is updated * @param parentAction the ActionDescription of the action which is the cause for the new action * @return the updated ActionDescription */ public static ActionDescription.Builder updateActionChain(final ActionDescription.Builder actionDescription, final ActionDescriptionOrBuilder parentAction) { actionDescription.addActionChain(getActionReferenceFromActionDescription(parentAction)); actionDescription.addAllActionChain(parentAction.getActionChainList()); return actionDescription; }