def store_execution_output_data(
    execution_db, action_db, data, output_type="output", timestamp=None
):
    """
    Store output from an execution as a new document in the collection.
    """
    execution_id = str(execution_db.id)

    if action_db is None:
        action_ref = execution_db.action.get("ref", "unknown")
        runner_ref = execution_db.action.get("runner_type", "unknown")
    else:
        action_ref = action_db.ref
        runner_ref = getattr(action_db, "runner_type", {}).get("name", "unknown")

    return store_execution_output_data_ex(
        execution_id,
        action_ref,
        runner_ref,
        data,
        output_type=output_type,
        timestamp=timestamp,
    )

    Store output from an execution as a new document in the collection.
    
st2common/st2common/services/action.py